Skip to content
All work
llm & agents

Agentic & Strictly-Grounded RAG

HawkEyes · AI-Agent_MongoDB · HE-Sherlock · 2026

A self-correcting Planner→Executor→Critic agent over MongoDB, plus strict-grounding RAG over Bangla PDFs.

LangGraphMongoDB Atlas Vector SearchFAISSsentence-transformersSSE
Agentic & Strictly-Grounded RAG — overview
P→E→C
self-correcting agent loop
SSE
streaming + full observability
bn+en
low-resource grounding

Problem

Answer enterprise data questions grounded in a real database — reliably, without hallucination — and do the same over Bangla PDF documents where the model must refuse when the answer isn't in context.

Approach

  • 1Built a Planner→Executor→Critic→Memory agent loop that generates MongoDB queries and vector searches, evaluates groundedness, and retries within bounds.
  • 2Added SSE streaming, pluggable embeddings, and full observability (structured logs + feedback capture).
  • 3Companion HE-Sherlock pipeline: PyMuPDF + Tesseract (ben+eng) OCR → FAISS index → Gemini answering under a strict 'answer only from context' prompt that refuses (in Bangla) when the answer is absent.
  • 4Simpler sibling (mongoRAG) provides a clean, readable E5-embedding + vector-retrieval baseline.

Results

  • A complete agentic-RAG reference: query generation, groundedness verification, bounded retries, and observability.
  • HE-Sherlock delivers production RAG on a low-resource language end to end, with explicit refusal behavior (22 commits).