Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

evaluating-llms

БесплатноЗапускает вложенные скриптыНе проверен

Evaluate LLM systems using automated metrics, LLM-as-judge, and benchmarks. Use when testing prompt quality, validating RAG pipelines, measuring safety…

ancolemanот ancoleman★ 535 звёзд на GitHub

Об этом скилле

LLM Evaluation

Evaluate Large Language Model (LLM) systems using automated metrics, LLM-as-judge patterns, and standardized benchmarks to ensure production quality and safety.

When to Use This Skill

Apply this skill when:

  • Testing individual prompts for correctness and formatting
  • Validating RAG (Retrieval-Augmented Generation) pipeline quality
  • Measuring hallucinations, bias, or toxicity in LLM outputs
  • Comparing different models or prompt configurations (A/B testing)
  • Running benchmark tests (MMLU, HumanEval) to assess model capabilities
  • Setting up production monitoring for LLM applications
  • Integrating LLM quality checks into CI/CD pipelines

Common triggers:

  • "How do I test if my RAG system is working correctly?"
  • "How can I measure hallucinations in LLM outputs?"
  • "What metrics should I use to evaluate generation quality?"
  • "How do I compare GPT-4 vs Claude for my use case?"
  • "How do I detect bias in LLM responses?"

Evaluation Strategy Selection

Decision Framework: Which Evaluation Approach?

By Task Type:

Task Type Primary Approach Metrics Tools
Classification (sentiment, intent) Automated metrics Accuracy, Precision, Recall, F1 scikit-learn
Generation (summaries, creative text) LLM-as-judge + automated BLEU, ROUGE, BERTScore, Quality rubric GPT-4/Claude for judging
Question Answering Exact match + semantic similarity EM, F1, Cosine similarity Custom evaluators
RAG Systems RAGAS framework Faithfulness, Answer/Context relevance RAGAS library
Code Generation Unit tests + execution Pass@K, Test pass rate HumanEval, pytest
Multi-step Agents Task completion + tool accuracy Success rate, Efficiency Custom evaluators

By Volume and Cost:

Samples Speed Cost Recommended Approach
1,000+ Immediate $0 Automated metrics (regex, JSON validation)
100-1,000 Minutes $0.01-0.10 each LLM-as-judge (GPT-4, Claude)
< 100 Hours $1-10 each Human evaluation (pairwise comparison)

Layered Approach (Recommended for Production):

  1. Layer 1: Automated metrics for all outputs (fast, cheap)
  2. Layer 2: LLM-as-judge for 10% sample (nuanced quality)
  3. Layer 3: Human review for 1% edge cases (validation)

Core Evaluation Patterns

Unit Evaluation (Individual Prompts)

Test single prompt-response pairs for correctness.

Methods:

  • Exact Match: Response exactly matches expected output
  • Regex Matching: Response follows expected pattern
  • JSON Schema Validation: Structured output validation
  • Keyword Presence: Required terms appear in response
  • LLM-as-Judge: Binary pass/fail using evaluation prompt

Example Use Cases:

  • Email classification (spam/not spam)
  • Entity extraction (dates, names, locations)
  • JSON output formatting validation
  • Sentiment analysis (positive/negative/neutral)

Quick Start (Python):

import pytest
from openai import OpenAI

client = OpenAI()

def classify_sentiment(text: str) -> str:
    response = client.chat.completions.create(
        model="gpt-3.5-turbo",
        messages=[
            {"role": "system", "content": "Classify sentiment as positive, negative, or neutral. Return only the label."},
            {"role": "user", "content": text}
        ],
        temperature=0
    )
    return response.choices[0].message.content.strip().lower()

def test_positive_sentiment():
    result = classify_sentiment("I love this product!")
    assert result == "positive"

For complete unit evaluation examples, see examples/python/unit_evaluation.py and examples/typescript/unit-evaluation.ts.

RAG (Retrieval-Augmented Generation) Evaluation

Evaluate RAG systems using RAGAS framework metrics.

Critical Metrics (Priority Order):

  1. Faithfulness (Target: > 0.8) - MOST CRITICAL

    • Measures: Is the answer grounded in retrieved context?
    • Prevents hallucinations
    • If failing: Adjust prompt to emphasize grounding, require citations
  2. Answer Relevance (Target: > 0.7)

    • Measures: How well does the answer address the query?
    • If failing: Improve prompt instructions, add few-shot examples
  3. Context Relevance (Target: > 0.7)

    • Measures: Are retrieved chunks relevant to the query?
    • If failing: Improve retrieval (better embeddings, hybrid search)
  4. Context Precision (Target: > 0.5)

    • Measures: Are relevant chunks ranked higher than irrelevant?
    • If failing: Add re-ranking step to retrieval pipeline
  5. Context Recall (Target: > 0.8)

    • Measures: Are all relevant chunks retrieved?
    • If failing: Increase retrieval count, improve chunking strategy

Quick Start (Python with RAGAS):

from ragas import evaluate
from ragas.metrics import faithfulness, answer_relevancy, context_relevancy
from datasets import Dataset

d
Полный SKILL.md на GitHub

Установить evaluating-llms в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/python/benchmark_testing.pyexamples/python/classification_metrics.pyexamples/python/deepeval_example.pyexamples/python/llm_as_judge.pyexamples/python/ragas_example.pyexamples/python/unit_evaluation.pyexamples/typescript/langsmith-integration.tsexamples/typescript/llm-as-judge.tsexamples/typescript/unit-evaluation.tsoutputs.yamlreferences/benchmarks.mdreferences/evaluation-types.mdreferences/llm-as-judge.mdreferences/metrics-reference.mdreferences/production-evaluation.mdreferences/rag-evaluation.mdreferences/safety-evaluation.md

FAQ

Что делает скилл evaluating-llms?

Evaluate LLM systems using automated metrics, LLM-as-judge, and benchmarks. Use when testing prompt quality, validating RAG pipelines, measuring safety (hallucinations, bias), or comparing models for production deployment.

Как установить скилл evaluating-llms?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл evaluating-llms запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить evaluating-llms с