Shanraq.org Shanraq.org
An exact quote can still be the wrong answer
IT

AI Engineer Lesson 4 of 4

An exact quote can still be the wrong answer

Evaluate your assistant with both answerable questions and missing evidence.

A question that exposes a gap

A reader asks about the temperature during game nine. The archive records the result but contains no weather observations. Write down what the assistant should do. Compare two searches:

go test -v ./...
go run . -lang en search 'temperature'
go run . -lang en search 'temperature during game nine'

The short query retrieves nothing. Adding words about the game produces candidates. An exact sentence about a draw passes substring verification while leaving the weather question unanswered.

Acceptance test

Open TestRetrieval in archive_test.go. Six questions have known sources and three expect no hits. For the first group compute the fraction where the target comes first. Count correct abstentions separately. Combining the counts makes it harder to diagnose failure.

Final assignment. Add your question from lesson two, a weather question mentioning the match, and a fresh question in another language. Label each expected source or refusal before running it. Record the actual source, quotation, exact-match result and your relevance judgment. Repeat one question in the browser. Submit the log, explain one failure and report the sample size beside the score.

Archive cards let an evaluator return to the original evidence.

Audio (MP3) · Project code

Transcript — Test retrieval, quotation accuracy and relevance separately. Abstaining when evidence is missing can be the right result.

If you have found a mistake or a typo in this article, tell us about it

Comments (0)

No comments yet. Be the first.