How muthukumar-selvarasu/video-rag-with-guardrails-evals works
This is a timestamp-aware video transcript RAG application. Users submit a question through the web interface; the API validates it, retrieves transcript passages, synthesizes a grounded answer, applies output checks, and returns timestamped results for display. A separate agent entry point provides a guarded retrieval workflow. The repository also includes transcript ingestion and indexing for preparing searchable data. The README documents UI and API capabilities not fully visible in the excerpts; edges based on those flows cite the README.
Main entry points: index.py FastAPI endpoints · index.html Web interface · router.py Guardrail router · pipeline.py Ingestion pipeline
Components 18
User experience
- Web interface
templates/index.html
Query and safeguards
- FastAPI endpoints
api/index.py - Input checks
src/guardrails/input_guard.py - Output checks
src/guardrails/output_guard.py - Guardrail router
src/guardrails/router.py - Answer synthesis
api/index.py
Transcript knowledge
- Hybrid transcript search
src/ingestion/search.py - Preindexed embeddings
data/preindexed_embeddings.json - Transcript parsing
src/ingestion/transcriber.py - Timestamp chunking
src/ingestion/chunker.py - Ingestion pipeline
src/ingestion/pipeline.py - Chroma indexing
src/ingestion/embedder.py - Chroma store
data/chroma_db - Preindex generation
src/ingestion/preindexer.py
Agent workflow
- Agent entry point
src/agent/main.py - Transcript search tool
src/agent/tools.py
Other components
- User
- LLM provider
Connections 22
- User → Web interface: asks questions
README.md - Web interface → FastAPI endpoints: sends requests
README.md - FastAPI endpoints → Input checks: checks query
api/index.py - FastAPI endpoints → Hybrid transcript search: retrieves passages
api/index.py - Hybrid transcript search → Preindexed embeddings: reads vectors
README.md - FastAPI endpoints → Answer synthesis: builds answer
api/index.py - Answer synthesis → LLM provider: requests synthesis
README.md - FastAPI endpoints → Output checks: checks response
README.md - FastAPI endpoints → Web interface: returns answer
README.md - Web interface → User: shows timestamps
README.md - FastAPI endpoints → Guardrail router: uses guarded flow
api/index.py - Guardrail router → Input checks: validates input
src/guardrails/router.py - Guardrail router → Output checks: validates output
src/guardrails/router.py - Ingestion pipeline → Transcript parsing: loads transcripts
src/ingestion/pipeline.py - Ingestion pipeline → Timestamp chunking: chunks transcripts
src/ingestion/pipeline.py - Ingestion pipeline → Chroma indexing: indexes chunks
src/ingestion/pipeline.py - Chroma indexing → Chroma store: writes chunks
src/ingestion/embedder.py - Preindex generation → Timestamp chunking: uses chunking
src/ingestion/preindexer.py - Agent entry point → Guardrail router: guards execution
src/agent/main.py - Agent entry point → Transcript search tool: registers tool
src/agent/main.py - Transcript search tool → Hybrid transcript search: queries transcripts
src/agent/tools.py - Agent entry point → LLM provider: configures agent