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

Institutions

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Moksh AI v3.0: An Agentic Hybrid Retrieval-Augmented Generation System with Explicit Query Routing and Dual-LLM Architecture

Mritunjay Sharma
Zenodo (CERN European Organization for Nuclear Research)
Information Retrieval and Search Behavior
preprint

Moksh AI v3.0: An Agentic Hybrid Retrieval-Augmented Generation System with Explicit Query Routing and Dual-LLM Architecture

Mritunjay Sharma
preprint en

Abstract

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.

Zenodo (CERN European Organization for Nuclear Research)
Huntsman Cancer Institute (US)
Peace, Justice and strong institutions
Information Retrieval and Search Behavior
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.