Command Palette

Search for a command to run...

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

langchain-agent-experiments

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

Use when testing an agent or LLM application offline in LangSmith before it ships, including building and maintaining evaluation datasets, writing the target…

langchain-aiот langchain-ai★ 1 369 звёзд на GitHub

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

Test agents with LangSmith experiments

An experiment runs one version of an application over a dataset and scores each result with evaluators. It answers "is this version better than the last one, and where does it fail?" before a change ships.

The order matters: inspect real outputs, shape the dataset to match, write the target function, then evaluators. Most broken evaluations come from guessing the output shape.

Choose the harness

  • Experiment with evaluate(): the default for comparing versions of an application over a shared dataset, with results, comparisons, and evaluator feedback in LangSmith.
  • pytest or Vitest/Jest integration: when the checks belong next to the code as test cases with assertions, run in CI, and the team already reads test output. Results are still logged to LangSmith as experiments.
  • Harbor task: when the agent must act in a controlled environment, such as files, services, or a simulated user, and the verifier inspects the resulting state. Use langchain-eval-engineering.
  • Online evaluator: when the question is how live traffic behaves, not how a candidate version compares. Use langchain-agent-monitoring.

Inspect before you build

Run the application on a few representative inputs and read the traces (langchain-agent-tracing covers finding them). Note the exact fields in the root run's inputs and outputs, and where tool calls, retrieved documents, or intermediate decisions appear. Framework output shapes vary; never assume one.

Build the dataset

Default to assertion-based reference outputs: short claims a correct answer must or must not satisfy, stored as {"assertions": [{"key", "comment"}]} in the example's outputs. Assertions survive harmless rewording, accept more than one good answer, and give one score per claim, so a failure points at the criterion that broke. Name keys after the claim (must_cite_source, must_not_promise_refund) and keep each comment to one checkable sentence. Where you can, phrase an assertion so code can decide it (an exact phrase, field, link, or tool call) rather than one that needs a judge.

Use a different shape only when the check needs it:

  • Exact answer: a single correct value, such as a label, number, or extracted field.
  • Single step: the inputs and expected output of one model call, node, or tool. Tests a component in isolation.
  • Trajectory: inputs and the expected tool calls. Tests the execution path.
  • Retrieval: the chunks a question should retrieve or cite. Tests grounding.
  • Conversation: for a multi-turn agent, either store the conversation so far and score the next reply, or store a scenario and let a simulated user (openevals) drive several turns, then score the whole conversation. The first is cheaper and repeatable; the second tests how the agent recovers.

Start from production traces when they exist: they hold the inputs users actually send. Keep the root runs worth testing and write what a correct answer must contain. Do not copy the recorded output as the reference; that turns today's mistakes into the expected answer. Reviewers can write assertions while reviewing runs in a single-run annotation queue, and Engine can propose them for recurring issues; both save to a dataset. Keep failure and edge cases, not only the happy path.

Create and maintain it with the CLI

Write the first version as a JSON array of {"inputs": {...}, "outputs": {...}} objects and upload it. upload always creates a new dataset and reads only inputs and outputs, so add metadata and splits afterward.

langsmith datasets upload ./dataset.json --name "support-agent-regression"
langsmith examples list --dataset "support-agent-regression" --format json

After that, change the dataset in place rather than uploading a new copy:

  • Add: langsmith examples create.
  • Edit: langsmith examples update replaces each field it is given, so pass the full new value, such as every assertion, not just the one that changed.
  • Large edits: export with langsmith datasets export, review the change, then apply it example by example.
  • Freeze a version: before comparing experiments across changes, tag it with langsmith datasets update-tags and run experiments against that tag.

Use the SDK (Client.create_examples, Client.update_examples) when building or editing the dataset from code. Every change creates a new dataset version, so earlier experiments keep pointing at the examples they ran on. Never delete and recreate a dataset to refresh it: deleting a dataset deletes its experiments.

When test cases live in git, keep one LangSmith dataset per eval suite, not a copy per branch or developer; copies get different example IDs, so their experiments cannot be compared. Give each case a stable ID, derive the example ID from it, update examples in place, and record the branch and commit in experiment metadata. When several branches w

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

Установить langchain-agent-experiments в Claude Code и Claude Desktop

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

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

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

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

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

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

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

references/experiment-trace-replicas.mdreferences/graph-evaluators.mdreferences/remote-agent-tracing.md

FAQ

Что делает скилл langchain-agent-experiments?

Use when testing an agent or LLM application offline in LangSmith before it ships, including building and maintaining evaluation datasets, writing the target function and evaluators, aligning LLM judges with human labels, running and comparing experiments, and diagnosing why an experiment scored badly.

Как установить скилл langchain-agent-experiments?

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

Скилл langchain-agent-experiments запускает скрипты?

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

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

Сравнить langchain-agent-experiments с