How jorge1150/sri_ia_multimodal works
SRI IA Multimodal is a tax-regulation assistant whose main workflow accepts text, voice, images, or video; coordinates optional query refinement and validation; retrieves normative passages and optionally tax-knowledge graph context; generates cited answers; and can synthesize speech. The graph preserves ingestion, GraphRAG, memory/guardrail, and evaluation capabilities documented in the README. Evidence is limited to the supplied excerpts, SOURCE INDEX references, and README; unshown wiring is omitted or marked unverified.
Main entry points: coordinator.py Query coordinator · graph_builder.py Graph builder · interface.py Gradio interface · app.py Application entry
Components 26
User experience
- Gradio interface
ui/interface.py - Application entry
app.py
Agent orchestration
- Query coordinator
agents/coordinator.py - Graph planner
agents/planner_agent.py - Query refiner
agents/query_refiner_agent.py - Query validator
agents/query_validator_agent.py - Query memories
agents/similarity_memory.py - Stage logging
agents/log_agent.py - Cited response generation
agents/response_agent.py
Knowledge retrieval
- Vector retrieval
agents/rag_agent.py - Hybrid retriever
services/hybrid_retriever.py - Chroma vector store
config.py - Document chunking
rag/chunker.py - Vector ingestion
rag/ingesta.py - Graph builder
graph/graph_builder.py - Entity extraction
graph/entity_extractor.py - Relation extraction
graph/relation_extractor.py - Tax knowledge graph
graph/graph_store.py - Graph retrieval
graph/graph_retriever.py
Multimodal I/O
- Speech recognition
agents/voice_agent.py - Image understanding
agents/vision_agent.py - Video processing
agents/video_agent.py - Speech synthesis
agents/tts_agent.py
Evaluation
- Benchmark formatting
services/benchmark_format.py - RAGAS evaluation
scripts/ragas_local.py
Other components
- User
Connections 31
- User → Gradio interface: submits query
- Gradio interface → Application entry: uses interface
app.py - Application entry → Query coordinator: initializes
app.py - Application entry → Gradio interface: launches
app.py - Query coordinator → Speech recognition: transcribes
agents/coordinator.py - Query coordinator → Image understanding: analyzes images
agents/coordinator.py - Query coordinator → Video processing: processes video
agents/coordinator.py - Video processing → Image understanding: uses
agents/video_agent.py - Query coordinator → Query refiner: refines query
agents/coordinator.py - Query coordinator → Query validator: validates query
agents/coordinator.py - Query validator → Vector retrieval: tests retrieval
agents/query_validator_agent.py - Query refiner → Query memories: uses examples
agents/query_refiner_agent.py - Query coordinator → Graph planner: plans retrieval
agents/coordinator.py - Query coordinator → Hybrid retriever: retrieves context
agents/coordinator.py - Hybrid retriever → Vector retrieval: retrieves passages
services/hybrid_retriever.py - Hybrid retriever → Graph retrieval: retrieves graph
services/hybrid_retriever.py - Vector retrieval → Chroma vector store: queries
agents/rag_agent.py - Query coordinator → Cited response generation: generates answer
agents/coordinator.py - Query coordinator → Speech synthesis: synthesizes answer
agents/coordinator.py - Vector ingestion → Document chunking: chunks documents
rag/ingesta.py - Vector ingestion → Chroma vector store: writes embeddings
rag/ingesta.py - Graph builder → Document chunking: reads chunks
graph/graph_builder.py - Graph builder → Entity extraction: extracts entities
graph/graph_builder.py - Graph builder → Relation extraction: extracts relations
graph/graph_builder.py - Graph builder → Tax knowledge graph: stores graph
graph/graph_builder.py - Graph retrieval → Entity extraction: detects query entities
graph/graph_retriever.py - Graph retrieval → Tax knowledge graph: queries graph
graph/graph_retriever.py - Tax knowledge graph → Relation extraction: uses relation types
graph/graph_store.py - Query coordinator → Stage logging: records stages
agents/coordinator.py - Gradio interface → Benchmark formatting: shows metrics
ui/interface.py - Benchmark formatting → RAGAS evaluation: formats evaluation