How sainitesh10/vision-rag works
Enterprise Vision RAG lets users upload PDFs, then ask questions answered from retrieved document text and visual content. The backend saves uploads, indexes page text and visual descriptions, routes chat queries, searches Pinecone, and generates responses; the UI also presents chat and PDF viewing. The README documents streaming and multimodal capabilities, but the excerpts do not show frontend request wiring or the full chat orchestration, so those links are marked unverified. The graph reflects sampled calls and documented capabilities, not unsampled implementation details.
Main entry points: main.py FastAPI endpoints · engine.py RAG engine · page.tsx Web application · services.py Answer service
Components 14
User interface
- Web application
ui/src/app/page.tsx - Chat interface
ui/src/components/chat/chat-interface.tsx - PDF viewer
ui/src/components/pdf/pdf-viewer.tsx
API and orchestration
- FastAPI endpoints
app/main.py - PDF storage
app/storage.py
Document indexing and retrieval
- RAG engine
app/engine.py - Text and vision extraction
app/ocr.py - Page chunking
app/chunking.py - Pinecone vectors
Answer generation and state
- Query router
app/router.py - Chat memory
app/memory.py - Answer service
app/services.py
Other components
- User
- Groq API
Connections 16
- User → Web application: uses
README.md - Web application → Chat interface: presents
- Web application → PDF viewer: presents
- Chat interface → FastAPI endpoints: sends chat
- PDF viewer → FastAPI endpoints: requests PDF
- FastAPI endpoints → PDF storage: saves and reads
app/main.py - FastAPI endpoints → RAG engine: indexes and searches
app/main.py - FastAPI endpoints → Query router: routes queries
app/main.py - FastAPI endpoints → Chat memory: reads and updates
app/main.py - FastAPI endpoints → Answer service: generates answers
app/main.py - RAG engine → Text and vision extraction: extracts page content
app/engine.py - RAG engine → Page chunking: chunks page content
app/engine.py - RAG engine → Pinecone vectors: writes and queries
app/engine.py - Text and vision extraction → Groq API: requests visual analysis
app/ocr.py - Answer service → Groq API: requests answers
app/services.py - Answer service → RAG engine: gets page context
app/services.py