Moksh AI v3.0: An Agentic Hybrid Retrieval-Augmented Generation System with Explicit Query Routing and Dual-LLM Architecture
Retrieval-Augmented Generation (RAG) systems have emerged as a widely adopted approach to augmenting large language models with external knowledge, yet most deployed implementations rely on static retrieval pipelines that apply a single retrieval strategy regardless of query type. This paper presents Moksh AI v3.0, a locally-running hybrid agentic RAG system that addresses this limitation through three primary contributions. First, an explicit agentic decision layer performs per-query analysis using temporal keyword detection, personal keyword detection, and FAISS L2 distance confidence thresholds to route each query to the optimal retrieval mode among MEMORY ONLY, WEB ONLY, and HYBRID. Second, a dualLLM architecture combines local inference via Ollama Llama 3 with cloud fallback via Google Gemini 2.0 Flash, ensuring zero-downtime operation irrespective of local hardware availability. Third, an automatic conversational memory extraction mechanism continuously updates a FAISS vector store from conversation context using a background thread without user intervention. Empirical evaluation on a 25-question benchmark spanning five categories demonstrates that Moksh AI v3.0 achieves 92.0% overall accuracy compared to 64.0% for a nonagentic baseline, a gain of 28 percentage points, with particularly strong improvements in general knowledge (+60 pp) and technical knowledge (+33.3 pp). These results confirm that explicit query routing substantially improves retrieval effectiveness at the cost of additional latency.
Authors
- Mritunjay Sharma
Institutions
- Huntsman Cancer Institute (US)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-05-29
- DOI
- https://doi.org/10.5281/zenodo.20444126
- Primary Topic
- Information Retrieval and Search Behavior
- Type
- preprint