Eval results
Numbers from the commands in the repo, run once on one laptop with the real embedding model. They are copied here as static data, not measured in your browser. Each section names the command that makes it. The questions and labels were written by hand and the set is small, so treat differences of one question as noise.
Search: does the right passage come back?
npm run eval. 30 questions, 1268 passages. A hit is a top 5 result from the right doc and section.
| search | recall@5 | MRR | avg ms per query |
|---|---|---|---|
| keyword | 0.700 | 0.585 | 0.2 |
| vector | 0.867 | 0.684 | 2.5 |
| hybrid | 0.900 | 0.703 | 2.2 |
Right doc only:
| search | recall@5 | MRR | avg ms per query |
|---|---|---|---|
| keyword | 1.000 | 0.872 | 0.2 |
| vector | 1.000 | 0.983 | 2.5 |
| hybrid | 1.000 | 1.000 | 2.2 |
Citation check
npm run eval:trust. 36 claims I wrote by hand, each paired with a passage, some backed by it and some not. This is the offline word-overlap check; the model-based check was not run (no key).
| precision | recall | invented claims rejected | wrong-passage claims rejected | contradictions rejected |
|---|---|---|---|---|
| 72.7% | 94.1% | 6 of 8 | 5 of 5 | 2 of 6 |
Saying "I couldn't find this"
npm run eval:trust. 30 answerable questions and 12 the docs cannot answer. A question is refused when its closest passage scores below the cut-off. The demo uses 0.45.
| refuse below | answerable wrongly refused | unanswerable correctly refused |
|---|---|---|
| 0.3 | 0.0% | 33.3% |
| 0.35 | 0.0% | 50.0% |
| 0.4 | 0.0% | 58.3% |
| 0.45 | 10.0% | 66.7% |
| 0.5 | 26.7% | 91.7% |
| 0.55 | 43.3% | 91.7% |
Questionnaire mode: reusing answers
npm run eval:questionnaire. 12 rephrased questions and 8 different questions on the same topic, checked against the 30 already answered.
| reuse at least | rephrased matched | different wrongly matched |
|---|---|---|
| 0.6 | 12 of 12 | 2 of 8 |
| 0.65 | 12 of 12 | 1 of 8 |
| 0.7 | 10 of 12 | 1 of 8 |
| 0.75 | 8 of 12 | 1 of 8 |
| 0.8 | 6 of 12 | 1 of 8 |
| 0.85 | 4 of 12 | 0 of 8 |
Incremental sync
npm run bench:sync. Time to bring the index up to date after one change, compared with a full rebuild.
| step | documents | chunks embedded | time |
|---|---|---|---|
| full build | 37 added, 0 changed, 0 deleted | 1279 | 18.0 s |
| nothing changed | 0 added, 0 changed, 0 deleted | 0 | 34 ms |
| one word edited in one doc | 0 added, 1 changed, 0 deleted | 1 | 45 ms |
| a paragraph appended to one doc | 0 added, 1 changed, 0 deleted | 1 | 31 ms |
| one new Markdown file | 1 added, 0 changed, 0 deleted | 1 | 30 ms |
| one doc deleted | 0 added, 0 changed, 1 deleted | 0 | 27 ms |
| full build again (for comparison) | 37 added, 0 changed, 0 deleted | 1270 | 16.3 s |