Logo di Genai Hub Prompt Evaluation

Genai Hub Prompt Evaluation

Organizzazione
SAP
genai-hub-prompt-evaluation

Run GenAI evaluations on SAP AI Core: benchmark LLMs and prompts against a test dataset using system-defined and custom (LLM-as-judge) metrics, then retrieve aggregate results. Supports all three evaluation types — prompt registry, orchestration registry, and grounding (RAG) orchestration registry. WHEN: user wants to evaluate or benchmark an LLM / prompt / orchestration config, run a GenAI evaluation, create or list evaluation metrics, define a custom LLM-as-a-judge metric, create a prompt template (prompt registry) or an orchestration-registry config (with or without grounding) for evaluation, create an evaluation configuration or execution, or fetch evaluation results / scores for an execution. DO NOT USE FOR: agent evaluation via the offline aeval service — use `aeval-offline-evaluation`; building a production orchestration/RAG pipeline for inference — use `genai-hub-orchestration`; generic executions, deployments, or artifacts unrelated to evaluation — use `aicore-lifecycle-management`; credentials, resource groups, or object stores — use `aicore-admin-resources`.

Panoramica

Pubblicato daSAP
Repositoryai-skills-library
Nome della skillgenai-hub-prompt-evaluation
Stelle
123
Fork
28
File inclusi
20
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.

  • File inclusi: 20

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da SAP su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Genai Hub Prompt Evaluation 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/SAP/ai-skills-library/tree/main/plugins/aicore-skills/skills/genai-hub-prompt-evaluation
  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/SAP/ai-skills-library.git /tmp/ai-skills-library
mkdir -p .claude/skills
cp -r /tmp/ai-skills-library/plugins/aicore-skills/skills/genai-hub-prompt-evaluation .claude/skills/genai-hub-prompt-evaluation
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Genai Hub Prompt Evaluation 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 Genai Hub Prompt Evaluation 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 Genai Hub Prompt Evaluation 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à.

Step 0 — ask for credentials first (required)

Before running any other step, confirm the AI Core credentials are set. Invoke aicore-admin-resources and run check_setup.py.

  • If it succeeds, continue to the workflow.
  • If it fails (missing variables, invalid_client, or bad credentials), STOP and ask the user to export the variables listed in Environment variables below. Do not continue, and do not look for credentials or workflow steps anywhere else (notebooks, other repos, workspace files) — this skill's scripts/ are the only supported path.

Rules

  1. Run all scripts from this skill's root directory with uv run scripts/<name>.py.
  2. Shared lifecycle/admin steps are handled by other skills — invoke them rather than reimplementing: object stores and resource groups → aicore-admin-resources; artifact registration, executions, execution status → aicore-lifecycle-management.
  3. Never print or log credential values — scripts read them from the environment via the SDK.
  4. The evaluation scenario ID is genai-evaluations. Always use the executable ID genai-evaluations-simplified — hardcode it, do not use any version/user-suffixed variant. A tenant may list many such custom-built images; ignore them. Only fall back to discovery (aicore-lifecycle-management get_executables.py --scenario-id genai-evaluations) if genai-evaluations-simplified is not present on the tenant at all.
  5. Before creating a custom metric or prompt-registry config, list existing ones and reuse by name/scenario/version to avoid duplicates. create_evaluation_metric.py already does create-or-get.
  6. Only fetch results (get_evaluation_results.py) once the execution status is COMPLETED (UNKNOWN → PENDING → RUNNING → COMPLETED). Check status by invoking aicore-lifecycle-management (get_executions.py --execution-id <id>).
  7. If a dataset has no reference/ground-truth column, do not select metrics that require a reference.

Environment variables

All scripts in this skill read credentials from the environment — never from CLI arguments.

AI Core credentials (required for all scripts)

VariableDescriptionNotes
AICORE_AUTH_URLOAuth token endpointMust end in /oauth/token
AICORE_CLIENT_IDOAuth client IDFrom BTP AI Core service key
AICORE_CLIENT_SECRETOAuth client secretFrom BTP AI Core service key
AICORE_BASE_URLAI Core API base URL/v2 is appended automatically if not present
AICORE_RESOURCE_GROUPResource group to operate inDefault: default

Source: BTP cockpit → your subaccount → Instances & Subscriptions → AI Core instance → Service Keys.

Set them once via aicore configure (saves to ~/.aicore/config.json) or export each variable:

bash
export AICORE_AUTH_URL=https://<subdomain>.authentication.<region>.hana.ondemand.com/oauth/token
export AICORE_CLIENT_ID=<client-id>
export AICORE_CLIENT_SECRET=<client-secret>
export AICORE_BASE_URL=https://api.ai.<region>.aws.ml.hana.ondemand.com
export AICORE_RESOURCE_GROUP=default

Shell syntax: AICORE_RESOURCE_GROUP='default' — no space before =.

Object-store credentials (required only for download_evaluation_results.py)

The per-row SQLite DB is downloaded directly from S3 — AI Core credentials are not used here. Set the standard AWS SDK environment variables; the script uses boto3's credential chain directly:

VariableDescription
AWS_ACCESS_KEY_IDS3 access key ID
AWS_SECRET_ACCESS_KEYS3 secret access key

The bucket name is passed as --bucket <name> on the command line (not read from env). Source: the same AWS credentials used when creating the object store secret in aicore-admin-resources.


End-to-end workflow

The full runbook (with every command and how the pieces connect) is in references/WORKFLOW.md. The high-level flow, and which skill owns each step:

#StepOwner
1Register S3 object store secret (input source)aicore-admin-resources create_object_store.py
2Upload the dataset to the bucketuser — sample datasets in data/
3Register the dataset folder as an artifact (with the prompt-evaluation label)this skill register_eval_artifact.py
4Ensure an orchestration deployment is running (for the deployment URL)aicore-lifecycle-management + genai-hub-orchestration
5Select system metrics / create custom metricsthis skill list_evaluation_metrics.py, create_evaluation_metric.py
6Create the thing to evaluate (see Evaluation types below)this skill create_prompt_template.py or create_orchestration_registry_config.py
7Create the evaluation configurationthis skill create_evaluation_configuration.py
8Start the executionaicore-lifecycle-management create_execution.py
9Poll status until COMPLETEDaicore-lifecycle-management get_executions.py
10Retrieve aggregate resultsthis skill get_evaluation_results.py
11(Optional) Download the raw SQLite DB for per-row analysisthis skill download_evaluation_results.py

Evaluation types

Choose one — it determines what you create in step 6 and which binding you pass to create_evaluation_configuration.py in step 7:

TypeWhat you evaluateCreate withConfig binding
Prompt registryA prompt template + one or more modelscreate_prompt_template.py--prompt-template-id (+ --models)
Orchestration registryAn orchestration config (prompt_templating)create_orchestration_registry_config.py--orchestration-registry-ids
Grounding orchestration registryAn orchestration config with a grounding (RAG) modulecreate_orchestration_registry_config.py (grounding template)--orchestration-registry-ids

All three share steps 1–5 and 7–11; only step 6 and the config binding differ. The grounding type additionally needs grounding prerequisites (grounding-enabled resource group, grounding secret, document-grounding pipeline) — see references/GROUNDING_SETUP.md.


Evaluation metrics

bash
# Discover system metric names (use these verbatim in --metrics later)
uv run scripts/list_evaluation_metrics.py --kind system
uv run scripts/list_evaluation_metrics.py --kind system --name "Pointwise"

# List your custom metrics and their IDs
uv run scripts/list_evaluation_metrics.py --kind custom --json | jq '.[] | {id, name}'

# Create (or reuse) custom LLM-as-a-judge metrics from a definition file (idempotent).
# See templates/custom-metric.json. Prints the resulting metric ID(s).
uv run scripts/create_evaluation_metric.py --file templates/custom-metric.json

Common system metrics: Pointwise Conciseness, Pointwise Answer Relevance, Pointwise Instruction Following, Pointwise Correctness, Pointwise RAG Context Relevance, Pointwise RAG Groundedness, Pointwise RAG Context Precision, Pointwise RAG Completeness. Confirm the exact names for the tenant with list_evaluation_metrics.py --kind system.


Step 6 — create the thing to evaluate

Type 1 — Prompt registry

Create (or reuse) a prompt template in the Prompt Registry, then benchmark it across models.

bash
uv run scripts/list_prompt_templates.py --scenario genai-evaluations          # reuse?
uv run scripts/create_prompt_template.py --file templates/prompt-template.json \
  --name prompt-registry-eval-demo --version 1.0.0

Returns a prompt template ID → pass as --prompt-template-id, together with --models (e.g. "gpt-4o:2024-05-13") in step 7.

Type 2 — Orchestration registry

Create (or reuse) an orchestration config (prompt_templating, no grounding).

bash
uv run scripts/list_orchestration_registry_configs.py --scenario genai-evaluations   # reuse?
uv run scripts/create_orchestration_registry_config.py \
  --file templates/orchestration-registry-config.json \
  --name genai-eval-prompt-config --version 0.0.1

Returns a config ID → pass as --orchestration-registry-ids in step 7.

Type 3 — Grounding orchestration registry (RAG)

First complete the grounding prerequisites in references/GROUNDING_SETUP.md, then create the config from the grounding template (adds a grounding module):

bash
uv run scripts/create_orchestration_registry_config.py \
  --file templates/orchestration-registry-grounding-config.json \
  --name genai-eval-grounding-config --version 0.0.1

Returns a config ID → pass as --orchestration-registry-ids in step 7. Select RAG metrics (Pointwise RAG Groundedness, Pointwise RAG Context Relevance, …) for this type.


Step 7 — evaluation configuration + execution

Use the executable ID genai-evaluations-simplified directly (per Rule 4 — do not use a version/user-suffixed variant). Then create the configuration with this skill's script:

bash
# 2a. Create the evaluation configuration — ORCHESTRATION / GROUNDING types
uv run scripts/create_evaluation_configuration.py \
  --executable-id genai-evaluations-simplified \
  --dataset-artifact-id <artifact-id> \
  --test-dataset-path testdata/full_dataset.csv \
  --test-dataset-type csv \
  --metrics "Pointwise Correctness,Pointwise Answer Relevance" \
  --orchestration-registry-ids <registry-config-id> \
  --orchestration-deployment-url <orchestration-deployment-url> \
  --repetitions 1

# 2b. Create the evaluation configuration — PROMPT REGISTRY type
uv run scripts/create_evaluation_configuration.py \
  --executable-id genai-evaluations-simplified \
  --dataset-artifact-id <artifact-id> \
  --test-dataset-path testdata/full_dataset.csv \
  --metrics "Pointwise Correctness" \
  --prompt-template-id <prompt-template-id> \
  --models "gpt-4o:2024-05-13" \
  --orchestration-deployment-url <orchestration-deployment-url>

Custom metric IDs (from create_evaluation_metric.py) can be appended to --metrics. Limit rows with --test-row-count N. Map variables to dataset columns with --variable-mapping '{"all_metrics/reference":"data/ground_truth"}'.

Then hand off to aicore-lifecycle-management for the run itself:

  • Start the execution — create_execution.py --configuration-id <config-id>
  • Poll until COMPLETED — get_executions.py --execution-id <execution-id> (status goes UNKNOWN → PENDING → RUNNING → COMPLETED)

Results

bash
# Aggregate metrics per model/prompt run (only once COMPLETED)
uv run scripts/get_evaluation_results.py --execution-id <execution-id>
uv run scripts/get_evaluation_results.py --execution-id <execution-id> --json

For instance-level results (per-row scores, latency, logs), download the SQLite DB (<execution-id>/tmp/results.db) from object storage. Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in the environment, then pass the bucket name via --bucket:

bash
uv run scripts/download_evaluation_results.py --execution-id <execution-id> --bucket <bucket> --show-tables

For the full download + local inspection recipe (table schema, querying per-row metrics), see references/RESULTS_ANALYSIS.md.


Handoffs

  • Credentials, resource group, or object store secret not set up? → invoke aicore-admin-resources
  • Need to start/stop/inspect executions, discover executables, or manage deployments? → invoke aicore-lifecycle-management
  • Need a running orchestration deployment or want to design the prompt/RAG pipeline? → invoke genai-hub-orchestration
  • Setting up grounding (RAG) for the grounding type? → see references/GROUNDING_SETUP.md (uses aicore-admin-resources for the resource group and secret)
  • Evaluating an agent (not a prompt/LLM) via the offline service? → invoke aeval-offline-evaluation

When to Load Reference Files

TriggerLoad
Running the full end-to-end evaluation, or unsure which command comes nextreferences/WORKFLOW.md
Setting up grounding (RAG) prerequisites for the grounding orchestration typereferences/GROUNDING_SETUP.md
Downloading and inspecting the raw per-row results (SQLite DB from object storage)references/RESULTS_ANALYSIS.md

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Genai Hub Prompt Evaluation?

Run GenAI evaluations on SAP AI Core: benchmark LLMs and prompts against a test dataset using system-defined and custom (LLM-as-judge) metrics, then retrieve aggregate results. Supports all three evaluation types — prompt registry, orchestration registry, and grounding (RAG) orchestration registry. WHEN: user wants to evaluate or benchmark an LLM / prompt / orchestration config, run a GenAI evaluation, create or list evaluation metrics, define a custom LLM-as-a-judge metric, create a prompt template (prompt registry) or an orchestration-registry config (with or without grounding) for evalua...

Perché usare Genai Hub Prompt Evaluation su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Genai Hub Prompt Evaluation è 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 Genai Hub Prompt Evaluation in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/SAP/ai-skills-library/tree/main/plugins/aicore-skills/skills/genai-hub-prompt-evaluation. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Genai Hub Prompt Evaluation?

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 Genai Hub Prompt Evaluation?

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

La skill IA Genai Hub Prompt Evaluation è gratuita?

Sì. È pubblicata su GitHub da SAP 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 👇