Token导航 LogoToken导航

Agent Skill · 开发

langsmith-evaluators(朗史密斯评估员)

langsmith-evaluators 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

langsmith-evaluators 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有未通过项,按安装量在开发类的 21,746 个 Skill 里排第 1,955。

总安装 22,064周安装 586GitHub Stars 638下载 5,251核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:langsmith-evaluators(朗史密斯评估员)
来源仓库:https://github.com/langchain-ai/langchain-skills
仓库路径:skills/langsmith-evaluators
安装命令:
npx skills add https://github.com/langchain-ai/langchain-skills --skill 'LangSmith Evaluators'
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/langchain-ai/langchain-skills --skill 'LangSmith Evaluators'

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于处理 GitHub 仓库、Issue 和 Pull Request 信息。适合整理代码变更、协作事项和仓库状态。通过 GitHub 安装并使用 npx 命令激活。需确认权限范围和维护状态,注意是否触发联网或文件读写。langsmith-evaluators 属于开发类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/langsmith-evaluators

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/langchain-ai/langchain-skills --skill 'LangSmi…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

langsmith-evaluators 怎么安装?

在终端执行 npx skills add https://github.com/langchain-ai/langchain-skills --skill 'LangSmith Evaluat…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

langsmith-evaluators 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

langsmith-evaluators 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

langsmith-evaluators 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

langsmith-evaluators 用的人多吗?

公开数据是累计安装 22,064 次,近一周安装 586 次,下载 5,251 次,GitHub 638 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

langsmith-evaluators 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
langsmith-evaluators

朗史密斯评估员 · 本页

22,064638需要联网未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

LANGSMITH_API_KEY=lsv2_pt_your_api_key_here          # Required
LANGSMITH_WORKSPACE_ID=your-workspace-id              # Optional: for org-scoped keys
OPENAI_API_KEY=your_openai_key                        # For LLM as Judge

Python Dependencies

pip install langsmith langchain-openai python-dotenv

JavaScript Dependencies

npm install langsmith commander chalk cli-table3 dotenv openai

<crucial_requirement>

Golden Rule: Inspect Before You Implement

CRITICAL: Before writing ANY evaluator or extraction logic, you MUST:

  1. Run your agent on sample inputs and capture the actual output
  2. Inspect the output - print it, query LangSmith traces, understand the exact structure
  3. Only then write code that processes that output

Output structures vary significantly by framework, agent type, and configuration. Never assume the shape - always verify first. Query LangSmith traces to when outputs don't contain needed data to understand how to extract from execution. </crucial_requirement>

<evaluator_format>

Offline vs Online Evaluators

Offline Evaluators (attached to datasets):

  • Function signature: (run, example) - receives both run outputs and dataset example
  • Use case: Comparing agent outputs to expected values in a dataset
  • Upload with: --dataset "Dataset Name"

Online Evaluators (attached to projects):

  • Function signature: (run) - receives only run outputs, NO example parameter
  • Use case: Real-time quality checks on production runs (no reference data)
  • Upload with: --project "Project Name"

CRITICAL - Return Format:

  • Return {"score": value, "comment": "..."} - the metric key is auto-derived from the function name
  • Each evaluator returns ONE metric only. For multiple metrics, create multiple evaluator functions.
  • Do NOT return {"metric_name": value} or lists of metrics - this will error.

CRITICAL - Local vs Uploaded (Python only):

  • Local evaluate(): run is a RunTree object → use run.outputs
  • Uploaded to LangSmith: run is a dict → use run["outputs"]
  • Handle both: run.outputs if hasattr(run, "outputs") else run.get("outputs", {})
  • TypeScript always uses attribute access: run.outputs?.field </evaluator_format>

<evaluator_types>

  • LLM as Judge - Uses an LLM to grade outputs. Best for subjective quality (accuracy, helpfulness, relevance).
  • Custom Code - Deterministic logic. Best for objective checks (exact match, trajectory validation, format compliance). </evaluator_types>

<llm_judge>

LLM as Judge Evaluators

NOTE: LLM-as-Judge upload is currently not supported by our script only supports code evaluators. For evaluations against a dataset, STRONGLY PREFER defining local evaluators to use with evaluate(evaluators=[...]).

class Grade(TypedDict): reasoning: Annotated[str,..., "Explain your reasoning"] is_accurate: Annotated[bool,..., "True if response is accurate"]

judge = ChatOpenAI(model="gpt-4o-mini", temperature=0).with_structured_output(Grade, method="json_schema", strict=True)

async def accuracy_evaluator(run, example): run_outputs = run.outputs if hasattr(run, "outputs") else run.get("outputs", {}) or {} example_outputs = example.outputs if hasattr(example, "outputs") else example.get("outputs", {}) or {} grade = await judge.ainvoke([{"role": "user", "content": f"Expected: {example_outputs}\nActual: {run_outputs}\nIs this accurate?"}]) return {"score": 1 if grade["is_accurate"] else 0, "comment": grade["reasoning"]}

</python>
</llm_judge>

<code_evaluators>
## Custom Code Evaluators

**Before writing an evaluator:**
1. Inspect your dataset to understand expected field names (see Golden Rule above)
2. Test your run function and verify its output structure matches the dataset schema
3. Query LangSmith traces to debug any mismatches

<python>

def trajectory_evaluator(run, example): run_outputs = run.outputs if hasattr(run, "outputs") else run.get("outputs", {}) or {} example_outputs = example.outputs if hasattr(example, "outputs") else example.get("outputs", {}) or {} # IMPORTANT: Replace these placeholders with your actual field names # 1. Query your LangSmith trace to see what fields exist in run outputs # 2. Check your dataset schema for expected field names # Note: Trajectory data may not appear in default output - verify against trace! actual = run_outputs.get("YOUR_TRAJECTORY_FIELD", []) expected = example_outputs.get("YOUR_EXPECTED_FIELD", []) return {"score": 1 if actual == expected else 0, "comment": f"Expected {expected}, got {actual}"}


<run_functions>

## Defining Run Functions

Run functions execute your agent and return outputs for evaluation.

**CRITICAL - Test Your Run Function First:** Before writing evaluators, you MUST test your run function and inspect the actual output structure. Output shapes vary by framework, agent type, and configuration.

**Debugging workflow:**

1. Run your agent once on sample input
2. Query the trace to see the execution structure
3. Print the raw output and verify against trace to output contains the right data
4. Adjust the run function as needed
5. Verify your output matches your dataset schema

**Try your hardest to match your run function output to your dataset schema.** This makes evaluators simple and reusable. If matching isn't possible, your evaluator must know how to extract and compare the right fields from each side.

def run_agent(inputs: dict) -> dict: result = your_agent.run(inputs) # ALWAYS inspect output shape first - run this, check the print, query traces print(f"DEBUG - type: {type(result)}, keys: {result.keys() if hasattr(result, 'keys') else 'N/A'}") print(f"DEBUG - value: {result}") return {"output": result} # Adjust to match your dataset schema


### Capturing Trajectories

For trajectory evaluation, your run function must capture tool calls during execution.

**CRITICAL:** Run output formats vary significantly by framework and agent type. You MUST inspect before implementing:

**LangGraph agents (LangChain OSS):** Use `stream_mode="debug"` with `subgraphs=True` to capture nested subagent tool calls.

import uuid

def run_agent_with_trajectory(agent, inputs: dict) -> dict: config = {"configurable": {"thread_id": f"eval-{uuid.uuid4()}"}} trajectory = [] final_result = None

for chunk in agent.stream(inputs, config=config, stream_mode="debug", subgraphs=True): # STEP 1: Print chunks to understand the structure print(f"DEBUG chunk: {chunk}")

# STEP 2: Write extraction based on YOUR observed structure # ... your extraction logic here ...

# IMPORTANT: After running, query the LangSmith trace to verify # your trajectory data is complete. Default output may be missing # tool calls that appear in the trace. return {"output": final_result, "trajectory": trajectory}


**Custom / Non-LangChain Agents:**

1. **Inspect output first** - Run your agent and inspect the result structure. Trajectory data may already be included in the output (e.g., `result.tool_calls`, `result.steps`, etc.)
2. **Callbacks/Hooks** - If your framework supports execution callbacks, register a hook that records tool names on each invocation
3. **Parse execution logs** - As a last resort, extract tool names from structured logs or trace data

