Logo di Search Benchmark

Search Benchmark

Organizzazione
agentic-community
search-benchmark

Genera un benchmark della qualità di ricerca per AI Registry. Ricava i dati di riferimento dagli asset del registry, esegue oltre 100 query sull'API di ricerca semantica, valuta i risultati con NDCG@10/MRR/Recall e produce un report Markdown. Usalo per misurare la qualità della ricerca dopo modifiche all'algoritmo di ranking, al modello di embedding o ai contenuti indicizzati.

Add to TypingMind

Panoramica

Pubblicato daagentic-community
Repositorymcp-gateway-registry
Nome della skillsearch-benchmark
Stelle
969
Fork
244
File inclusi
Solo istruzioni
LicenzaApache-2.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da agentic-community su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Search Benchmark in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/agentic-community/mcp-gateway-registry/tree/main/.claude/skills/search-benchmark
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/agentic-community/mcp-gateway-registry.git /tmp/mcp-gateway-registry
mkdir -p .claude/skills
cp -r /tmp/mcp-gateway-registry/.claude/skills/search-benchmark .claude/skills/search-benchmark
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Search Benchmark in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Search Benchmark non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Search Benchmark non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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

  1. Registry URL - The base URL of the deployed registry (e.g., https://d2xl2zfuhgc4l0.cloudfront.net)
  2. JWT Token - A valid admin token in .token file (get from "Get JWT Token" button in registry UI)
  3. 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:

bash
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

bash
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 ',''))
")

curl -s -H "Authorization: Bearer $TOKEN" "{REGISTRY_URL}/api/servers?limit=2000" > /tmp/servers.json
curl -s -H "Authorization: Bearer $TOKEN" "{REGISTRY_URL}/api/agents?limit=2000" > /tmp/agents.json
curl -s -H "Authorization: Bearer $TOKEN" "{REGISTRY_URL}/api/skills?limit=2000" > /tmp/skills.json

1b.2: Analyze the assets deeply

Read the JSON dumps. Filter out stress-test and security-pending assets. For each real asset, understand:

  • What it does (from description)
  • What tools it has (tool names and descriptions)
  • What tags it uses
  • How users would naturally search for it

1b.3: Craft 100 queries across these categories

CategoryCountStrategy
exact-name10Product/server/agent names as queries
semantic15Natural language paraphrases with NO keyword overlap
tool-precision10Exact tool names as queries
tag-based10Tag vocabulary combinations
multi-entity10Queries where correct answers span servers + agents + skills
conflict10Ambiguous terms where vector and keyword disagree
no-answer10Queries completely outside the dataset (no match exists)
agent-focused10Queries specifically targeting agents
skill-focused10Queries specifically targeting skills
tricky15Edge cases, short queries, non-English, adversarial

1b.4: For each query, define expected results

json
{
  "query": "the search query",
  "category": "one of the categories above",
  "description": "what this query tests and why",
  "expected": [
    {"path": "/exact-path-from-registry", "grade": 3, "reason": "why this should match"},
    {"path": "/another-path", "grade": 2, "reason": "why this is relevant but not perfect"}
  ]
}

Grade scale: 3 = perfect match, 2 = highly relevant, 1 = somewhat relevant. For no-answer queries, expected should be an empty list.

1b.5: Validate all paths exist

Every path in expected results must exist in the fetched assets. Verify before saving.

1b.6: Save

Write the ground truth to tests/fixtures/search_dataset/ground_truth.json.

Tell the user how many queries were created per category and that they should review it.

Step 2: Run Benchmark

Run all queries against the live semantic search API and generate a report:

bash
uv run python scripts/benchmark_search.py \
    --url {REGISTRY_URL} \
    --token-file {TOKEN_FILE} \
    --queries tests/fixtures/search_dataset/generated_ground_truth.json

Output:

  • tests/fixtures/search_dataset/benchmark_results.json (raw results)
  • tests/fixtures/search_dataset/benchmark_results.md (markdown report)

Step 3: Review Report

Show the user the key metrics from the report:

  1. Quality Metrics - NDCG@10 > 0.7 is good, > 0.8 is excellent
  2. Score Health - Saturated scores at 1.0 should be < 15% (if higher, scoring formula may have issues)
  3. Quality by Category - Identify weak areas (e.g., agent-focused queries underperforming)
  4. Per-query results - Check specific queries that scored 0.0 (complete miss) or low NDCG

Open the report in the editor for the user to review.

Step 4: Compare Before/After (Optional)

If asked to compare two runs (e.g., before and after a scoring algorithm change):

bash
uv run python scripts/benchmark_search.py \
    --compare tests/fixtures/search_dataset/benchmark_results.json other_results.json

Output Format

The report includes:

  • Registry metadata: version, database backend, server/agent/skill counts
  • Quality Metrics: NDCG@10, MRR, Recall@10 averaged across all queries
  • Score Health: saturation analysis (unique scores, % at 1.0, range)
  • Quality by Category: breakdown per query type
  • Per-query results: top 5 results with scores and ground truth comparison

Interpreting Metrics

MetricGoodExcellentPoor
NDCG@10> 0.65> 0.80< 0.50
MRR> 0.70> 0.85< 0.50
Recall@10> 0.75> 0.90< 0.60
Score saturation< 15%< 5%> 30%

Example

$ /search-benchmark https://d2xl2zfuhgc4l0.cloudfront.net .token

This will:

  1. Generate ~90 queries from the registry's assets
  2. Run each query against the semantic search API
  3. Produce a report showing search quality metrics
  4. Open the report for review

Troubleshooting

  • 401 errors: Token expired. Get a fresh one from the registry UI "Get JWT Token" button.
  • 0 assets found: Registry has no servers/agents/skills registered, or token lacks permissions.
  • Low NDCG on "description-derived" category: Expected for programmatically generated queries. Add hand-curated queries for better evaluation.
  • High saturation (>30% at 1.0): Scoring formula may be using the legacy additive method. Set SEARCH_FUSION_METHOD=rrf on the registry.

Related

Domande frequenti

Cosa fa la skill IA Search Benchmark?

Genera un benchmark della qualità di ricerca per AI Registry. Ricava i dati di riferimento dagli asset del registry, esegue oltre 100 query sull'API di ricerca semantica, valuta i risultati con NDCG@10/MRR/Recall e produce un report Markdown. Usalo per misurare la qualità della ricerca dopo modifiche all'algoritmo di ranking, al modello di embedding o ai contenuti indicizzati.

Perché usare Search Benchmark su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Search Benchmark è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Search Benchmark in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/agentic-community/mcp-gateway-registry/tree/main/.claude/skills/search-benchmark. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Search Benchmark?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Search Benchmark?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Search Benchmark: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Search Benchmark è gratuita?

Sì. È pubblicata su GitHub da agentic-community con licenza Apache-2.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