GitHub Repository: https://github.com/abhinavbatra06/Gmail-Assistant-
Gmail RAG Assistant with intelligent query routing, hybrid retrieval, and evaluation logging.
NoticeBoard RAG is a modular retrieval-augmented generation (RAG) system that enables natural language querying over institutional email. The architecture integrates Gmail ingestion, multimodal document processing via Docling, recursive chunking, hybrid retrieval (dense + BM25), and grounded generation with GPT-4o-mini.
Institutional email is one of the richest sources of unstructured data. With modern GenAI models, we can extract precise answers to natural language queries—provided we have high-quality retrieval. However, most AI-powered email tools are closed systems with no visibility into their retrieval or chunking logic. NoticeBoard RAG provides full control over the entire pipeline—chunking strategies, embedding models, retrieval weights, and ranking—enabling experimentation and optimization for academic email workflows.
For detailed installation and setup instructions, see TUTORIAL.md.
- Install dependencies:
pip install -r requirements.txt - Set up environment: Create
.envwithOPENAI_API_KEY - Configure Gmail OAuth: Add
gmail_creds.jsontocreds/folder - Run pipeline: Ingest → Process → Chunk → Embed → Query
- Intent-aware routing: Directs calendar queries to structured event database
- Hybrid retrieval: Combines dense embeddings with BM25 keyword search
- Query optimization: LLM-based rewriting and HyDE-generated hypothetical documents
- Post-retrieval refinement: LLM-based reranking and Small2Big context expansion
- Temporal filtering: Prioritizes recent and upcoming events
- Multimodal processing: Handles PDFs, Word docs, images, and calendar files
- TUTORIAL.md: Complete step-by-step setup and usage guide
- EXPERIMENTS.md: Experimental setup, results, and analysis
- config.yaml: Configuration file with all system parameters
The system includes a comprehensive evaluation framework to assess performance across different query types and scenarios.
- Query Categories: Tests cover vague/ambiguous queries, typos/casual language, multi-intent/complex queries, implicit/contextual queries, and negation/edge cases
- Automated Testing: Batch query runner executes all test queries and logs results
- Results Export: Evaluation logs are exported to CSV format for analysis
- Manual Accuracy Scoring: Results are manually evaluated for accuracy (0/1) and analyzed using pivot tables
# Run all test queries
python Eval/run_test_queries.py
# Export results to CSV
python Eval/export_eval_logs_csv.pyResults are saved to Eval/eval_logs.csv. For detailed experimental setup and results, see EXPERIMENTS.md and TUTORIAL.md.
- Python 3.10+
- OpenAI API key
- Google Cloud Project with Gmail API enabled
- Virtual environment (recommended)
[Add your license here]