Repository navigation
Add frozen provider eval bundles and regression comparisons for S4 - #16
Merged
Merged
Conversation
…eval # Conflicts: # functions/package.json # functions/scripts/retrieval-eval.ts # verification.json
… work stands The doc started with the comparator's mechanics. A reader needs the decision being supported (keep MetaCortex, adopt Onyx, or build a narrow gap), the evidence rule (per-case comparison on frozen inputs) and the fact that only the offline measuring instrument exists so far.
…rough retrieval-eval
…nce in the S4 doc The S4 evaluation tooling is offline and not shipped in the Journey kit, so the check that every package script is packaged must not require provider-eval.ts. The doc paragraph rewritten in the previous commit kept the spec's 'and that' wording and no longer parsed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the first slice of the S4 provider evaluation: local tooling that compares current MetaCortex retrieval with a self-hosted open-source provider (Onyx) using frozen eval bundles and regression comparison files. The doc opens with the question this answers and what exists so far.
functions/eval/s4/holds a frozen bundle (nine synthetic sources, eight behavior specs, five retrieval queries) and two scripted example result files. No private corpus and no credentials.functions/src/providerEvaluation.tsandproviderResultAdapters.tsdefine the provider boundary, the runner, result normalizers for MetaCortex and Onyx, and the comparison report. They reusecomputeRetrievalEvalMetrics, so there is one ranking metric implementation.functions/scripts/provider-eval.tsis a new entry point for the file commands, run withnpm run eval:files. It never loads env files or initializes Firebase. The existingretrieval-eval.tsand its Firestore commands are unchanged fromrelease.docs/s4/provider-evaluation.mddescribes the design and its limits. All eight labels are stillneeds_reviewand no behavior spec has run against a real worker.No runtime code changes: nothing under the server entry points imports the new modules, so no deploy is needed.
Other changes
functions/tsconfig.scripts.jsonalso type-checks the three new S4 test files, so there is no separate S4 typecheck andverification.jsonis unchanged fromrelease.scripts/check-journey-kit-install.mjsskipseval:fileswhen it asserts that every script inpackage.jsonis packaged. The S4 tooling is offline and deliberately not shipped in the Journey kit.functions/src/retrievalEvaluation.tslabels synthetic casessynthetic_definitioninstead ofimplicit_fetch.Test plan
Run from this branch with
python3 scripts/run-gate.py <gate>:metacortex_typecheckpassesmetacortex_testpasses: 14 files, 164 tests, 79.37% line coveragemetacortex_packagepasses (Journey kit install check, 70 files)npm --prefix functions run eval:files -- validate-bundle --bundle eval/s4/bundle.jsonvalidates the frozen bundle🤖 Generated with Claude Code