Build a document-grounded RAG support chatbot with LangChain, Qdrant and OpenAI for a 500-PDF client
An AI engineer describes a retrieval-augmented chatbot deployed for one client with over 500 PDFs, with the chunking and retrieval choices, and reports 94% answer accuracy against 61% for plain GPT-4.
Evidence: The author reports this. We have not checked it beyond reading the source.
The business problem
A business with a large body of documents needs a support or knowledge chatbot that answers from its own files rather than making things up.
What was tried
Documents are loaded and split into 1,000-character chunks with 200 overlap, embedded with OpenAI's small embedding model and stored in Qdrant. Each question retrieves the top four chunks by similarity, which are placed in the prompt for the model (gpt-4o-mini in the code). A FastAPI chat endpoint keeps the last five exchanges, and the post suggests metadata filtering and an optional reranker.
What was reported (positive)
The author reports 94% answer accuracy versus 61% for plain GPT-4, hallucinations under 2% versus 28% without retrieval, and responses in under two seconds, and says satisfaction improved without figures.
Limitations
How accuracy and hallucination were measured (dataset, sample, grading) is not stated, and the client, costs and failure cases are not described. The code sample is not production-ready: it uses one global memory object so conversations are not separated per user, allows all origins in CORS and has no authentication or error handling, and some classes it uses are deprecated. The year is not shown.
What you need
Python, FastAPI, LangChain, Qdrant, an OpenAI key and the client's documents. Costs are not stated.
Sources
- DEV Community (Darshit Radadiya) ↗ Firsthand write-up, publication date unknown
Source published: unknown. Last reviewed here: October 11, 2026. Spot a mistake? Tell us.
Tools in this workflow
- OpenAI API: Embeddings and answersTry OpenAI API
- Qdrant: Vector storeTry Qdrant
- LangChain: Retrieval pipelineTry LangChain
Related workflows
Roll out OpenClaw for inbox triage, meeting notes and CRM updates in phases with approvals and isolation
An infrastructure vendor's guide sets out business uses for OpenClaw and a phased rollout: pilot a low-risk workflow, add guardrails and approvals, then scale once value and safety are shown.
Measure true resolution, not just deflection, for an AI support agent with an escalation policy
A small open-source evaluation shows a naive support agent deflecting every ticket while resolving about half, and a policy-gated agent that deflects fewer but resolves what it handles.
Draft help-centre articles automatically from resolved tickets and keep a human in charge of publishing
A merged helpdesk change that, when a ticket is resolved, asks an AI whether other customers are likely to ask the same thing and writes a draft article for managers to review if none exists.
Draft help-centre-cited support replies and propose refunds that a person must approve
An open-source support workbench classifies tickets into three tiers, drafts replies that cite help-centre articles, reads billing data in read-only test mode, and only proposes refunds that need a named approver.