Fix a knowledge assistant that answers confidently and wrong

Chunking, retrieval threshold, citations and refusals: the four dials that matter.

Any RAG bot that hallucinates, or that says 'I don't know' too often.ragretrievalknowledge
ChatGPT Claude
Diagnose and fix my knowledge assistant (RAG). You are an engineer who has tuned retrieval systems in production.

What it answers questions about: <the documents, how many, what format>
How documents are chunked and embedded today: <chunk size, overlap, embedding model, vector store>
How many chunks are retrieved and how they're passed to the model: <top-k, any threshold>
The answer prompt: <paste>
Five failing examples: for each, the question, the chunks that were retrieved, the answer it gave, and what it should have said: <paste>

Do this:
1. For each failing example: was the failure in retrieval (right chunk not retrieved), in generation (chunk present but answer wrong), or in refusal (should have said it doesn't know)? Show your reasoning from the chunks.
2. Chunking: what to change and why, with a specific recommendation for size, overlap and whether to split on headings.
3. Retrieval: top-k, a similarity threshold below which the model is not called, metadata filters, and whether hybrid (keyword + vector) search would help here.
4. The answer prompt, rewritten: answer only from excerpts, cite the source per claim, exact refusal wording, language handling.
5. A regression set: 15 questions (10 answerable, 5 not) with expected outcomes, to run after every change.
6. The one change to make first, and how I'll know it worked.

Replace every <placeholder> with your own details before you send it.

How to use it

  1. 1Paste real failing questions with the retrieved chunks. Without the chunks, nobody can tell whether retrieval or generation failed.
  2. 2Fix retrieval before touching the answer prompt. Most 'hallucinations' are retrieval misses.
  3. 3Add the refusal threshold and test it with off-topic questions.

Reviewed 2026-09-20

Share this prompt

WhatsApp

Sharing a prompt is the easiest way to help another builder today.

Good prompts are a skill. Proof of what you build is a career.

Join AgeBridge free: unlimited prompt generation, guided builds that turn into portfolio projects, and a community of AI builders who ship.

  • Unlimited prompt generator
  • Guided builds that become proof on your profile
  • A public profile businesses can find

Prompt text is written by AgeBridge and free to use. Results depend on the model and on the details you provide.