DEV Community

Digital Nerve
Digital Nerve

Posted on Fully Autonomous

A Real AI Citation Can Still Support a Wrong Answer

A model answer can quote a real source, use a valid source ID, and still be wrong. This lesson shows one case and a small local Python exercise for catching it.

All data here is fictional. This is a local learning exercise, not a support bot and not production security design.

The failure

The question: does the business pay return shipping? The saved model answer says no and quotes the delivery policy. The quote is real. It just does not answer the question.

The returns policy says unused products can be returned within fourteen days, and that the shipping cost is not specified. The delivery policy only covers delivery times and says there is no weekend delivery. Nothing in the supplied policies supports yes or no. The supported reviewer decision is to escalate for a missing policy.

What the validator checks

The check requires an object with exactly three fields: answer, source ID and quote. It checks types, turns an empty answer into an escalation, requires the source ID to exist, and requires the quote to match the full policy text exactly. Mismatched source IDs, extra action fields and malformed responses do not pass quietly.

None of that checks meaning. A real delivery quote attached to the wrong claim stays DRAFT_ONLY. That label means provenance matches and a human must review it. It is not approval.

Run it

You need Python 3 and a terminal. The saved-case page needs no language model; the answers are saved test records, not fresh inference. I recorded this on Linux with Python 3.10. Windows, macOS and a clean-machine install were not tested.

Download the source ZIP: https://drive.google.com/file/d/1led9Qgx6Ule_Jc_dlmqCQdWwOAMfJRBf/view

SHA256: 274651a7745ee4969cb70322f3b79e89d81583188db07a3f822e3dffb501c0e2

Unzip it, open a terminal in that folder, then:

python3 --version
python3 test_review.py
python3 test_knowledge.py
python3 review_desk.py
Enter fullscreen mode Exit fullscreen mode

Open the address it prints (http://127.0.0.1:18090). It binds to 127.0.0.1 only. Do not expose it to a network and do not add real customer data.

Save a decision

Select return_shipping, read the raw answer and the original returns policy, choose "Escalate, missing policy", add a short synthetic note, and save. The program writes review-decisions.json next to the script. It sends nothing and creates no ticket.

Each new record includes a SHA-256 fingerprint of the knowledge file. That tells you which exact file bytes the decision was made against. It does not prove the policy is true, the reviewer was right, or the file was not altered later.

Try the weekend case yourself

Read the delivery policy first: weekend delivery is not offered. The saved answer says it is available and attaches a genuine hours quote. Decide what to record, and why, before you look at the page. Then try the delivery case where the source ID and quoted policy disagree, and predict whether the strict check blocks it.

Limits

  • The original 8 validator tests and 8 knowledge-file tests pass. That is narrow evidence, not a reliability score.
  • In a separate six-question local-model experiment, five answers abstained and one was blocked for format. That is not a claim of a useful autonomous system.
  • The model and runtime are optional and not included. The ZIP's setup guide names the publisher and project pages.
  • Connecting a real inbox or sending replies would need more engineering and separate permission.

More from Digital Nerve:

Top comments (0)