A comprehensive Retrieval-Augmented Generation (RAG) system for intelligent document-based question answering.
This project implements a production-ready RAG system that combines document processing, vector search, and large language models to provide accurate, context-aware answers to questions about uploaded documents.
- Document Processing: Support for multiple document formats (PDF, TXT, etc.)
- Vector Search: Efficient similarity search using ChromaDB
- LLM Integration: Flexible integration with OpenAI, Anthropic, and other providers
- Advanced Retrieval: Query classification and optimized retrieval strategies
- Web Interface: User-friendly UI for document upload and Q&A
- REST API: Comprehensive API for programmatic access
- Monitoring: Built-in telemetry and performance tracking
- Evaluation: Integrated evaluation framework with RAGAS metrics
rag_system/
├── core/ # Core RAG components and orchestration
├── api/ # REST API and web server
├── services/ # Document processing, vector ops, LLM services
├── monitoring/ # Telemetry and monitoring
├── evaluation/ # Evaluation framework
├── ui/ # Web interface
├── utils/ # Utilities and helpers
└── tests/ # Test suite
- Clone the repository:
git clone <repository-url>
cd agent-to-agent-communication- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
export OPENAI_API_KEY="your-api-key"- Start the RAG server:
python -m rag_system.api.web_server-
Open http://localhost:8000 in your browser
-
Upload documents and start asking questions!
python -m pytest rag_system/tests/debug_rag_flow.py- Debug the complete RAG pipelinedebug_vector_search.py- Debug vector search operationsdebug_retrieval.py- Debug document retrieval
The system is optimized for:
- Fast document processing and indexing
- Efficient vector similarity search
- Response caching for repeated queries
- Batch processing capabilities
- Concurrent request handling
MIT License - see LICENSE file for details.