Executes primary fixture‑based and secondary replay‑based quality gates for expert retrieval, outputting pass/fail verdicts and optional JSON reports.
// Source: https://github.com/mperkins0155/gbrain | License: MIT | Copyright 2026 Garry Tan
// Provided via justclaw.it.com; keep this notice with the code.
/**
* gbrain eval whoknows — v0.33 two-layer eval gate (ENG-D2).
*
* Layer 1 (PRIMARY, ship-blocking): hand-labeled fixture.
* For each {query, expected_top_3_slugs}, run `findExperts` and check
* whether top-3 result slugs intersect with expected_top_3_slugs.
* Pass = HIT_RATE_THRESHOLD (0.8) or higher.
*
* Layer 2 (SECONDARY, ship-blocking when data exists): eval_candidates replay.
* Stream rows from `eval_candidates` where tool_name='query' (the closest
* shape to whoknows queries the capture system has). For each, re-run
* findExperts and compute set-Jaccard@3 between current output and
* captured retrieve
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key