How kanaramt/ai_advance_rag_app_multimodel works
Antigravity is an enterprise RAG application: users interact through a web dashboard and assistant, while the FastAPI backend supports document ingestion, retrieval-grounded chat, and knowledge governance. The principal path runs from the assistant through chat handling, retrieval and generation to a cited response; a separate ingestion path extracts and indexes uploaded or web content. The README describes prototype UI behaviors, while the source index and excerpts reveal broader backend capabilities. Several UI-to-API and unsampled subsystem links are left unverified rather than inferred.
Main entry points: ingestion_service.py Ingestion service · router.py API router · chat.py Chat endpoint · retrieval_service.py Retrieval service
Components 25
Web application
- SPA bootstrap
frontend/js/app.js - Product pages
frontend/js/pages - API client
frontend/js/api.js
API entrypoints
- FastAPI app
backend/main.py - API router
backend/api/router.py - Chat endpoint
backend/api/routes/chat.py - Document endpoints
backend/api/routes/documents.py - Product endpoints
backend/api/routes
Knowledge pipeline
- Ingestion service
backend/services/ingestion_service.py - Document extraction
backend/services/document_intelligence.py - Document chunking
backend/services/document_chunker.py - Embedding service
backend/services/embedding_service.py - Vector storage
backend/services/vector_store - Catalog sync
backend/catalog/services/catalog_sync_service.py - Asset catalog
backend/catalog/services/asset_service.py - Asset repository
backend/catalog/repositories/asset_sql_repository.py - Asset model
backend/catalog/schemas/knowledge_asset.py
RAG assistant
- Retrieval service
backend/services/retrieval/retrieval_service.py - Retrieval request
backend/schemas/retrieval/retrieval_request.py - Retrieval strategies
backend/services/retrieval/strategies - Response generation
backend/engines/generation/generation_engine.py
Knowledge governance
- Review service
backend/services/knowledge_review/review_service.py - Review records
backend/schemas/review/knowledge_review.py - Review endpoints
backend/api/routes/review.py
Other components
- User
Connections 24
- User → SPA bootstrap: uses
README.md - SPA bootstrap → Product pages: renders
frontend/js/app.js - Product pages → API client: requests data
- API client → API router: calls API
- FastAPI app → API router: mounts
backend/main.py - API router → Chat endpoint: routes to
backend/api/router.py - API router → Document endpoints: routes to
backend/api/router.py - API router → Product endpoints: registers
backend/api/router.py - API router → Review endpoints: routes to
backend/api/router.py - Chat endpoint → Retrieval service: retrieves context
backend/api/routes/chat.py - Chat endpoint → Response generation: generates answer
backend/api/routes/chat.py - Retrieval service → Retrieval strategies: delegates
backend/services/retrieval/retrieval_service.py - Retrieval service → Retrieval request: accepts
backend/services/retrieval/retrieval_service.py - Document endpoints → Ingestion service: delegates
backend/api/routes/documents.py - Ingestion service → Document extraction: extracts text
backend/services/ingestion_service.py - Ingestion service → Document chunking: chunks text
backend/services/ingestion_service.py - Ingestion service → Embedding service: creates embeddings
backend/services/ingestion_service.py - Ingestion service → Vector storage: indexes chunks
backend/services/ingestion_service.py - Ingestion service → Catalog sync: syncs document
backend/services/ingestion_service.py - Catalog sync → Asset catalog: synchronizes assets
backend/catalog/services/catalog_sync_service.py - Asset catalog → Asset repository: persists assets
backend/catalog/services/asset_service.py - Asset repository → Asset model: maps records
backend/catalog/repositories/asset_sql_repository.py - Review endpoints → Review service: delegates
backend/api/routes/review.py - Review service → Review records: creates reviews
backend/services/knowledge_review/review_service.py