Skip to content

skills: improve validate-search-filters with aggregation-first approach#98

Merged
emsearcy merged 4 commits into
mainfrom
update-validate-search-filters-skill
Jun 11, 2026
Merged

skills: improve validate-search-filters with aggregation-first approach#98
emsearcy merged 4 commits into
mainfrom
update-validate-search-filters-skill

Conversation

@emsearcy

@emsearcy emsearcy commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Improves the validate-search-filters skill with several workflow and documentation enhancements:

  • Aggregation-first sampling: Replaced the random document sampling approach with aggregation count queries ("size": 0) as the primary evidence step. A handful of random docs can give false confidence — counts prove whether a field is populated across the corpus. Sample queries are now a secondary debugging tool only.
  • Grep-first discovery: Added an explicit step to grep the codebase for all QueryResources callers before trusting the reference table, since the table may lag new tool additions.
  • FiltersAll mechanism: Documented the FiltersAll payload field alongside Filters in the mechanism table.
  • New tool rows: Added reference entries for search_members, get_membership_key_contacts, and search_b2b_orgs in the tool/filter reference table.
  • Clarified scope: Called out that Name and date fields are query-time operations and do not need index field verification.

🤖 Generated with GitHub Copilot (via OpenCode)

- Prefer aggregation count queries over random document sampling to
  avoid false confidence from lucky samples.
- Add explicit grep step to discover all QueryResources callers before
  trusting the reference table.
- Document FiltersAll mechanism alongside Filters in the mechanism table.
- Add reference rows for search_members, get_membership_key_contacts,
  and search_b2b_orgs tools.
- Clarify that Name and date fields do not need index field verification.
- Restructure Step 4 to lead with count queries and relegate sample
  queries to a secondary debugging-only role.

Assisted-by: github-copilot:claude-sonnet-4.6
Signed-off-by: Eric Searcy <eric@linuxfoundation.org>
Copilot AI review requested due to automatic review settings June 8, 2026 19:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the validate-search-filters skill documentation/workflow to improve how filter correctness is validated against the live OpenSearch resources index and upstream indexer-contract docs, shifting primary evidence collection toward count-based queries and clarifying tool/filter mapping guidance.

Changes:

  • Reworked Step 4 to prefer size: 0 hit-count queries (with sampling as a secondary debug step).
  • Added a grep-first discovery step to find all QueryResources call sites before trusting the reference table.
  • Expanded the mechanism and tool/filter reference tables (including FiltersAll and additional tools), and clarified that Name/date operations don’t require index-field verification.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .agents/skills/validate-search-filters/SKILL.md Outdated
Comment thread .agents/skills/validate-search-filters/SKILL.md
Comment thread .agents/skills/validate-search-filters/SKILL.md
Comment thread .agents/skills/validate-search-filters/SKILL.md
Comment thread .agents/skills/validate-search-filters/SKILL.md Outdated
emsearcy added 2 commits June 11, 2026 14:17
- Rename 'aggregation count query' to 'count-only query' to accurately
  reflect the use of size:0 without an aggregation pipeline.
- Add explicit note that track_total_hits is intentionally omitted;
  approximate counts are sufficient evidence for field presence.
- Fix grep command to use -E flag for portable extended regex syntax.

Assisted-by: github-copilot:claude-sonnet-4.6
Signed-off-by: Eric Searcy <eric@linuxfoundation.org>
Copilot AI review requested due to automatic review settings June 11, 2026 21:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread .agents/skills/validate-search-filters/SKILL.md Outdated
Comment thread .agents/skills/validate-search-filters/SKILL.md Outdated
Comment thread .agents/skills/validate-search-filters/SKILL.md Outdated
…filters

- Fix total.value -> hits.total.value (correct OpenSearch response path).
- Replace the "exactly 10,000" heuristic with hits.total.relation:
  'eq' means exact, 'gte' means lower bound.
- Fix remaining 'aggregation count queries' -> 'count-only queries' in Step 8.

Assisted-by: github-copilot:claude-sonnet-4.6
Signed-off-by: Eric Searcy <eric@linuxfoundation.org>
@emsearcy emsearcy merged commit 0e10acf into main Jun 11, 2026
7 checks passed
@emsearcy emsearcy deleted the update-validate-search-filters-skill branch June 11, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants