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
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
- 1Paste real failing questions with the retrieved chunks. Without the chunks, nobody can tell whether retrieval or generation failed.
- 2Fix retrieval before touching the answer prompt. Most 'hallucinations' are retrieval misses.
- 3Add the refusal threshold and test it with off-topic questions.
Reviewed 2026-09-20
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
Related prompts
Automations & Agents
Design an automation before opening n8n
Trigger, steps, data shape, failure handling. On one page, before you drag a node.
Help me design an automation before I build it. You are an automation engineer who has seen too many workflows break silently. What should…
Open prompt
Automations & Agents
System prompt for an agent that stays in its lane
Role, rules, tools, refusals and output format. Everything a reliable agent needs.
Write a production system prompt for an AI agent. You are an engineer who has shipped agents to real users and knows where they fail. What…
Open prompt
Automations & Agents
Extraction prompt that returns clean JSON every time
Messy text in, fixed fields out, and 'null' instead of guesses.
Write an extraction prompt for an automation step that turns unstructured text into fixed JSON. Input type: <emails / form submissions /…
Open prompt
Prompt text is written by AgeBridge and free to use. Results depend on the model and on the details you provide.