How to Write Prompts for Q&A Systems
Most guides to prompts for qa systems focus on the wrong problem. The real trust-killer is a bot that confidently answers questions it has no information to answer.
Answer the user's question based on the provided documents: [DOCUMENTS] Question: [USER QUESTION]
Before: The Weak Prompt
Most guides to prompts for qa systems are wrong about the biggest failure mode. They focus on making answers sound more natural or more detailed, when the actual problem that erodes user trust fastest is a system that confidently answers questions it doesn't actually have the information to answer. A knowledge base bot answering from a fixed set of documents will happily invent a plausible-sounding answer to a question those documents never actually address, unless you explicitly tell it not to do exactly that.
Here's the weak version most teams start with:
Answer the user's question based on the provided documents: [DOCUMENTS]
Question: [USER QUESTION]This produces reasonable-sounding answers for questions the documents actually cover. For questions outside that coverage, it also produces reasonable-sounding answers, which is precisely the problem — the model has no instruction telling it that "I don't know" is an acceptable, and often necessary, response to give instead of guessing at something it genuinely has no basis for.
Why It Fails
Without an explicit instruction to acknowledge insufficient information, models default to being helpful in the most literal sense: they'll construct the most plausible answer they can from whatever's available, even if that means extrapolating well beyond what the source documents actually support or intend to convey. This isn't a flaw unique to any particular model — it's a predictable consequence of not giving explicit permission to say "the provided information doesn't cover this," which most prompts simply never grant in the first place.
⚠️ Common mistake: Assuming that because a Q&A system's answers sound confident and well-structured, they're accurate. Confidence in phrasing and accuracy in content are completely independent, and a system with no "I don't know" instruction will produce confidently phrased wrong answers indistinguishable in tone from confidently phrased right ones, which makes the errors especially hard to catch without checking directly against the source documentation itself.
After: The Improved Prompt
Here's the rebuilt version an internal tools team at a mid-size company now uses for their employee-facing HR knowledge base bot, after their original version generated a handful of confidently wrong answers about benefits policy that took real effort to walk back with employees who'd trusted them:
Answer the user's question using ONLY the information in the documents below. Do not use any outside knowledge.
If the documents don't contain enough information to answer confidently, say so explicitly: "I don't have enough information in our current documentation to answer this fully. You may want to check with [RELEVANT TEAM] directly."
If the answer is partially covered, answer what you can and clearly flag what isn't covered, rather than blending covered and uncovered content together into one uniform-sounding response the user has no way to distinguish.
Documents: [DOCUMENTS]
Question: [USER QUESTION]What this does: the "ONLY the information in the documents" instruction closes off the model's tendency to fill gaps with plausible general knowledge, and the explicit fallback response gives it a clear, non-embarrassing way to decline answering rather than guessing at something it can't actually verify against the source material provided in that specific conversation.
⚡ Pro tip: Always specify what the fallback response should point the user toward — a team, a person, a different resource — rather than just "I don't know." A dead-end non-answer is barely better than a wrong one; a redirect actually helps the user move forward toward getting the actual answer they came looking for in the first place.
⚡ Pro tip: If your Q&A system's source documents get updated regularly, rerun your "known-uncovered-question" test set periodically. A question that correctly triggered the fallback last month might now have real coverage after a documentation update, and you want the system to start answering it instead of still declining unnecessarily.
Breaking Down Each Element
The "ONLY the information in the documents" line matters more than it might initially seem. Without it, models will often blend general training knowledge with document-specific content, producing answers that sound consistent with your documentation but actually include details that aren't specific to your company or situation at all, which is a subtle and hard-to-spot form of the same overconfidence problem.
The explicit fallback phrasing does double duty: it gives the model permission to say it doesn't know, and it defines what that response should look like so it's consistent across every interaction rather than varying unpredictably from one conversation to the next. An IT support lead who built a similar internal Q&A tool found that without a specified fallback phrasing, the model's "I don't know" responses varied wildly in tone — sometimes apologetic, sometimes abrupt — which felt inconsistent and unprofessional across a tool used by hundreds of employees daily throughout the company.
⚡ Pro tip: Test your Q&A prompt specifically against questions you know aren't covered by your source documents, not just questions you know are covered. This is the only way to actually verify your fallback instruction works as intended rather than assuming it does based on how well it performs on the easy, well-covered cases you tested first.
⚡ Pro tip: For any Q&A system used at scale, log which questions trigger the fallback response regularly. This becomes a genuinely useful signal for what documentation gaps actually matter to your users, turning your fallback logs into a prioritized list of what to write next instead of guessing at what content might be missing from your current library.
Variations for Different Contexts
For customer-facing Q&A where tone matters more than an internal tool, soften the fallback language while keeping the core honesty intact: "That's a great question, and I want to make sure you get accurate information — let me connect you with someone from our team who can help with the specifics." Same underlying honesty, friendlier delivery for an external audience who may be less forgiving of an abrupt non-answer than an internal employee already familiar with the tool's limitations.
For technical documentation Q&A used by engineers, the opposite adjustment often works better: a terser, more direct fallback that doesn't waste the reader's time with softening language they don't need or want in the middle of a debugging session. "Not covered in current docs — check [SPECIFIC RESOURCE] or ask in [CHANNEL]" respects a technical audience's preference for brevity over cushioning, and over-softening a fallback for this audience can actually read as evasive rather than helpful or direct.
For Q&A systems handling a mix of covered and partially-covered topics, consider a middle-ground response option beyond a binary "answered" or "fallback." A response that says "here's what I can tell you from our documentation, though it doesn't fully address [SPECIFIC ASPECT]" often serves users better than either a full confident answer or a complete punt to a human, since it gives them partial value immediately while still being honest about exactly where the gap is.
⚠️ Common mistake: Deploying a Q&A system without any fallback instruction at all "to keep it simple," then being surprised when users lose trust in it after encountering a confidently wrong answer on a topic that mattered to them. The fallback instruction is not an edge case worth skipping — it's often the single most important line in the entire prompt for maintaining long-term user trust in the system, especially once that trust has already been damaged once and needs to be rebuilt slowly, one accurate interaction at a time.
Save and Reuse This
The internal tools team mentioned earlier now treats their fallback rate as an actual metric they track over time, not just a safety net they set up once and forgot about. A rising fallback rate signals either a genuine documentation gap worth filling or a shift in what employees are actually asking about, both of which are useful things to know regardless of the specific reason behind the increase in any given month.
They review this metric monthly alongside their actual documentation update cadence, which has turned their Q&A bot from a static tool into something closer to a live signal for where their internal knowledge base needs attention next, month over month. Before tracking this, documentation updates happened reactively, usually after someone complained loudly enough in a company Slack channel for it to get noticed by the right person. Now the fallback log surfaces the same gaps earlier and more systematically, before they become a visible complaint at all, which has meaningfully improved how employees perceive the tool's reliability over time.
It's worth building this same tracking habit regardless of scale. Even a small internal tool used by a dozen people benefits from an occasional look at what questions triggered the fallback response, since those questions are effectively free user research about what your documentation is missing, delivered without anyone having to file a complaint or request a meeting to tell you about it directly.
If you're building or maintaining a Q&A system, this "only use provided documents, with an explicit honest fallback" structure is worth saving as a reusable template rather than rebuilding for every new knowledge base you stand up from scratch. PromptABCD is useful here for keeping these Q&A prompt templates versioned alongside notes on what fallback language worked best for which audience, so you're not relearning the same lessons about tone and honesty from scratch on your next project or your next team's rollout.
Continue Reading
Save the prompts from this post
PromptABCD is a free prompt manager. Paste, organize, and reuse your best AI prompts — no more hunting through chat history.
