One Knob, and What It Is Really Selling You
Last timeFinding Without Looking at Everything
Every approximate index has a single dial trading accuracy against time. Where to set it is an arithmetic question, and the answer is usually lower than instinct suggests.
The previous lesson ended with a structure that sometimes fails to find the right piece. The obvious question is how often, and the useful question is how much it would cost to make that number better.
Both are answerable, and the first one is answerable without any labelled data at all, which makes it unusual in this field.
What is being measured
Exhaustive comparison gives the correct answer by construction. So you already own a reference: run a sample of questions both ways, and compare.
| step | what the measurement needs | where it comes from | what it costs | what happened |
|---|---|---|---|---|
| 1 | the true nearest pieces, for each of a thousand questions | exhaustive comparison over the ten million, run once per question and kept | the slow method's full price, paid once rather than on every question | A thousand is plenty, and this is the only expensive row. Run it overnight and it is a file on disk from then on. |
| 2 | the index's own answer, for each of the same thousand | the index, at whichever setting is being tested | 1.4 to 34 milliseconds a question, by setting, as the trace below shows | The same questions, so the two answers are comparable question by question rather than in aggregate. |
| 3 | the score for one question | count how many of the true nearest the index also returned, and divide by how many were asked for | counting, and no judgement of relevance by anybody | This row is the whole definition. There is no annotator, no relevance label and nothing contested in it. |
| 4 | the number for the whole collection | those per-question scores averaged over the thousand | one number per setting, 67 to 99 per cent on this collection | What the rest of this lesson calls index accuracy. It is a share of the true nearest found, not a share of questions answered. |
| 5 | the curve to choose a setting from | six or eight settings run end to end | an afternoon, and no annotation budget at all | The reason the measurement is worth insisting on: it is cheap enough that there is no excuse for using somebody else's curve instead. |
One point about this measurement is worth dwelling on, because it is a rare luxury. Almost everything else in retrieval needs somebody to decide what the right answer was, and such decisions are slow, expensive and contested. Here the right answer is defined by a program you already have. That makes this the one number in the pipeline you can know exactly, which is probably why it receives more attention than its importance deserves.
The lesson stops here
4 more paragraphs to go
You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.
The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.
See the planThe contentsThis is the reading half
Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.
The contents