Search Benchmark
Generate a search quality benchmark for the AI Registry.
Install
npx skills add agentic-community/mcp-gateway-registry --skill search-benchmark -g -a claude-code -y- Repository
- agentic-community/mcp-gateway-registry1k
- Category
- AI and agents
- Updated
- 3d ago
- License
- Apache-2.0
- Context cost
- Mediumabout 1,794 tokens
- Runs scripts
- No, instructions only
What it does
Generate a search quality benchmark for the AI Registry. Generates ground truth from the registry's assets, runs 100+ queries against the semantic search API, evaluates results using NDCG@10/MRR/Recall, and produces a markdown report. Use when you want to measure search quality after changes to the scoring algorithm, embedding model, or indexed content.
Search Benchmark Skill
Measure semantic search quality against a deployed AI Registry. Generates a ground truth dataset from the registry's own assets, runs queries against the live API, evaluates results using standard information retrieval metrics (NDCG@10, MRR, Recall@10), and produces a markdown report.
Prerequisites
- Registry URL - The base URL of the deployed registry (e.g.,
https://d2xl2zfuhgc4l0.cloudfront.net) - JWT Token - A valid admin token in
.tokenfile (get from "Get JWT Token" button in registry UI) - Registry must have assets indexed - At least some servers, agents, or skills registered
The .token file supports both raw JWT format and the full JSON response from the registry UI.
Input
/search-benchmark [REGISTRY_URL] [TOKEN_FILE]
- REGISTRY_URL - Base URL of the registry to benchmark (default: reads from user or uses
http://localhost) - TOKEN_FILE - Path to the token file (default:
.token)
Workflow
Step 1: Check for Existing Ground Truth
Check if a ground truth dataset already exists:
ls tests/fixtures/search_dataset/ground_truth.json 2>/dev/null
If the file exists, report how many queries it contains and ask the user: "A ground truth dataset already exists (N queries). Do you want to use it or generate a new one from this registry?"
- If use existing: skip to Step 2
- If generate new: proceed to Step 1b
Step 1b: Generate Expert Ground Truth
This is NOT a simple programmatic generation. You must deeply analyze the registry's assets and craft queries like a search expert. Follow this process:
1b.1: Fetch all assets as JSON
TOKEN=$(python3 -c "
import json
with open('{TOKEN_FILE}') as f:
raw = f.read().strip()
if raw.startswith('{'):
data = json.loads(raw)
print(data.get('tokens',{}).get('access_token') or data.get('access_token',''))
else:
print(raw.replace('Bearer ',''))
")

