How aryaa-pawar/rtc-insight-engine works
RTC Insight Engine combines a report-processing pipeline, an AI question-answering workflow, and analytics dashboards. Users ask questions through the FastAPI app; its handler calls the RAG engine, which searches report chunks, builds source context, and can use Gemini to generate an answer. Separately, report PDFs are extracted, chunked, and processed into analytics datasets. The README documents the pipeline and dashboard capabilities; several pipeline stages and the dashboard implementation are not shown in source excerpts, so those links rely on README evidence.
Main entry points: processed Master dataset · rag_engine.py RAG engine · main.py Web app · index.html Question page
Components 18
Question Interface
- Web app
app/main.py - Question page
app/templates/index.html
AI Assistant
- RAG engine
chatbot/rag_engine.py - TF-IDF retrieval
chatbot/rag_engine.py - Answer generation
chatbot/rag_engine.py
Data Pipeline
- RTC report PDFs
data/raw_pdfs - PDF extraction
scripts/pdf_extractor.py - Master dataset
data/processed - Metric cleaning
scripts/clean_and_normalize.py - Metrics extraction
scripts/extract_named_metrics.py - Text chunking
scripts/generate_chunks.py - Report chunks
data/processed - RTC facts
data/processed
Analytics
- Looker Studio
- Analytics datasets
data/processed
Other components
- RTC users
- Gemini
- MySQL
Connections 22
- RTC users → Question page: ask questions
README.md - Question page → Web app: submits question
- Web app → RAG engine: calls
app/main.py - RAG engine → TF-IDF retrieval: retrieves chunks
chatbot/rag_engine.py - TF-IDF retrieval → Report chunks: reads
chatbot/rag_engine.py - RAG engine → Answer generation: builds answer
chatbot/rag_engine.py - Answer generation → Gemini: generates with
chatbot/rag_engine.py - Answer generation → RTC users: returns sourced answer
README.md - RTC report PDFs → PDF extraction: extracts text
README.md - PDF extraction → Master dataset: produces
README.md - Master dataset → Metric cleaning: cleans metrics
README.md - Master dataset → Metrics extraction: extracts metrics
README.md - Master dataset → Text chunking: creates chunks
README.md - Text chunking → Report chunks: writes
README.md - Master dataset → RTC facts: derives facts
- Report chunks → TF-IDF retrieval: indexes for search
README.md - Metric cleaning → Analytics datasets: prepares datasets
README.md - Metrics extraction → Analytics datasets: produces metrics
README.md - Analytics datasets → Looker Studio: powers dashboards
README.md - Master dataset → MySQL: loads reports
- Report chunks → MySQL: loads chunks
- Analytics datasets → MySQL: loads metrics