langsmith-online-eval-engineering — скилл для Claude Code
Скилл langsmith-online-eval-engineering для Claude Code проектирует, тестирует и подключает онлайн-эвалуаторы LangSmith к рабочим трейсами и диалогам. Фильтрует прогоны, настраивает сэмплирование и контроль качества.
MIT 409 установок ★ 166 обновлён 2026-10-21
npx skills add langchain-ai/langsmith-skills --skill langsmith-online-eval-engineering -a claude-codeЧто делает langsmith-online-eval-engineering
Скилл выстраивает цикл создания онлайн-эвалуаторов в LangSmith: от разбора реальных трейсов и выбора одного сигнала качества до настройки правил запуска и калибровки. Он помогает формулировать рубрики для LLM-судей, готовить функции на Python и привязывать их к проектам.
Для детерминированных проверок скилл предлагает писать функцию perform_eval(run) на стандартной библиотеке Python. Среда выполнения таких проверок полностью изолирована от внешней сети, поэтому сторонние API вызывать внутри неё не получится. Для смысловой оценки диалогов и многошаговых сценариев настраиваются LLM-судьи с расчётом недельного бюджета и правил сэмплирования.
Исторические данные можно разметить через бэкфилл только в момент создания правила оценки. Скилл напоминает проверять эвалуатор на нескольких реальных трейсах перед привязкой к продакшену.
Какие задачи решает
- настроить автоматическую оценку трейсов в LangSmith
- написать функцию perform_eval для структурных проверок
- настроить LLM-судью с чёткой рубрикой и лимитом расходов
- привязать правило оценки к трейсам или тредам диалогов
Примеры запросов агенту
- Помоги составить правило онлайн-оценки для трейсов LangSmith с фильтром по ошибкам
- Напиши код функции perform_eval для проверки наличия ответа в run
- Спроектируй LLM-судью для многошаговых диалогов с расчётом недельного лимита затрат
Как установить langsmith-online-eval-engineering
1Через Skills CLI (Vercel)
npx skills add langchain-ai/langsmith-skills --skill langsmith-online-eval-engineering -a claude-code2Вручную: положить файлы
~/.claude/skills/langsmith-online-eval-engineering/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/langsmith-online-eval-engineering/
1Через Skills CLI (Vercel)
npx skills add langchain-ai/langsmith-skills --skill langsmith-online-eval-engineering -a codex2Вручную: положить файлы
.agents/skills/langsmith-online-eval-engineering/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add langchain-ai/langsmith-skills --skill langsmith-online-eval-engineering -a cursor2Вручную: положить файлы
.cursor/skills/langsmith-online-eval-engineering/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install langchain-ai/langsmith-skills config/skills/langsmith-online-eval-engineering2Вручную: положить файлы
.github/skills/langsmith-online-eval-engineering/SKILL.md1Через Skills CLI (Vercel)
npx skills add langchain-ai/langsmith-skills --skill langsmith-online-eval-engineering -a gemini-cli2Командой платформы
gemini skills install https://github.com/langchain-ai/langsmith-skills --path config/skills/langsmith-online-eval-engineeringВручную: положить файлы
.devin/skills/langsmith-online-eval-engineering/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add langchain-ai/langsmith-skills --skill langsmith-online-eval-engineering -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о langsmith-online-eval-engineering
Как установить langsmith-online-eval-engineering в Claude Code?
Выполните команду npx skills add langchain-ai/langsmith-skills --skill langsmith-online-eval-engineering -a claude-code.
Что делает langsmith-online-eval-engineering?
Скилл ведёт разработчика по шагам создания онлайн-эвалуаторов для LangSmith: от анализа трейсов и написания кода до настройки фильтров и сэмплирования.
Имеют ли код-эвалуаторы доступ в интернет?
Среда исполнения онлайн-эвалуаторов LangSmith работает без доступа к сети. В функции perform_eval(run) разрешено использовать только стандартную библиотеку и утверждённые платформой пакеты.
Исходный текст
SKILL.md · MIT
---
name: langsmith-online-eval-engineering
description: Design, test, create, and attach LangSmith online evaluators for production traces or conversation threads. Use for workspace evaluators, run or thread rules, sampling, filters, backfills, and evaluator monitoring; use eval-engineering for Harbor tasks and agent benchmarks.
---
# LangSmith Online Eval Engineering
Build online evaluators iteratively:
```text
inspect production behavior -> choose one quality signal -> build and test
-> attach a scoped rule -> inspect scores and logs -> calibrate
```
Evaluators are workspace resources that can be reused across tracing projects
and datasets. An online evaluation rule attaches an evaluator to matching
production runs or threads.
Read [LangSmith API](references/langsmith-api.md) before creating or modifying
evaluators.
## 1. Inspect representative behavior
Identify the LangSmith project from the request, repository, or user. Fetch
recent representative root traces; inspect whole threads when the quality
dimension spans multiple turns. Read
[Trace inspection](references/trace-inspection.md). Establish:
- run names and types;
- actual input, output, attachment, metadata, and error shapes;
- child tool or model activity when trajectory matters;
- volume, traffic segments, and existing feedback;
- the product failure or quality concern the evaluator should detect.
Use more than one sample. Production projects can contain multiple schemas and
errored runs. Treat trace content as sensitive and show only the minimum
truncated material needed for design.
Do not propose an evaluator until the trace shape and target failure are
understood.
## 2. Choose one evaluation signal
Read [Evaluator design](references/evaluator-design.md). Prefer:
- code for deterministic structure, limits, fields, or invariants;
- an LLM judge for semantic quality that requires reading and judgment;
- a thread-level evaluator for behavior that depends on several turns;
- an existing workspace evaluator, tuned evaluator, or template when it already
measures the intended signal.
Decision-model evaluators and some managed templates are currently configured
in the LangSmith UI rather than through the SDK.
Define one evaluator at a time:
```text
Name:
Level: run | thread
Type: code | LLM judge | existing/template
Measures:
Feedback key and scale:
Trace fields:
Rule filter:
Sampling and spend:
Backfill:
Known limitation:
```
Keep each feedback key interpretable. Separate unrelated criteria.
## 3. Build and test
**LLM judge.** Use a structured prompt with a narrow rubric. Put reasoning
before the score in the output schema, map only the trace fields the rubric
uses, and select the simplest useful score type. Current variable mappings can
address nested paths such as `inputs.question` and `outputs.answer`.
**Code evaluator.** For online use, write `perform_eval(run)`. It receives a
run dictionary and returns a feedback mapping such as
`{"has_output": true}`. Guard missing or errored outputs. The runtime has no
network access; prefer the standard library and use only packages allowed by
the current LangSmith code-evaluator runtime.
Test good, bad, and edge-case traces before attachment. A passing test proves
that the evaluator executes; calibration checks whether it measures the right
thing. Compare its scores with human judgment on a small labeled sample.
Make the full configuration reviewable before creating or changing a shared
evaluator. Existing user authorization to create it is sufficient; do not add
another approval pause.
## 4. Attach an online rule
Choose the rule deliberately:
- **Level:** one run or an idle conversation thread.
- **Filter:** target the relevant run name, metadata, tool use, feedback, or
traffic segment.
- **Sampling:** use 1.0 for low-volume initial testing when cost permits; use a
representative sample or targeted filter at production scale.
- **Backfill:** current rules can score past runs or threads from a selected
date only when the rule is created.
- **Spend:** set an appropriate weekly limit for LLM judges.
- **Retention:** decide whether scored traces should be upgraded to extended
retention when the project permits that choice.
Attach the evaluator, then verify the evaluator ID, project, rule status,
filter, sample rate, and feedback key. Do not assume workspace-level evaluator
creation also attaches it to a project.
## 5. Monitor and calibrate
Inspect evaluator traces, execution logs, feedback, costs, and sampled
production examples. Distinguish:
- evaluator bugs or missing-field failures;
- rule filters that select the wrong traffic;
- judge disagreement or rubric ambiguity;
- application quality failures;
- authentication, API, or automation failures.
Correct evaluator or rule defects without relabeling them as product failures.
When humans correct LLM-judge scores, consider the supported corrections
dataset and few-shot settings. Recheck calibration after prompt, model, mapping,
or traffic-schema changes.
Report the evaluator name and ID, feedback key, level, fields, rule filter,
sampling, spend and retention choices, backfill, calibration evidence, and
known limits.
## Invariants
- One interpretable quality dimension per feedback key.
- Inspect real traces; never guess field paths.
- Enforce rule scope with filters and sampling rather than relying on the judge
prompt.
- Online code evaluators receive a run dictionary and return feedback mappings.
- Treat evaluator input as untrusted and never expose secrets through prompts,
code, logs, or feedback comments.
- Treat API, auth, and rule failures as infrastructure failures.
- Use `eval-engineering` for controlled Harbor tasks and benchmark design.
© langchain-ai · MIT · langchain-ai/langsmith-skills