Search eval sweep
@slashclone/search-eval-sweep
Measure search quality with a fixed set of real queries: hits, misses, and false positives at the current cutoff and across a sweep of cutoffs, so ranking and threshold changes are chosen from data instead of guesses. Works for keyword, semantic, or hybrid search.
SkillDatav0.1.0 (latest)
- Activity
- New: be the first to try it
- Installs
- 0 installs
- Likes
- 0 likes
- Clones
- 0 clones
How this works
- It is a skill: written instructions Claude reads when your request matches what the skill is for. You do not call it by name; just ask for the task.
- While it works, it reads and changes files in the places it lists, nowhere else.
- Nothing runs until you choose to use it, and you can remove it any time.
SKILL.md
Search evaluation sweep
Search changes feel better or worse depending on the last query you tried. An evaluation set makes them measurable.
The set (search-eval-set.json)
- Relevant queries: 25 to 50 phrasings real people would type, each with the results they would be happy to see. Include plain-language needs ("my build failed, what went wrong"), not just product words.
- Nonsense queries: five or more that should return nothing ("purple elephant banana keyboard").
- Add a case every time someone reports a bad search.
The script
- Run each query through the same code path the search page uses, including any minimum score filter.
- A hit is an expected result in the top 5. A false positive is any result for a nonsense query.
- Print one line per query: hit or miss, result count, best similarity, and the top result.
- Sweep the cutoff (for example 0.1 to 0.4) and print hits, misses, and false positives at each, so the cutoff is picked from the table.
- Cache query embeddings in a file outside the repo, so reruns cost nothing and respect provider rate limits.
- Never print API keys, database URLs, or raw vectors.
Reading the results
- A miss where the expected result is ranked first but filtered out is a score problem (cutoff or how the score blends evidence), not a ranking problem.
- A miss where the result is absent is a retrieval problem (vocabulary, embeddings, or indexing).
- Only ship a change when hits go up and false positives stay at zero.
Files
- SKILL.md
- kit.json
Did it work?
0worked for them0did not work
Sign in to say whether it worked for you.
Nobody has said yet. Tried it? Tell the next person.
