How vedanshimesvaniya/antarkosh works
Antarkosh combines document RAG and live-database Text-to-SQL behind a unified query experience. Users upload documents for staged extraction, embedding, and indexing, or ask questions that are routed through document retrieval and/or SQL generation, validation, and execution before results are returned. The React UI communicates with FastAPI; shared provider routing, safety controls, budgets, and telemetry support the pipelines. The README documents the major product flows; sampled source and the SOURCE INDEX support the specific module links shown. Some unsampled implementation details are therefore represented at subsystem level.
Main entry points: query.py Query orchestrator · ingestion.py Ingestion orchestrator · main.py FastAPI application · s12b_sql_retrieval.py SQL generation and retrieval
Components 21
User Interface
- React application
Antarkosh_UI/src/App.jsx - UI state and API
Antarkosh_UI/src/store/store.js
Application API
- FastAPI application
src/main.py - Query endpoint
src/api/query.py - Upload endpoint
src/api/upload.py
Knowledge Pipelines
- Query orchestrator
src/pipeline/query.py - Ingestion orchestrator
src/pipeline/ingestion.py - Document processing
src/stages - Dense and sparse embeddings
src/stages/s10_embeddings.py - Hybrid vector index
src/stages/s11_vector_store.py - RAG retrieval
src/stages/s12_s13_s14_retrieval.py
Text-to-SQL
- SQL generation and retrieval
src/stages/s12b_sql_retrieval.py - Live relational database
Runtime Services
- Provider routing
src/core/provider_client.py - Query safety guards
src/guards - Query token budget
src/utils/query_budget.py - Tracing and telemetry
src/utils/telemetry.py - Ingestion registry
src/core/ingestion_registry.py
Other components
- User
- LLM and vision providers
- Qdrant Cloud
Connections 24
- User → React application: asks or uploads
README.md - React application → UI state and API: uses state
Antarkosh_UI/src/App.jsx - UI state and API → FastAPI application: calls API
- FastAPI application → Query endpoint: routes queries
src/main.py - FastAPI application → Upload endpoint: routes uploads
src/main.py - Query endpoint → Query orchestrator: calls
src/api/query.py - Upload endpoint → Ingestion orchestrator: starts ingestion
README.md - Ingestion orchestrator → Document processing: runs stages
src/pipeline/ingestion.py - Ingestion orchestrator → Dense and sparse embeddings: embeds chunks
src/pipeline/ingestion.py - Ingestion orchestrator → Hybrid vector index: indexes chunks
src/pipeline/ingestion.py - Ingestion orchestrator → Ingestion registry: checks registry
src/pipeline/ingestion.py - Query orchestrator → Dense and sparse embeddings: embeds query
src/pipeline/query.py - Query orchestrator → RAG retrieval: retrieves documents
src/pipeline/query.py - Query orchestrator → SQL generation and retrieval: dispatches SQL
src/pipeline/query.py - RAG retrieval → Hybrid vector index: searches index
src/stages/s12_s13_s14_retrieval.py - SQL generation and retrieval → Live relational database: executes SQL
README.md - Ingestion orchestrator → Provider routing: routes vision tasks
src/pipeline/ingestion.py - Query orchestrator → Provider routing: routes generation
src/pipeline/query.py - Provider routing → LLM and vision providers: calls providers
src/core/provider_client.py - Dense and sparse embeddings → Qdrant Cloud: provides vectors
README.md - Hybrid vector index → Qdrant Cloud: reads and writes
README.md - SQL generation and retrieval → Query safety guards: validates queries
src/stages/s12b_sql_retrieval.py - Query orchestrator → Query token budget: limits query use
src/pipeline/query.py - Query orchestrator → Tracing and telemetry: records execution
src/pipeline/query.py