Brejesh Balakrishnan
All projects

May 2026 GenAI / RAG / LangGraph / LLM / Agentic AI / NLP

RAG Agent Workbench.

Agentic RAG backend: 8-node LangGraph pipeline with corrective retrieval, faithfulness verification, and SSE streaming.

Overview

A production retrieval-augmented generation backend built as an 8-node LangGraph pipeline with conditional routing: query normalization → multi-turn contextualization → dense retrieval (Pinecone, llama-text-embed-v2) → bounded corrective retrieval (CRAG) → web-fallback routing (Tavily) → grounded generation (Groq Llama 3.1) → faithfulness verification. A deterministic retrieval-evaluation harness (recall@k, MRR, nDCG@k over a hand-labeled golden set) drove real decisions — including measuring a hosted reranker net-negative (nDCG@3 −0.057, +435 ms) and disabling it on the data.

Highlights

  • 8-node agentic LangGraph pipeline with conditional routing and bounded CRAG loop (provably non-runaway iteration cap)
  • Deterministic retrieval-eval harness (recall@k, MRR, nDCG@k) on a hand-labeled golden set — used to A/B-test and reject a hosted reranker on data
  • Two-threshold retrieval gate with deterministic abstention (the LLM is never asked to answer from empty context) + indirect prompt-injection hardening
  • Per-request token/cost accounting, Prometheus latency histograms, true SSE token streaming
  • 343 tests, CI from a hash-pinned lockfile
  • deployed on Docker / Hugging Face Spaces + Streamlit Cloud

Stack

Python · FastAPI · LangGraph · Pinecone · Groq · Tavily · Prometheus · Docker · Hugging Face Spaces · Streamlit