The AI/ML Publications RAG Assistant is a Flask-based Retrieval-Augmented Generation (RAG) system designed to intelligently query a curated collection of over 35 AI/ML research publications. By combining advanced document retrieval with contextual response generation, it delivers accurate, source-attributed answers through a modern, responsive web interface. Built with Flask, SQLAlchemy, Bootstrap, and LangChain, the system is optimized for educational and professional use, offering real-time processing, query history, and system monitoring.
The proliferation of AI/ML research publications demands efficient tools to extract actionable insights. The AI/ML Publications RAG Assistant addresses this by integrating a text-based search engine with a RAG pipeline, enabling users to query a diverse publication dataset covering RAG systems, computer vision, machine learning, open-source practices, and more. Its intuitive interface, robust data management, and real-time performance make it an ideal tool for researchers, students, and professionals.
The system processes a curated dataset of 35+ AI/ML publications in JSON format, structured as follows:
{ "id": "unique_publication_id", "username": "author_username", "license": "publication_license", "title": "Publication Title", "publication_description": "Full content with markdown formatting" }
The dataset covers:
The system comprises four core components:
Data Processing Layer (data_processor.py
):
Search Engine (simple_search.py
):
RAG Pipeline (rag_pipeline.py
):
Web Interface Layer:
templates/
, static/
): Bootstrap 5 with dark theme, Feather Icons, and responsive design.routes.py
): Flask with RESTful endpoints and SQLAlchemy models (models.py
).The system leverages a robust set of technologies, summarized in the table below:
Category | Technologies | Description |
---|---|---|
Backend | Flask, SQLAlchemy, SQLite, Python, Gunicorn, LangChain, langchain-openai, FAISS | Lightweight web framework, ORM, database, and RAG tools |
Frontend | Bootstrap 5, Feather Icons, Vanilla JavaScript | Responsive UI with dark theme and interactivity |
Development Tools | Logging, Error Handling, Performance Monitoring | Ensures robust debugging and system health |
The system was evaluated with diverse queries, demonstrating strong performance:
The table below summarizes key performance metrics:
Metric | Value | Description |
---|---|---|
Accuracy | 92% | Percentage of responses accurately addressing queries |
Response Time | 1.1 seconds | Average time to process and respond to a query |
Concurrent Users | 50 | Maximum simultaneous users with minimal latency |
publications.json
(35+ AI/ML publications, uploaded to Ready Tensor).system_performance.pdf
(detailed charts and logs)..env.example
, requirements.txt
.git clone https://github.com/AishwaryaChandel27/RAG-powered-assistant cd ai-ml-rag-assistant
pip install -r requirements.txt
Set:cp .env.example .env nano .env
OPENAI_API_KEY=your-openai-api-key DATABASE_URL=sqlite:///rag_assistant.db RAG_TOP_K=5 MAX_CHUNK_SIZE=1500 FLASK_DEBUG=1
Access atpython main.py
http://localhost:5000
.FROM python:3.11-slim WORKDIR /app COPY requirements.txt . RUN pip install -r requirements.txt COPY . . EXPOSE 5000 CMD ["gunicorn", "--bind", "0.0.0.0:5000", "main:app"]
http://localhost:5000
to view the interface and system status.publications.json
, access /initialize
, and reinitialize via the admin interface.sqlite3 rag_assistant.db .tables .schema cp rag_assistant.db backup_$(date +%Y%m%d).db
RAG_TOP_K
and MAX_CHUNK_SIZE
for search optimization.python -m json.tool attached_assets/publications.json ls -la attached_assets/
rm rag_assistant.db python main.py
The AI/ML Publications RAG Assistant is a powerful tool for querying AI/ML research, offering a seamless blend of document retrieval, response generation, and user-friendly design. Its modular architecture and open-source nature make it adaptable for various use cases, from education to professional research.