★ GenAI Summit™ Asia|12–13 Dec, Kuala Lumpur|For AI Agency® students|See details →|★ GenAI Summit™ Asia|12–13 Dec, Kuala Lumpur|For AI Agency® students|See details →|★ GenAI Summit™ Asia|12–13 Dec, Kuala Lumpur|For AI Agency® students|See details →|★ GenAI Summit™ Asia|12–13 Dec, Kuala Lumpur|For AI Agency® students|See details →|
Two people review a chatbot reply on a laptop beside a stack of older paper manuals.
AI How-ToNovember 27, 20267 min read

How to Test a RAG Chatbot Against Outdated Documentation

Run five version-sensitive support tickets to see when your RAG chatbot needs a retrieval change, a better answer prompt, or the customer's installed version.

GenAI Editorial

A useful way to test a RAG chatbot is to give it two support tickets whose answers change across a single software update. In our Django test, both retrieval methods got 4 of 5 decisions right. One left an answerable customer waiting. The other failed to ask the one question that would let it help.

Take a customer running Django 6.0.0 who asks whether Python 3.11 is supported. Our keyword search handed Claude the release notes for Django 5.2, which does list Python 3.11. Claude declined to answer from the wrong document. That was sensible model behavior. Rewriting the answer prompt would still leave the customer without the 6.0 evidence.

Filtering by release fixed that ticket. On another ticket, the customer hadn't supplied their Django version. The filter returned no documents, and Claude said the evidence was insufficient. A support rep could have moved the conversation forward with one question. Here's how we separated those two failures, plus a third that stayed hidden behind a correct answer.

Which documentation did the chatbot see?

As of November 27, 2026, our test used three short compatibility excerpts from official Django Git tags. Each record carried its release identifier and a numeric version. We kept the passages short so a reader could trace an answer to the exact sentence the model saw. The Django 5.2 excerpt lists Python 3.10, 3.11, 3.12, and 3.13. The 5.2.8 excerpt records the addition of Python 3.14 compatibility. The 6.0 excerpt lists Python 3.12, 3.13, and 3.14. Django 5.2 tagged notes · Django 5.2.8 tagged notes · Django 6.0 tagged notes

We kept the maintained Django 5.2 series page outside the test corpus and used it to check the historical boundary. The page explicitly qualifies Python 3.14 compatibility as starting with Django 5.2.8. Treat that as a historical compatibility claim. Current maintenance and deployment suitability are separate questions. Django 5.2 Python compatibility

Both methods used the same corpus, five tickets, answer prompt and Claude Sonnet setting. We defined the expected actions before sending the questions. We ran each ticket once per method in a fresh Claude CLI session with tools disabled, for ten separate calls in all. The keyword baseline sent one excerpt. Version scoping could send several excerpts or an empty context, so the comparison includes changes in both source selection and context length. These results cover five constructed tickets and document-based compatibility decisions. We did not test live support traffic or installed runtimes.

What happened on each of the five tickets?

Django 5.2.0 and Python 3.11. “Our installation is Django 5.2.0. Does this release support Python 3.11?” Expected yes. Both methods supplied the Django 5.2 excerpt and answered yes.

Django 5.2.7 and Python 3.14. “We run Django 5.2.7. Is Python 3.14 supported?” Expected no. Keyword retrieval supplied the 5.2.8 excerpt, and the model inferred no from the explicit addition of compatibility in that patch. Version-scoped retrieval supplied the original 5.2 excerpt and also answered no, relying on a list that left the intervening patches unaccounted for.

Django 5.2.8 and Python 3.14. “We run Django 5.2.8. Is Python 3.14 supported?” Expected yes. Keyword retrieval supplied 5.2.8. Version-scoped retrieval supplied 5.2 and 5.2.8. Both answered yes.

Django 6.0.0 and Python 3.11. “Our application uses Django 6.0.0. Is Python 3.11 supported?” Expected no. Keyword retrieval supplied 5.2 and the model reported insufficient evidence. Version-scoped retrieval supplied 6.0 and the model answered no.

Unknown Django version and Python 3.14. “Can we use Python 3.14 with Django? We have not checked our installed version.” Expected ask for the installed version. Keyword retrieval supplied 5.2.8 and the model asked for the version. Version-scoped retrieval supplied no excerpts and the model reported insufficient evidence.

How can you reproduce the retrieval and the missing-version check?

Use SQLite 3.51.0 with the default FTS5 tokenizer. Index the release label and compatibility excerpt and store an unindexed record ID. The keyword baseline uses unweighted BM25. With the default FTS5 rank mapping, smaller scores are better matches. Release applicability needs a separate check. SQLite FTS5 BM25 documentation

