Abstract

Traditional RAG pipelines usually work deterministically by using only static vector search[cite: 1]. Because of this, vocabulary mismatches can occur when searching for exact words or technical keywords, and the agent may be unable to verify context[cite: 1].

In this research document, I explain the complete details of the Agentic Hybrid RAG architecture I engineered[cite: 1]. It combines dense semantic search (FAISS IndexFlatIP with L2-normalized embeddings) and exact keyword search (BM25Okapi), and operates through an autonomous LLM agent using the smolagents framework[cite: 1]. It also describes in detail how I overcame issues encountered when running the model locally on CPU, such as Python sandbox import errors, extreme CPU time latency (>213 seconds per step), and model hallucinations, by using a cloud model (Qwen2.5-72B-Instruct) and dynamic score normalization ($\alpha=0.7$), along with the benchmark results[cite: 1].

Keywords: Agentic AI, Retrieval-Augmented Generation (RAG), Hybrid Search, FAISS, BM25, Smolagents, Knowledge Grounding, Score Normalization[cite: 1].

1. Introduction & Aim