How to Reduce Hallucinations in a Brave Search Grounded Chatbot

November 7, 2026

A search-grounded chatbot still hallucinates when snippets are truncated, when the top result is off-topic, or when the model treats a search title as a fact. The highest-leverage fix is requiring a quoted span from a numbered source before any claim — without a quote, the model must decline.

That single rule, applied with Brave Search results in a fixed context window, cuts fabricated specifics more than any temperature setting.

Why does grounding fail even when search returns good results?

Because search returns fragments. A Brave result gives you a title, a URL, and a 200-character description that may be the meta description rather than the passage containing the answer.

The model sees “PostgreSQL 16 was released in 2023” as a snippet under a page about Postgres 17, and confidently dates the wrong thing. The failure is not the model ignoring sources — it is treating a title as a source of facts.

Four concrete failure modes:

  1. Snippet is a teaser, not an answer. The real answer is in paragraph six.
  2. Several results share a topic but disagree on numbers.
  3. The query pulls a page about a different version or product.
  4. The model blends two sources into a claim neither makes.

What prompt structure prevents most of it?

Force three behaviors:

  • Quote before claim. “For each factual sentence, include a verbatim quote from a source in the format: claim ← ‘quote’ [n].”
  • Explicit refusal string. “If no source contains a direct answer, output exactly: Not found in sources.”
  • No inference from titles. “Do not use page titles as evidence; only quoted text counts.”

This produces slightly awkward answers on purpose. You can post-process the quote markers out at render time while keeping the grounding discipline in the model call.

How should you choose and order results?

Ordering matters more than count. A practical pipeline:

  1. Query with count=10, extra_snippets=True, freshness=py for technical topics.
  2. Deduplicate by domain — keep at most two results per site, so one SEO-heavy page cannot dominate context.
  3. Score each snippet for lexical overlap with the question; drop anything below a threshold. Half the noise disappears here.
  4. Put the highest-scoring sources first. Models attend more heavily to early context.
  5. If fewer than three sources survive, tell the model results are thin.

That last instruction is underused. “Only 2 weak sources were found” makes the model more hedged, which is correct behavior.

How do you measure whether it worked?

Build a 50-question eval set from real user questions with verified answers, and score three things per answer: correct, ambiguous, fabricated. Run it before and after any prompt change.

Change Typical effect on fabrication
Added quote-before-claim rule 40–60% reduction
Dropped count from 20 to 10 10–20% reduction
Domain dedupe 10–15% reduction
freshness=py on tech queries 15–25% reduction
Lower temperature only Under 5% reduction

The last row is the one people try first and the one that barely helps. Temperature changes style, not factual grounding.

What about recency and version confusion?

Version confusion is the most common failure in technical chatbots. Buying freshness=py helps but does not solve it — a year-old article about version 15 still ranks for a query about the current release.

Add the current date and version context into the system prompt explicitly: “Today is {date}. The current version is {version}. Prefer sources published in the last 6 months for version-specific answers.” Models do use this.

Also filter results whose page_age is older than 18 months for version-sensitive queries. Brave exposes page_age on most results.

Where does this approach still break down?

Questions with no web answer. “What is my account balance” cannot be grounded by search; the model should route elsewhere.

Comparative questions across paywalled sources. The snippet shows the claim, not the evidence, and the model accepts it.

Anything requiring arithmetic over several sources. Models will ground each number correctly and still sum them wrong.

Good fit: customer support bots, technical documentation assistants, and research tools where citations matter to users.

Poor fit: creative writing assistants, personal-data queries, and any use case where a confidently wrong answer costs more than a slow one.

Quick Summary

  • Grounding reduces but does not eliminate hallucination; require a verbatim quote before any claim.
  • Dedupe results by domain and drop low-overlap snippets before building context.
  • Order sources by relevance score; models weight early context more heavily.
  • Measure with a 50-question eval set — quote rules cut fabrication 40–60%, temperature barely moves it.
  • Add explicit date and version context to fix version confusion.