The Challenge: Hallucinations and Slow Ingestion in LLMs
Generic LLM wrappers frequently hallucinate company facts and require non-technical teams to spend hours converting knowledge bases into complex embeddings. Furthermore, simple vector similarity search frequently fails when users ask questions requiring keyword precision (such as exact pricing tiers or product model numbers).
The founders of EmbedRAG needed an enterprise-grade platform capable of parsing raw PDF manuals, Notion exports, and public URLs in under 2 minutes, while providing multi-step agent reasoning to cross-examine source citations before delivering answers.
Technical Architecture: LangGraph Multi-Node State Graph
Instead of a naive single-shot prompt, we designed a cyclical multi-agent graph using LangGraph.
When a user asks a question, the query passes through a query rewriting node, queries a hybrid MongoDB Vector Search + BM25 keyword index, and grades each retrieved document for relevance. If retrieved context is insufficient, the agent autonomously reformulates its search before drafting an answer with verbatim source citations.
Key Systems Engineered
-
Instant 2-Minute Ingestion Pipeline:
Parallel background workers chunk, tokenize, and generate vector embeddings with automated deduplication.
-
Interactive Lead Capture Modals:
Customizable lead forms embedded seamlessly into chat bubbles, transmitting visitor inquiries to webhooks.
-
One-Line Script Embed:
Zero-dependency vanilla JavaScript widget that loads in 12ms and runs in isolation on any client website.