Command Palette

Search for a command to run...

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

testing-llm-features

БесплатноБез исполняемых скриптовНе проверен

Builds an offline eval suite for LLM-powered features: golden reference cases per prompt template, deterministic scoring where possible, a regression gate on…

jaktestowacот jaktestowac★ 124 звезды на GitHub

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

Testing LLM Features

Use this skill when a product's behaviour depends on a model, and the current verification method is a person looking at output and deciding it seems fine.

The problem is not that LLM output is hard to assert on. It is that the same input produces different output, and a prompt or model change can degrade quality without breaking anything. No test in a normal suite fails. Coverage stays green. The feature just gets worse, and you find out from users.

An eval suite is the unit-test layer for this: a fixed set of cases, run on every change that could affect model behaviour, scored consistently enough that a regression is visible.

When to Use

  • a feature calls a model and there is no automated check on output quality
  • a prompt, model version, temperature, tool list, or retrieval config is about to change
  • a model upgrade is proposed and nobody can say what would regress
  • an agent or chain has grown beyond what manual spot-checks can cover
  • RAG answers are drifting and it is unclear whether retrieval or generation is at fault
  • a CI gate is needed for AI behaviour, not just AI code

Operating Principles

  • Golden cases, not vibes. A case has an input, an expectation, and a scoring rule. "Looks good" is not an expectation.
  • Determinism where you can get it. Pin the model version, set temperature to 0, fix seeds, freeze retrieval snapshots. Non-determinism is a property of the model; it is not an excuse for a non-reproducible test.
  • Test the assertable layer first. Schema conformance, required fields, refusal behaviour, citation presence, tool-call shape, latency and cost. Most feature-breaking regressions are structural, and structural checks are cheap and exact.
  • Rubrics before judges. If an LLM judges the output, it needs a written rubric with a scale, and the judge itself needs validating against human labels. An unrubriced judge is a random number with an API bill.
  • A regression is a new failure on a case that used to pass. That is the gate. An absolute score threshold on a hard case set gates nothing useful.
  • Separate retrieval failures from generation failures. A RAG answer can be wrong because the right document was never retrieved. Score retrieval independently or you will tune the prompt to fix an index problem.
  • Cases are a product artifact. They encode what the feature promises. Review them like code and grow them from real failures.
  • Cost and latency are results. A 12% quality gain for 4× the cost and 3× the latency is a product decision, so report all three.

Workflow

Phase 0: Map the surface

Find everything that can change model behaviour, because each is a trigger for the suite:

Element Where to look
Prompt templates prompts/, *.prompt.*, template literals passed to the SDK
System prompts client construction, agent definitions
Model config model id, temperature, top_p, max tokens, stop sequences, thinking budget
Tool definitions tool/function schemas, MCP servers, tool grants
Retrieval chunking, embedding model, index, topK, reranking, filters
Output contract Zod/schema on the response, structured-output config, parsing code
Orchestration chain and agent-loop structure, retries, fallbacks between models

Write down what the feature promises - the user-visible contract. "Summarise the ticket in ≤3 sentences, never invent a customer name, always cite the ticket id." That sentence is where the cases come from.

Phase 1: Design the case set

./resources/eval-case-design.md has the taxonomy. The minimum viable set per prompt template:

Class Purpose Count to start
Golden canonical inputs with known-good outputs 5–10
Edge empty, huge, multilingual, malformed, contradictory input 5
Negative must refuse, must not answer, must not leak 3–5
Regression one case per bug ever found in production grows forever
Adversarial injection and jailbreak attempts see testing-llm-guardrails

Cases carry the metadata that makes a failure diagnosable: which prompt template, which capability, why the expectation is what it is. A case whose expectation nobody can justify is a case nobody will maintain.

The regression class is the one that compounds. Every production incident becomes a permanent case. After six months this set is the most valuable test asset the feature has, and it costs one case per incident to build.

Phase 2: Choose scoring per case

./resources/scoring-strategies.md covers each in detail. Pick the cheapest one that can actually fail:

Strategy Use when Cost
Exact / regex match classification, extraction, IDs, enum outputs free, exact
Schema validation any structured output free, exact
Required / forbidden substrings must cite the ticket id, must never say "as an AI" free
Deterministic prop
Полный SKILL.md на GitHub

Установить testing-llm-features в Claude Code и Claude Desktop

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

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

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

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

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

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

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

resources/eval-case-design.mdresources/promptfoo-setup.mdresources/scoring-strategies.md

FAQ

Что делает скилл testing-llm-features?

Builds an offline eval suite for LLM-powered features: golden reference cases per prompt template, deterministic scoring where possible, a regression gate on prompt, model and retrieval changes, and CI wiring with promptfoo, Vitest or deepeval. Use when a product ships prompts, agents or RAG, when a model or prompt upgrade needs a regression check, when LLM output is currently verified by someone eyeballing it, or when asked how to test a feature whose output is non-deterministic.

Как установить скилл testing-llm-features?

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

Скилл testing-llm-features запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить testing-llm-features с