Testing search and recommendations
Judge search and suggestions with a fixed list of known queries, simple scores such as precision and nDCG, and plain checks for access and gaps.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: judging a librarian. You ask ten questions you already know the answers to. For each one, you check what the librarian puts first on the table. A good librarian puts the best book on top. A weak one buries it under four others.
Daily List is a to-do list app. It has a search box. Nina asks Tom if the new search puts the right task at the top. Some relevance questions allow multiple good answers, while filtering, permissions and particular ranking contracts can have exact expected results. People judge it by how useful the first few results are.
So Tom makes a list of searches he knows the answers to. For "milk", the task "Buy milk" should come first. For "dentist", the task about the dentist call should come first. He runs the list on the old search and the new one, and scores both.
This is testing search and recommendations: judging a ranked list with a fixed set of known searches, and checking that it is safe and complete.
The picture has a limit. A librarian talks to you and learns. A search system may also use authorised history, session context or personalisation; control those inputs in comparisons.
(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)
PLAIN WORDS · 1 in this section
- buries
- hide something under a lot of other things
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.
THE REAL JOB Judging a ranked list by asking questions you already know the answers to and scoring what comes first.
- List known questions
- Judge the results
- Score the order
- Read the worst queries
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| Ten questions with known answers | The golden query set |
| The book on top of the pile | The first results |
| How many helpful books in the first few | Precision at k |
| A prize for the best book on top | nDCG |
WHERE THIS PICTURE STOPS
- A librarian may learn from you; a search system can also use authorised history, session context or personalisation.
- Books are judged by people, and people disagree.
- A librarian talks. A search box does not explain itself.
HOOK
Ask what you know, score what is first.
REMEMBER IT THIS WAY
A rule of thumb: if you see this, think that.
If a search has no single right answer, usually judge the first few results against queries whose best answer you already know.
| In the trick | What it stands for |
|---|---|
| known queries | Searches Tom knows the answers to |
| first few results | How useful the first few results are |
A fixed set of known queries misleads when real users search for things the set never covered.
TELL A FRIEND
Judging a librarian with ten questions whose answers you know, and checking what comes first on the table.
OFTEN MIXED UP WITH How do you know the right answer? Test oracles. The oracle lesson asks how to know a result is right. This lesson handles results with no single right answer.
PRACTISE AND KEEP
Sources for this topic — 4 sources
- Market practice
Measuring Retrieval Relevance (Qdrant documentation) ↗ — Qdrant · A golden query set is a labelled set of queries paired with the documents judged relevant; the engine is then scored against it (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Evaluation lecture slides (Stanford CS276, Manning, Nayak and Raghavan) ↗ — Stanford University · Precision at K is the share of relevant documents in the top K; graded relevance calls for NDCG (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Evaluation in information retrieval (Introduction to Information Retrieval, Manning, Raghavan and Schutze, chapter 8) ↗ — Cambridge University Press · A test collection needs documents, queries and relevance judgments (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Making Wellcome Collection searchable (Wellcome Collection engineering blog) ↗ — Wellcome Collection · Click metrics rarely moved despite large query changes, and the assumption that people click only relevant results was flawed (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.