agentleFS
ch4570ch4570/vulpora/skills/opensearch-query-review/SKILL.md

opensearch-query-review

Skill1 starsChanged 56 days agoApache-2.0View on GitHub

Review OpenSearch 3.5 search queries. Inspect dynamic bool queries (filter vs query context, builder safety, paging), vector k-NN queries (k/ef_search, efficient filtering, under-fetch, radial, nested), hybrid (normalization/RRF)·neural/sparse/semantic, and search pipelines. Use when authoring/modifying queries or diagnosing search-result/latency problems. Ground claims in the OpenSearch official-docs KB.

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Dynamic bool: check — reference/kb/query-dsl-basics.md (filter context, term/match, builder safety).

    line 17
  2. Very specific:

    Vector/hybrid: check — reference/kb/vector-hybrid-query.md (k vs ef_search, efficient filtering, normalization/RRF).

    line 19

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

OpenSearch Query Building Review (Query Review)

Grounding principles are in reference/principles.md. For facts, prefer reference/kb/ (official docs).

Review order (proceed exactly like this)

  1. What the query is asking — result set, filter selectivity, frequency, sort/paging pattern.
  2. Dynamic bool check — reference/kb/query-dsl-basics.md (filter context, term/match, builder safety).
  3. Relevance·paging — reference/kb/relevance-scoring.md (BM25/boost/min_score) · reference/kb/pagination-search-after.md.
  4. Vector/hybrid check — reference/kb/vector-hybrid-query.md (k vs ef_search, efficient filtering, normalization/RRF). If hybrid/neural grep returns 0, state "not applicable".
  5. Slowness diagnosis — reference/kb/profiling-explain.md (Profile API). Provide a fix (query diff) with severity + re-measurement (recall@k·p99).

Quick checklist

  • Is a no-score condition in must? → filter/must_not (skip scoring + cache).
  • Does the dynamic builder enforce a field whitelist, a terms size cap, and avoid script/wildcard?
  • Is deep paging using from+size? → search_after/PIT.
  • In k-NN, is ef_search ≥ k? A variable k with a fixed ef_search means a ceiling mismatch.
  • When a filter is present, is it efficient k-NN filtering, and does a selective filter under-fetch (over-fetch/exact fallback)?
  • (hybrid) Is there a normalization/RRF processor? Are the neural ingest↔query model_id the same?
  • Did a type-based client work around terms via bool.should? → replace with the native form.

KB (read and cite first)

From reference/kb/INDEX.md: reference/kb/query-dsl-basics.md · reference/kb/relevance-scoring.md · reference/kb/vector-hybrid-query.md · reference/kb/pagination-search-after.md · reference/kb/profiling-explain.md

Deliverable

For each finding: problem → principle/KB source → query diff → re-measurement (recall@k sweep·p99). "It got faster" is confirmed only by measurement.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.