Trust, but Check
In Lesson 7 you learned that a good grounded answer is faithful to its sources and verifiable. In Lesson 9 you learned that RAG reduces hallucinations but doesn’t remove them. This lesson puts those two ideas to work. A RAG system earns trust in three ways: it shows people where an answer came from, it checks that the answer actually says what the sources say, and it is honest when it has no sources at all. The key idea is simple. Grounding narrows the material a model draws from. It doesn’t check that what came back is in that material. That check is your application’s job.Core Concepts
Showing Sources
A citation is a pointer from a claim to the source that supports it. It lets a reader check the original, judge the answer for themselves and find more detail. What makes a citation useful:- It names something real. A title, an author, a link the reader can open.
- It’s close to the claim. “According to the Volunteer Handbook…” beside the sentence it supports, or a numbered note the reader can follow.
- It carries the supporting text. A short excerpt, or snippet, shows the reader the exact passage the answer relied on.
include_citations: true. Each citation can include the item’s title, URL, authors, publisher, publication date and snippets, the passages retrieved from it. When you stream, the citations arrive as the first chunk, before any of the answer’s text.
Sources Reaching the Model vs. Sources Supporting the Answer
These are two different questions, and it’s easy to confuse them. Did sources reach the model? Both grounded endpoints answer this for you. Thesources_returned flag in the response (the X-Sources-Returned header when streaming) says whether retrieved content was given to the model for this answer.
Does the answer reflect those sources? No flag answers this. A model can be given good sources and still write a quotation nobody said, or name a book that doesn’t exist. Only comparing the answer’s text with the retrieved text catches that.
Think of it like a student with an open textbook. The open book on the desk doesn’t prove that every sentence in the essay came from it.
Checking Claims Against Sources
Verification is a step between generating the answer and showing it. You hold on to the retrieved text, then check the answer against it before the user sees anything. Not every sentence needs the same care. Fabrications cluster around the details people are most likely to repeat or act on:- Direct quotations: does the quoted wording appear in a source?
- Named works: titles of books, articles, episodes, courses and products
- Named people: who said or wrote what
- Dates and numbers
When Sources Are Missing
On Gloo, grounding never fails a request. If retrieval finds nothing that matches, the model still answers, from its general knowledge, and the response reportssources_returned: false.
That answer can be fluent, confident and complete. Nothing in its text says it wasn’t drawn from your content. So the flag is the one signal you get, and your app has to act on it.
You have two honest choices:
- Label it. “This answer isn’t drawn from our resources.”
- Decline. “I couldn’t find that in our resources. You might try [another resource] or contact [a person].”
Widen Once, Then Decline
A failed check doesn’t always mean the answer is wrong. Sometimes retrieval was too narrow and the supporting passage didn’t come back. A sensible pattern:- Widen retrieval once. Ask for more sources (
sources_limitgoes up to 10), or accept less close matches (certainty_thresholdon Grounded Responses). - Generate and check again.
- If it still doesn’t check out, decline plainly.
Verify Before You Show
Streaming shows each word as it’s written. That’s great for speed, but an unverified quotation is on screen before any check can run, and taking it back is worse than a slightly slower start. For answers that are heavy on quotes, facts or high stakes, generate the full answer, check it, then show it. Save free streaming for low-stakes, exploratory use.Who Does What
Gloo’s grounded endpoints handle retrieval and tell you what reached the model. Your application decides what reaches the user.Try It Yourself
Exercise 1: Spot the Unsupported Claims
Here’s a retrieved source:“The Youth Leadership Course runs for six weeks and meets on Tuesday evenings. It is led by Pastor Ana Ruiz. Participants receive the workbook Growing Leaders.”And here’s a generated answer:
“The Youth Leadership Course is a six-week program led by Pastor Ana Ruiz, who describes it as ‘the best preparation a young leader can get.’ Participants receive the workbook Growing Leaders and its companion video series, Leading Well.”List every span a containment check would flag. Which one would do the most damage if a user repeated it?
Exercise 2: Design the Missing-Source Message
Your app answers questions from a church’s policy documents. A user asks about something the documents don’t cover, and the response comes back withsources_returned: false.
Write the message your app shows. Then write a second version for a casual “ask me anything” helper on the same site. What changed, and why?
Exercise 3: Choose a Citation Display
For each app, decide how to show sources (inline names, numbered notes, a source list with snippets, or links), and whether to stream:- A study tool that quotes from published books
- A help bot for a volunteer sign-up site
- A staff assistant that answers questions from internal policies
Common Pitfalls
Pitfall 1: Treating sources_returned: true as Proof
The flag says sources reached the model. It doesn’t say the answer is faithful to them.
The fix: Treat the flag as the first check, not the only one. When it’s true, verify quotations and titles against the retrieved text.
Pitfall 2: Showing Ungrounded Answers as Normal Answers
When retrieval finds nothing, the answer still arrives fluent and complete. If your app never reads the flag, users can’t tell it apart from a grounded answer. The fix: Checksources_returned on every response, and label or decline when it’s false. Check it before any other verification: with no sources, every quotation fails automatically, which tells you nothing new.
Pitfall 3: Trusting a Title Because the Series Is Real
A made-up episode title next to a real series name is more convincing, not less. Plausibility is what makes it harmful. The fix: Treat every title the model produces as unverified until you find it in a source.Pitfall 4: Retrying Forever
Each extra attempt costs time and tokens, and rarely changes the result. The fix: Widen retrieval once, check again, then decline plainly. An honest “I couldn’t confirm that” costs one interaction. A fabricated quotation that someone repeats costs far more.Pitfall 5: Searching Again When a User Pushes Back
When a user says “Are you sure?”, that message has nothing in it to search on. Retrieval comes back empty, and a correct answer gets thrown away. The fix: Keep the sources from each turn. When a user challenges an answer, re-check it against the sources you already have. Correct it if it doesn’t hold, and stand by it if it does.Level Up
Here’s a design challenge that brings the whole lesson together. Scenario: You’re building a “Find a Resource” assistant for a ministry. It answers questions from the ministry’s articles, courses and podcast episodes, and people often share its answers with friends. Your task: Sketch the flow from question to screen.- Where does the citation data come from, and what will you show next to each answer?
- Which details in an answer will you verify, and how?
- What happens when
sources_returnedisfalse? Write the exact message. - What happens when a quotation fails verification: paraphrase, drop it, or decline?
- Will you stream? Why or why not?
- Write five test questions for your assistant: one it can answer, one with a false premise, one asking for a quotation, one off-topic, and one follow-up that pushes back.
Key Takeaway
Grounding gives a model the right material. It doesn’t guarantee the answer stays inside it. A trustworthy RAG app shows its sources, checks the details people repeat (quotations, titles, names, dates and numbers) against the retrieved text before display, and is honest when no sources came back. The platform decides what content reaches the model; your app decides what text reaches the user.Learn more
- Grounded Completions: RAG with
include_citationsand thesources_returnedflag - Grounded Responses: the same grounding on the Responses API, with
certainty_thresholdand what happens when no sources are found - Building Trustworthy Grounded Applications: verification checks, streaming safely, multi-turn handling and evaluation
- Search API: run retrieval yourself when you want the full source text in hand
What’s next
When you’re ready to continue the course, you’ll map out a practical path from RAG knowledge to a working system.Lesson 11: Getting Started with RAG
Choose between platforms, APIs and custom builds, and plan a small pilot.

