Repository navigation
The knowledge retrieval harnesses refuse a --param that filters the corpus - #373
Merged
Merged
Conversation
…orpus SEARCH_FIELDS was every KnowledgeSearchInput field minus FIXED_FIELDS, so `--param 'block_types=["paragraph"]'` or `formats=[...]` passed parse_params and reached knowledge.search, and an arm scored a subset of the corpus as the whole. bench/beir_knowledge.py takes the same params. SEARCH_FIELDS is now an allow-list of the ranking knobs (search_mode, lexical_weight, narrow_spans, collapse_sections, rerank), and formats and block_types join FIXED_FIELDS, so a filter added to the wire model later is refused by default. The docstring and bench/README.md say so. Tests: both filters are refused, and every KnowledgeSearchInput field is either a knob or fixed, never both, so the two lists cannot drift. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…the filter test is the fixed-fields one Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…tring wraps evenly Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…its choice Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
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.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
Why
bench/knowledge_retrieval.pybuiltSEARCH_FIELDSas everyKnowledgeSearchInputfield minusFIXED_FIELDS, so--param 'block_types=["paragraph"]'orformats=[...]passedparse_paramsand reachedknowledge.search: an arm scored a subset of the corpus as the whole, against the docstring's promise that the harness fixes depth, scope and filters so two arms differ by one flag.bench/beir_knowledge.pytakes the same params.SEARCH_FIELDSis now an allow-list of the ranking knobs (search_mode,lexical_weight,narrow_spans,collapse_sections,rerank), andformatsandblock_typesjoinFIXED_FIELDS, so a field added to the wire model later is refused until it is named a knob, and the unit test fails until it is placed in one list. The docstrings of both harnesses andbench/README.mdsay so (the BEIR harness also fixescollapse_sections).Scope and risk
The two retrieval harnesses'
--paramparsing. No server change; no benchmark was run.Compatibility, rollout and rollback
Tests
tests/unit/test_bench_knowledge_retrieval.py:test_the_fields_that_define_the_measurement_are_refused, parametrized overFIXED_FIELDS, now coversformatsandblock_types(both fail onmainwith noSystemExit);test_every_search_field_is_either_a_knob_or_fixedholds everyKnowledgeSearchInputfield to exactly one list. The file passes (46).test_bench_beir_knowledge.pyandtest_public_copy.py: pass.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed.main; no merged migration is edited.frontend/changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code