Moraldeep Sachdeo

Moraldeep Sachdeo

Product Manager
Engineering Program Manager

Mountain View, CA
moraldeepsingh@berkeley.edu


← Back to Vibe-Coding

RAG Agent with Database Routing

A routed retrieval system that decides which knowledge base should answer a question instead of forcing every query through the same index.

RAG Routing Workflow
Route first, retrieve second, and fall back to the web only when the indexed sources are weak
This project demonstrates a more production-minded RAG pattern: separate corpora for product, support, and finance content, confidence-aware routing across them, and a web-research fallback when the internal collections do not contain strong evidence.

Overview

RAG Agent with Database Routing is built around a simple idea: not every question belongs in the same retrieval bucket. Instead of dumping all documents into one vector store and hoping retrieval sorts it out, the system keeps multiple specialized collections and decides which one should handle the query before answer generation begins.

What The Product Does

Implementation Details

Why It Matters

The value here is architectural, not just visual. It demonstrates that retrieval quality is partly a routing problem. By separating product, support, and finance knowledge and using a staged routing strategy, the system reduces the chances of semantically adjacent but operationally wrong documents steering the answer.

Design Decisions

Role and Focus

Role: Solo builder focused on multi-corpus retrieval architecture, routing logic, and fallback design.

Tech Stack: Streamlit, LangChain, LangGraph, Agno, Qdrant, OpenAI embeddings.

Category: Retrieval-augmented generation, query routing, knowledge systems, search architecture.

Positioning: Think "intent router for RAG," rather than a single-index document chatbot.

Thumbnail Alt Text

RAG routing interface showing multiple specialized document databases and a question-answer flow that chooses the best collection before retrieval.