How eitan-djavarov/ragent works
Tech-Doc-Intelligence is an incident-investigation platform: users create or upload incident material, then ask questions and receive structured, cited analysis or SQL-backed metrics. The Streamlit UI calls the .NET API, which persists incident records and proxies ingestion and analysis to the AI service. AI ingestion chunks documents and indexes them; query orchestration rewrites and routes questions, retrieves and expands context, synthesizes answers, and checks grounding. The README documents these capabilities; source excerpts are partial, so uncertain internal wiring is omitted.
Main entry points: orchestrator.py Agent orchestrator · pipeline.py RAG pipeline · client.py HTTP/SSE client · main.py Streamlit workspace
Components 27
Investigation UI
- Streamlit workspace
frontend-ui/main.py - Incident forms
frontend-ui/components/incident_form.py - Analysis views
frontend-ui/components/analysis_view.py - Analytics and documents
frontend-ui/components/data_tables.py - HTTP/SSE client
frontend-ui/api/client.py
Backend API
- Incident endpoints
backend-core/Controllers/IncidentsController.cs - Incident service
backend-core/Services/IncidentService.cs - AI service client
backend-core/Clients/AiServiceClient.cs
Document Ingestion
- File ingestion
ai-service/app/rag/file_ingestion.py - Document parsing
ai-service/app/rag/document_parser.py - Hierarchical chunking
ai-service/app/ingestion/hierarchical_chunker.py - Qdrant indexing
ai-service/app/ingestion/qdrant_indexer.py
AI Analysis
- AI v1 endpoints
ai-service/app/api/v1/endpoints.py - Agent orchestrator
ai-service/app/agent/orchestrator.py - Query rewriting
ai-service/app/agent/query_rewriter.py - RAG pipeline
ai-service/app/rag/pipeline.py - Hybrid retrieval
ai-service/app/retrieval/hybrid_search.py - Parent expansion
ai-service/app/retrieval/parent_expansion.py - Read-only SQL tool
ai-service/app/agent/sql_tool.py - Answer synthesis
ai-service/app/rag/llm_synthesis.py - Grounding guard
ai-service/app/agent/grounding_guard.py - Citation indexing
ai-service/app/citations/indexing.py
Stores and Providers
- PostgreSQL incidents
backend-core/Data/AppDbContext.cs - Qdrant vectors
- Redis cache and sessions
Other components
- Investigator
- OpenAI / Ollama
Connections 30
- Investigator → Streamlit workspace: uses
- Streamlit workspace → Incident forms: renders
- Streamlit workspace → Analytics and documents: renders
- Incident forms → HTTP/SSE client: submits
- Analytics and documents → HTTP/SSE client: requests
- HTTP/SSE client → Incident endpoints: HTTP / SSE
- Incident endpoints → Incident service: delegates
- Incident endpoints → AI service client: proxies AI
- Incident service → PostgreSQL incidents: reads / writes
- Incident service → AI service client: ingests / deletes
- AI service client → AI v1 endpoints: HTTP calls
- AI v1 endpoints → File ingestion: dispatches uploads
- File ingestion → Document parsing: parses files
- File ingestion → Hierarchical chunking: chunks content
- Hierarchical chunking → Qdrant indexing: creates chunks
- Qdrant indexing → Qdrant vectors: writes vectors
- AI v1 endpoints → Agent orchestrator: dispatches queries
- Agent orchestrator → Query rewriting: rewrites query
- Agent orchestrator → RAG pipeline: runs retrieval
- Agent orchestrator → Read-only SQL tool: routes SQL
- Agent orchestrator → Redis cache and sessions: uses cache / memory
- RAG pipeline → Hybrid retrieval: retrieves hits
- Hybrid retrieval → Qdrant vectors: dense search
- Hybrid retrieval → Parent expansion: expands parents
- RAG pipeline → Answer synthesis: generates analysis
- RAG pipeline → Grounding guard: checks grounding
- RAG pipeline → Citation indexing: indexes citations
- Answer synthesis → OpenAI / Ollama: completes prompt
- Query rewriting → OpenAI / Ollama: rewrites prompt
- HTTP/SSE client → Analysis views: returns results