Evaluate chunks, indexes and retrievers
Improve retrieval using known answers, source IDs and queries with different wording.
Evaluate chunks, indexes and retrievers
Work through the decision
An exact query for part TX-12 finds the correct bulletin. A paraphrase about its brake cable returns an unrelated manual. Another query retrieves the right rule but omits its exception. Which failures need different changes?
Check your reasoning
Use term matching for the distinctive code and evaluate semantic matching for paraphrases. Hybrid search combines these signals. Inspect chunk boundaries for the missing exception and preserve enough neighboring context. Evaluate a retriever change on a fixed query set so an improvement for synonyms cannot hide a regression on exact codes.
Compare the choices
- Chunk boundary
- Segment source text so a returned passage contains a coherent rule, conditions and exceptions. Balance specificity with enough context to interpret it.
- Keyword search
- Use lexical matching for exact identifiers, proper names and uncommon part numbers. Evaluate with the actual punctuation and codes users enter.
- Semantic search
- Match meaning across different wording using vector representations. Verify retrieved passages on real examples and check precise identifiers separately.
- Hybrid search
- Combine keyword and semantic signals when queries include precise identifiers as well as paraphrases. Compare top results on both categories.
- Retriever configuration
- Configure which index and fields a retriever searches and which filters narrow the passages it returns. Inspect the selected evidence in a test query.
- Index refresh
- Reprocess changed source material and check index freshness so a new or corrected passage can be found. A ranking adjustment cannot locate unindexed text.
Test the decision
If a current bulletin never appears, check whether it reached the index before changing ranking. Filter by audience, product and effective date where supported. Query relevance is meaningful only among eligible, accessible passages.
Practice the guide skills
- Split a bulletin into coherent passages, inspect an index entry and test a retriever with an exact code and a paraphrase. Compare keyword, vector and hybrid results and check the returned source revision. Watch 40:00
Official objectives for this lesson
Lab · Score a retriever on known warranty questions
This offline Python fixture contains a small index export and the ranked IDs returned for three dealer questions. Each approved query has a known evidence ID. Compare the first result before and after the date and audience checks. A question outside the library should return no eligible passage.
passages = {
"rev1": ("dealer", False, "Previous rim policy"),
"rev2": ("dealer", True, "Current rim policy and exception"),
"staff": ("staff", True, "Internal labor allowance"),
"axle": ("dealer", True, "Current axle procedure"),
}
cases = [
("rim exception", ["rev1", "rev2"], "rev2"),
("axle repair", ["staff", "axle"], "axle"),
("internal rate", ["staff"], None),
]
def choose(ranked, enforce_scope):
for key in ranked:
audience, current, title = passages[key]
if not enforce_scope or (audience == "dealer" and current):
return key
return None
for scoped in (False, True):
correct = 0
for query, ranking, expected in cases:
found = choose(ranking, scoped)
correct += found == expected
print(query, "->", found or "no evidence")
print("correct:", correct, "/", len(cases))
Check the result
rim exception -> rev1 axle repair -> staff internal rate -> staff correct: 0 / 3 rim exception -> rev2 axle repair -> axle internal rate -> no evidence correct: 3 / 3
Revise the first ranking to omit rev2 entirely. The scope checks still exclude withdrawn material but cannot recover a missing passage. Check ingestion, chunk boundaries and the underlying query. This exercise consumes fixture rankings. In Data 360, inspect the real index, retriever and platform access controls.
Related lesson · Choose the right level of control for an AI application
Evaluate chunks, indexes and retrievers quiz
Answer 3 questions. Check each answer for an explanation.