Enterprise-grade Retrieval-Augmented Generation (RAG) platform for PDF and DOCX ingestion, semantic search, and explainable answers with citations.
- PDF and DOCX ingestion
- Semantic embeddings with FAISS vector search
- Contextual LLM answers with citations
- Multi-document querying
- Async FastAPI endpoints
- Modular, production-ready architecture
User Query -> FastAPI API Layer -> Embedding Engine -> Vector Search (FAISS) -> Retrieval Layer -> Prompt Construction -> LLM Inference -> Structured JSON Response
- app/ - application initialization, settings, logging, server
- api/ - REST API endpoints
- embeddings/ - embedding generation
- retrieval/ - semantic search and LLM logic
- chunking/ - preprocessing and chunking
- frontend/ - UI layer (Streamlit or React)
- tests/ - test suite
- docs/ - documentation and diagrams
-
Create a virtual environment and install dependencies:
pip install -r requirements.txt
-
Configure environment variables in a .env file:
GROQ_KEYS=your_key_1,your_key_2 EMBEDDING_MODEL=all-MiniLM-L6-v2
-
Start the API server:
uvicorn main:app --reload
- POST /upload
- POST /query
- GET /health
- DELETE /document/{id}
{ "query": "What is covered under policy section 3?", "answer": "...", "sources": [{"doc_id": "...", "chunk_id": "...", "page": "2"}], "retrieved_chunks": [{"text": "...", "score": 0.82}], "confidence_score": 0.91 }
Add UI screenshots in docs/.
Add sample responses and evaluation results in docs/.
- Hybrid retrieval (BM25 + embeddings)
- Reranking models
- Streaming responses
- Authentication and authorization
- Metadata filters and ACLs
"# LLM-Powered-Intelligent-Query-Retrieval-System"