Repository navigation
Stop enumerating search_datasets' filters in the prompt - #425
Merged
Merged
Conversation
The prompt said the filters are exactly query, modality, task, has_hed, has_zarr and limit, that there is NO participant-count filter, and to pass only those six names. nemarOrg/nemar-cli#1429 takes the surface to 33 parameters and is in the release now being promoted to production, so all three statements become false the moment it ships. The third is the damaging one: it tells the model not to use filters that work, so a question about channel counts or participant numbers takes a worse route or gets refused, and nothing looks broken. Rather than swapping one list for a longer list that goes stale the same way, the prompt now points at the tool schema, which the server generates from its facet definitions. The warning that matters is kept and is not a function of how many filters exist: an undeclared argument is accepted and silently ignored, so an invented name returns unfiltered results that look filtered. Partial: #370 asks for a whole-config rewrite and raises open questions about how much belongs in the prompt at all. This is the correctness fix the nemar-cli promotion forces, not that rewrite.
This was referenced Sep 21, 2026
Merged
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.
Forced by the nemarOrg/nemar-cli
dev->mainpromotion happening now. Partial towards #370, not the full rewrite it asks for.What goes false when nemar-cli promotes
src/assistants/nemar/config.yamlcurrently tells the model:nemarOrg/nemar-cli#1429 (
expose the whole catalog filter surface over MCP) takessearch_datasetsfrom 6 advertised parameters to 33, and it is in the release being promoted to production. So all three statements become false on promotion.The third is the one that does damage. It does not merely under-describe the tool, it instructs the model not to use filters that work. A question about channel counts, participant numbers, sampling rate or session counts then takes a more expensive route or gets declined, and nothing appears broken. #370 predicted exactly this: "the prompt will describe six filters while the tool accepts thirty-three".
Why not just write the longer list
Because it goes stale the same way, on the next facet added. #370 makes the same point: the tool descriptions now carry generated per-parameter documentation, and duplicating them in the prompt recreates the two-copies problem. The server generates its filters from
shared/facets.ts; the prompt has no such source, which is the argument for keeping it thin.So the prompt now points at the schema and keeps the one warning that is not a function of how many filters exist: an argument the server does not declare is accepted and silently ignored, so an invented name returns unfiltered results that look filtered.
Order independence
Deliberate. The new wording is true whether the server advertises 6 filters or 33, so this can ship before or after the nemar-cli promotion without opening a window in either drift direction. Enumerating 33 filters here would have had to land after the promotion, or the model would invent parameters the production server drops.
Scope
Only the
nemar_search_datasetsentry. #370's other items stand: range syntax andinclude_unknown, the cost ladder,suggested_questions, the guard that can actually go red, and the open question of how much belongs in the prompt at all. I checked the rest of the config for the same staleness and found none: the other filter mentions are open-world ("modality, task, HED annotations, etc."), the worked example at line 151 usesqueryandmodalitywhich remain valid, and the suggested questions are all still answerable.uv run pytest tests/test_assistants/: 227 passed, 3 skipped.