The key is to capture the tool name at execution time, not at definition time. </run_functions>

**IMPORTANT - Auto-Run Behavior:** Evaluators uploaded to a dataset **automatically run** when you run experiments on that dataset. You do NOT need to pass them to `evaluate()` - just run your agent against the dataset and the uploaded evaluators execute automatically.

**IMPORTANT - Local vs Uploaded:** Uploaded evaluators have very limited package access for security reasons! DO NOT upload evaluators that unless they only need to rely on standard Python / Javascript functionality, such as built-in packages. For dataset (offline) evaluators, prefer running locally with `evaluate(evaluators=[...])` first. This gives you full package access.

**IMPORTANT - Code vs Structured Evaluators:**

- **Code evaluators** (what our script uploads): Run in a limited environment without external packages. Use for deterministic logic (exact match, trajectory validation).
- **Structured evaluators** (LLM-as-Judge): Configured via LangSmith UI, use a specific payload format with model/prompt/schema. Our script does not support this format yet.

**IMPORTANT - Choose the right target:**

- `--dataset`: Offline evaluator with `(run, example)` signature - for comparing to expected values
- `--project`: Online evaluator with `(run)` signature - for real-time quality checks

You must specify one. Global evaluators are not supported.

List all evaluators

python upload_evaluators.py list

Upload offline evaluator (attached to dataset)

python upload_evaluators.py upload my_evaluators.py \ --name "Trajectory Match" --function trajectory_evaluator \ --dataset "My Dataset" --replace

Upload online evaluator (attached to project)

python upload_evaluators.py upload my_evaluators.py \ --name "Quality Check" --function quality_check \ --project "Production Agent" --replace

Delete

python upload_evaluators.py delete "Trajectory Match"

List all evaluators

npx tsx upload_evaluators.ts list

Upload offline evaluator (attached to dataset)

npx tsx upload_evaluators.ts upload my_evaluators.js \ --name "Trajectory Match" --function trajectoryEvaluator \ --dataset "My Dataset" --replace

Upload online evaluator (attached to project)

npx tsx upload_evaluators.ts upload my_evaluators.js \ --name "Quality Check" --function qualityCheck \ --project "Production Agent" --replace

Delete

npx tsx upload_evaluators.ts delete "Trajectory Match"


**IMPORTANT - Safety Prompts:**

- The script prompts for confirmation before destructive operations
- **NEVER use `--yes` flag unless the user explicitly requests it**

<best_practices>

1. **Use structured output for LLM judges** - More reliable than parsing free-text
2. **Match evaluator to dataset type**
  - Final Response → LLM as Judge for quality
  - Trajectory → Custom Code for sequence
3. **Use async for LLM judges** - Enables parallel evaluation
4. **Test evaluators independently** - Validate on known good/bad examples first
5. **Choose the right language**
  - Python: Use for Python agents, langchain integrations
  - JavaScript: Use for TypeScript/Node.js agents </best_practices>

<running_evaluations>

## Running Evaluations

**Uploaded evaluators** auto-run when you run experiments - no code needed. **Local evaluators** are passed directly for development/testing.

from langsmith import evaluate

Uploaded evaluators run automatically

results = evaluate(run_agent, data="My Dataset", experiment_prefix="eval-v1")

Or pass local evaluators for testing

results = evaluate(run_agent, data="My Dataset", evaluators=[my_evaluator], experiment_prefix="eval-v1")


</running_evaluations>

**Output doesn't match what you expect:** Query the LangSmith trace. It shows exact inputs/outputs at each step - compare what you find to what you're trying to extract.

**One metric per evaluator:** Return `{"score": value, "comment": "..."}`. For multiple metrics, create separate functions.

**Field name mismatch:** Your run function output must match dataset schema exactly. Inspect dataset first with `client.read_example(example_id)`.

**RunTree vs dict (Python):** Local `evaluate()` passes `RunTree`, uploaded evaluators receive `dict`. Handle both:

run_outputs = run.outputs if hasattr(run, "outputs") else run.get("outputs", {}) or {}

平台分布

Codex

37.75%
按下载量换算1,982

Claude

31.95%
按下载量换算1,678

Cursor

18.1%
按下载量换算950

Gemini CLI

8.68%
按下载量换算456

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills