Logo: Llm Evaluation

Llm Evaluation

Communautéit
nimadorostkar
llm-evaluation

Use when measuring the quality of an LLM feature. Covers building an evaluation set, choosing metrics, LLM-as-judge and its pitfalls, regression testing prompts, and evaluating in production. Trigger on "did my prompt change make it better", "build an eval set", "can i use an llm as a judge", "users say the answers got worse". Do not use for rewriting the prompt itself — see the prompt-engineering skill; for picking between models, see the model-selection skill.

Iwwersiicht

Editeurnimadorostkar
RepositoryClaude-Skills-collection
Skill-Nummllm-evaluation
Stären
34
Forks
4
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    nimadorostkar huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Llm Evaluation an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/ai/llm-evaluation
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection.git /tmp/Claude-Skills-collection
mkdir -p .claude/skills
cp -r /tmp/Claude-Skills-collection/skills/ai/llm-evaluation .claude/skills/llm-evaluation
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Llm Evaluation an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Llm Evaluation automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Llm Evaluation net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

LLM Evaluation

Purpose

Know whether an LLM feature is getting better or worse. Without evaluation, every prompt change is a guess, and the confidence that a change helped is indistinguishable from the confidence that it did not.

When to Use

  • Before iterating on any prompt or model in production.
  • Comparing models, prompts, or retrieval strategies.
  • Setting up regression testing for an LLM feature.
  • Deciding whether a quality complaint is real or anecdotal.

Capabilities

  • Evaluation-set construction from real usage.
  • Metric selection: exact match, similarity, rubric-based, task-specific.
  • LLM-as-judge, with the controls that make it trustworthy.
  • Regression testing in CI.
  • Online evaluation and production monitoring.

Inputs

  • Real inputs from actual usage, not invented ones.
  • A definition of correct — which is the hard part.
  • The current behavior, as a baseline.

Outputs

  • An evaluation set that includes the hard cases.
  • A metric that correlates with what users actually care about.
  • A baseline score, and a gate that catches regressions.

Workflow

  1. Build the set from real usage — Fifty to two hundred real inputs, including the failures. An evaluation set of invented examples measures your imagination, not the system.
  2. Define correct precisely — For extraction, the exact expected output. For open-ended generation, a rubric with concrete criteria. "A good summary" is not a criterion; "mentions all three decisions and no facts absent from the source" is.
  3. Choose the cheapest sufficient metric — Exact match where possible. String or semantic similarity next. LLM-as-judge only where the output is genuinely open-ended.
  4. Validate the judge — Have a human grade fifty cases. If the judge disagrees with the human more than about 15% of the time, the judge is not measuring what you think.
  5. Baseline, then change one thing — Measure. Change one variable. Measure again on the same set. Anything else is not evidence.
  6. Gate in CI — A prompt change that drops the score below the threshold fails the build, exactly like any other regression.

Best Practices

  • The evaluation set must contain the cases that fail today. A set on which the system already scores 100% cannot measure improvement.
  • LLM-as-judge is biased toward longer answers, toward its own outputs, and toward the first option presented. Randomize the order, control for length, and validate against human judgment before trusting it.
  • A single aggregate score hides everything. Break it down by input category — a change that improves the average while destroying one category is a regression for those users.
  • Never evaluate on the examples in your prompt. That measures memorization.
  • Evaluate the whole pipeline and the components separately. A RAG system's failure is either retrieval or generation, and the aggregate score does not tell you which.
  • Track the score over time. LLM quality changes silently when the provider updates the model.

Examples

A rubric-based judge, validated against humans:

python
JUDGE_PROMPT = """\
You are grading a customer support summary against the original conversation.

Score each criterion independently, 0 or 1:

1. COMPLETE:  Every action item in the conversation appears in the summary.
2. GROUNDED:  Every statement in the summary is supported by the conversation.
              A single invented fact scores 0.
3. RESOLUTION: The summary correctly states whether the issue was resolved.
4. CONCISE:   The summary is under 100 words and contains no filler.

Conversation:
{conversation}

Summary:
{summary}

Respond with JSON only:
{{"complete": 0|1, "grounded": 0|1, "resolution": 0|1, "concise": 0|1, "notes": "<brief>"}}"""


# The judge must be validated before it is trusted.
def validate_judge(human_graded: list[Case]) -> float:
    agreement = sum(
        judge(c.conversation, c.summary) == c.human_score for c in human_graded
    ) / len(human_graded)

    if agreement < 0.85:
        raise ValueError(
            f"Judge agrees with humans only {agreement:.0%} of the time. "
            "It is measuring something else. Fix the rubric before using it."
        )
    return agreement

A regression gate that stops a bad prompt from shipping:

python
def test_summarization_quality_has_not_regressed():
    results = [evaluate(case) for case in load_eval_set("support-summaries-v3")]

    grounded = mean(r.grounded for r in results)
    complete = mean(r.complete for r in results)

    # Hallucination is the failure that matters most: it is a hard floor.
    assert grounded >= 0.98, f"Grounding regressed to {grounded:.2%} (floor: 98%)"
    assert complete >= 0.90, f"Completeness regressed to {complete:.2%} (floor: 90%)"

    # And the breakdown, because an average hides a category collapse.
    by_category = group_by(results, key=lambda r: r.case.category)
    for category, group in by_category.items():
        score = mean(r.overall for r in group)
        assert score >= 0.85, f"Category '{category}' regressed to {score:.2%}"

Notes

  • The most common evaluation mistake is a set that is too easy. If a change to the prompt does not move the score, either the change did nothing or the set cannot detect it — check which.
  • Judge models are cheaper and faster than humans and roughly as consistent, once validated. The validation step is not optional; an unvalidated judge is a random number generator with good grammar.
  • Online evaluation — sampling real production outputs and grading them — catches the drift that an offline set never will, because production inputs change and your evaluation set does not.

Heefeg gestallte Froen

Wat mécht de KI-Skill Llm Evaluation?

Use when measuring the quality of an LLM feature. Covers building an evaluation set, choosing metrics, LLM-as-judge and its pitfalls, regression testing prompts, and evaluating in production. Trigger on "did my prompt change make it better", "build an eval set", "can i use an llm as a judge", "users say the answers got worse". Do not use for rewriting the prompt itself — see the prompt-engineering skill; for picking between models, see the model-selection skill.

Firwat Llm Evaluation op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Llm Evaluation besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Llm Evaluation an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/ai/llm-evaluation an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Llm Evaluation benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Llm Evaluation benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Llm Evaluation domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Llm Evaluation gratis?

Jo. nimadorostkar huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