Repository navigation
test(diary): add reproducible fixture retrieval baseline - #2821
antunishdPursuit wants to merge 2 commits into
Conversation
|
@antunishdPursuit I revisited your work in #2849 to follow the monorepo conventions. |
|
@antunishdPursuit following up on the earlier handoff: the real diary corpus is now available in #2848, so you can continue the retrieval experiments without waiting for access to Potato or a private dataset. The dataset and reproduction instructions contain 276 human-approved entries and seven selected development queries. The runner is in To try the real corpus: gh pr checkout 2848
pnpm install
export NX_LOAD_DOT_ENV_FILES=false
pnpm exec nx run @moltnet/rest-api:download-model
export RETRIEVAL_MODEL_CACHE="$PWD/apps/rest-api/models"
pnpm exec nx run @moltnet/retrieval-eval:eval:corpusDocker must be running. This requests 56 searches: seven queries × four weight configurations × two repeats, at top ten. The run retains rankings and provenance locally. Human relevance review is underway in Potato for 80 candidate pairs. The checked-in dataset deliberately has no relevance judgments yet, so it is ready for running and inspecting retrieval, but not for claiming quality improvements. We'll add the reviewed labels as a later revision so compatible saved rankings can be rescored without rerunning search. The library's 46 unit tests, lint, typecheck and secret scanning pass. The new full-corpus run is not yet verified end to end; local Docker storage blocked PostgreSQL startup during the smoke test. |
|
Thanks for sharing the corpus! I ran it locally on Windows at The full retrieval-evaluation unit suite passed 47 of 48 tests. The remaining test failed on Windows because it expects file mode Separately, I added tests for the two metrics coverage findings in #2849. That baseline suite passed 27/27 locally. Would you prefer a small follow-up PR against that branch or a patch? The previously checked Nx secret-scan wrapper failed because of Windows quoting, but the equivalent direct scan passed. Thanks again! |
|
Hi there! Thanks again for incorporating the fixture baseline into #2849. I checked the updated tests, and they cover both cases I’d offered to send. I plan to close this draft as superseded in a week. Is there anything you’d like me to hand over before then? |
Summary
Related to #552. Adds a reproducible baseline for measuring the existing hybrid diary search before tuning retrieval behavior.
The development corpus reuses 12 existing fixture entries and six queries, with explicit binary relevance labels and rationales. This first increment covers only the fixture baseline; the broader evaluation work remains incomplete. The larger dataset, graded labels, and threshold/fanout experiments remain follow-up work. UI work is outside this baseline PR. Whether a follow-up would extend the tool mentioned in the issue or introduce a separate interface remains to be clarified.
Changes
Baseline results
The October 27 local run at c138ccd completed all 144 searches with zero ordered-result differences between repeats. Results and metrics exactly match the saved October 19 run.
Means cover five answerable queries. The no-match query returned 1/3/5 unwanted results at k=1/3/5 under every setting. Repeats check stability; they are not independent statistical samples. This reused development corpus is not a held-out benchmark, and harness success does not establish acceptable retrieval quality.
Test plan
Local verification on October 27, 2026, using Windows, Node 24.22.1, pnpm 10.34.5 and Go 1.27.1:
Existing failures disclosed
Embedding unit suite: 14 passed, 1 failed. The cache-path assertion expects
/tmp/models/; Windows resolves it toC:\tmp\models/. A temporary test copy using a platform-native absolute path passed all 15 tests while retaining the exact-path and environment-restoration assertions. The original test remains unchanged; a portability fix is separate from this baseline.Diary integration with real embeddings: 26 passed, 1 failed. The text-search case expects one result and receives two. The relevant cryptographic entry ranks first, but the weather entry also passes the existing vector-distance cutoff (0.294 versus 0.6), despite having no full-text match. The isolated keyword-only control passes. This is an existing retrieval-quality finding relevant to feat(evals): run evals on vector search with gold dataset / RAGAS approach #552; this baseline records it while leaving threshold tuning and production fixes for follow-up evaluation.
Neither failing test nor the production code it exercises was changed by these baseline commits. Assertions, labels and thresholds have not been relaxed to obtain passing results.
Validation notes: Windows required the supported install-hook skip followed by an explicit Nx sync check, pinned pnpm for child tasks, and Windows-compatible quoting for secretlint. No tracked configuration or lockfile changes were made. Against the inspected upstream snapshot 08a2ab1, the branch is two commits ahead and 137 behind; that snapshot does not change the eight PR files, but combined runtime behavior remains unverified.
Reproduction commands and model/Docker prerequisites are documented in
docs/understand/entry-search.md, under “Small retrieval evaluation baseline (#552).” No authorization/OPL changes are included.