Our index used the SQLite declaration CREATE VIRTUAL TABLE docs USING fts5(id UNINDEXED, body). For each record, the body began with “Django”, the release label and “release notes”, followed by its compatibility text. The installed version came separately from the test ticket.

For the keyword baseline, use terms = select_terms(question, keep=[Django, Python, support_wording, dotted_versions]). Quote each term and join with OR. The 5.2.7 ticket becomes "django" OR "5.2.7" OR "python" OR "3.14" OR "supported". Run WHERE docs MATCH :query ORDER BY rank ASC, id ASC LIMIT 1 against the FTS5 table and pass the resulting excerpt to the answer prompt.

For version-scoped retrieval, use version = parse_numeric_version(installed_version_metadata). Normalize two-part release tags to patch zero. Select every record where record.major_minor == version.major_minor and record.patch <= version.patch, then send all selected excerpts to the same answer prompt. The original scoped run sent an empty context when version metadata was missing. Our filter took the installed version from a supplied field. If your support interface only receives free text, the decision to extract, confirm or request that field is an additional part of the system to test.

To test the missing-version route, check for missing metadata before retrieval or generation. Return this exact question:

> Which Django version, including the patch number, is installed?

We ran that branch and replayed the four recorded scoped decisions for known versions. The replay matched all five expected actions. It reused the four model decisions without a new generation trial, so the weak evidence for 5.2.7 carried through.

Would retrieving more passages have fixed the problem?

We reran the keyword search for the 6.0.0 ticket and removed the one-result limit. The 5.2 passage still ranked first. The 5.2.8 passage was second, and the relevant 6.0 passage was third. Asking for the top two would still have left the answer outside the prompt. Asking for three would have sent the entire test collection. We inspected the ranking here; we did not run another model trial on the expanded context.

This is a cheap check to make on your own service. Save the question and the returned IDs. Find the first record a support engineer would actually use. If that record never entered the index, increasing the result limit cannot recover it. If it sits just below the cutoff, try a larger limit on the same tickets and check whether the model can distinguish the versions it now sees. Keep the prompt and model fixed during that comparison.

If you organize your reference documents in Claude Projects, see How to Build a Claude Projects Knowledge Base.

When is a later release note better evidence for an older version?

The original Django 5.2 list establishes which Python versions the initial release supported. Its silence about Python 3.14 leaves open whether compatibility arrived in a patch by 5.2.7. The version filter correctly selected an earlier document, but the resulting context lacked enough patch history to support the answer. Django 5.2 tagged notes

The later 5.2.8 note is stronger evidence for this ticket because it explicitly dates the addition of Python 3.14 compatibility. The maintained series page confirms the same boundary. When a later authoritative source explicitly dates a change, judge whether the claim covers the installed version before filtering it out by publication or release date. Django 5.2.8 tagged notes · Django 5.2 Python compatibility

Should you change the index, change the prompt, or ask for the version?

For a release checklist, give each ticket an expected customer action and an evidence requirement. For the 6.0.0 ticket, the expected action is “answer no.” The evidence requirement is a source describing 6.0’s supported Python versions. For the 5.2.7 ticket, the action is also “answer no,” but the evidence requirement is the patch where support changed. A green result on the first field can coexist with a failure on the second.

Save the retrieved record IDs, cited passages, and model response for each ticket. Review each run on three dimensions.

- Document relevance. Does each retrieved excerpt cover the feature and release series in the ticket? For the 6.0.0 miss, check that the index has the 6.0 excerpt and usable version metadata, then fix context selection and rerun the same ticket.

- Temporal scope. Which version or interval does each cited passage establish? Write down the installed version and mark any gap. For 5.2.7, require an explicit compatibility boundary or enough patch history to justify the answer.

- Answer quality. Record the expected and actual decisions, whether the cited passage supports the wording, and whether the bot took the right next action. If the prompt mishandles sufficient evidence, revise it and rerun with the same context. If the answer depends on an installed version the customer hasn’t supplied, ask for the full version before retrieval.

For your first regression set, pick a change your own customers encountered. Write one ticket just before the change, another just after it, and one that omits the field that decides between them. Include a straightforward case that already works. The test is ready to reuse when another engineer can identify the expected source and the next customer-facing action without seeing the chatbot’s reply.

If you're setting up retrieval for the first time, our guide to how retrieval-augmented generation works explains how the search step feeds the answer model. This five-ticket test checks what happens at that handoff.

Sources

  1. Django release 5.2 tagged notes
  2. Django release 5.2.8 tagged notes
  3. Django release 6.0 tagged notes
  4. Django 5.2 release notes, Python compatibility
  5. SQLite FTS5 documentation

More where this came from

Keep reading.

See all posts →