langsmith-evaluator
INVOKE THIS SKILL when building evaluation pipelines for LangSmith.
Skill by Harmeet10000
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/harmeet10000-langsmith-evaluator
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: ml, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/langsmith-evaluator
What's inside
- Skill name
langsmith-evaluator- Description
- INVOKE THIS SKILL when building evaluation pipelines for LangSmith. Covers three core components: (1) Creating Evaluators - LLM-as-Judge, custom code; (2) Defining Run Functions - how to capture outputs and trajectories from your agent; (3) Running Evaluations - locally with evaluate() or auto-run via LangSmith. Uses the langsmith CLI tool.
- License
- MIT
- Instructions
- 359 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (1)
- SKILL.md
SKILL.md (first lines)
<oneliner>
Three core components: **(1) Creating Evaluators** - LLM-as-Judge, custom code; **(2) Defining Run Functions** - capture agent outputs/trajectories for evaluation; **(3) Running Evaluations** - locally with `evaluate()` or auto-run via uploaded evaluators. Python and TypeScript examples included.
</oneliner>
<setup>
Environment Variables
```bash
LANGSMITH_API_KEY=lsv2_pt_your_api_key_here # Required
LANGSMITH_PROJECT=your-project-name # Check this to know which project has traces
LANGSMITH_WORKSPACE_ID=your-workspace-id # Optional: for org-scoped keys
OPENAI_API_KEY=your_openai_key # For LLM as Judge
```
**IMPORTANT:** Always check the environment variables or `.env` file for `LANGSMITH_PROJECT` before querying or interacting with LangSmith. This tells you which project contains the relevant traces and data. If the LangSmith project is not available, use your best judgement to identify the right one.
Python Dependencies
```bash
pip install langsmith langchain-openai python-dotenv
```
CLI Tool (for uploading evaluators)
```bash
curl -sSL https://raw.githubusercontent.com/langchain-ai/langsmith-cli/main/scripts/install.sh | sh
```
JavaScript Dependencies
```bash
npm install langsmith openai
```
</setup>
<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:**
- 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 Differences:**
| | Local `evaluate()` | Uploaded to LangSmith |
|---|---|---|
| **Column name** | Python: auto-derived from function name. TypeScript: must include `key` field or column is untitled | Comes from evaluator name set at upload time. Do NOT include `key` — it creates a duplicate column |
| **Python `run` type** | `RunTree` object → `run.outputs` (attribute) | `dict` → `run["outputs"]` (subscript). Handle both: `run.outputs if hasattr(run, "outputs") else run.get("outputs", {})` |
| **TypeScript `run` type** | Always attribute access: `run.outputs?.field` | Always attribute access: `run.outputs?.field` |
| **Python return** | `{"score": value, "comment": "..."}` | `{"score": value, "comment": "..."}` |
| **TypeScript return** | `{ key: "name", score: value, comment: "..." }` | `{ score: value, comment: "..." }` |
</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 the CLI — only code evaluators are supported. For evaluations against a dataset, STRONGLY PREFER defining local evaluators to use with `evaluate(evaluators=[...])`.
<python>
```python
from typing import TypedDict, Annotated
from langchain_openai import ChatOpenAI
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>
<typescript>
```javascript
import OpenAI from "openai";
const openai = new OpenAI();
async function accuracyEvaluator(run, example) {
const runOutputs = run.outputs ?? {};
const exampleOutputs = example.outputs ?? {};
const response = await openai.chat.completions.create({
model: "gpt-4o-mini",
temperature: 0,
response_format: { type: "json_object" },
messages: [
{ role: "system", content: 'Respond with JSON: {"is_accurate": boolean, "reasoning": string}' },
{ role: "user", content: `Expected: ${JSON.stringify(exampleOutputs)}\nActual: ${JSON.stringify(runOutputs)}\nIs this accurate?` }
]
});From Harmeet10000/skills, MIT.
More from Harmeet10000/skills
- 0.474score
text-to-speech
Harmeet10000
Convert text to speech using ElevenLabs voice AI.
SkillDFreshness: D★ 7Claude Code +9 - 0.469score
ai-music-generation
Harmeet10000
Generate AI music and songs with Diffrythm, Tencent Song Generation via inference.sh CLI.
SkillDFreshness: D★ 7Claude Code +9 - 0.469score
langchain-dependencies
Harmeet10000
INVOKE THIS SKILL when setting up a new project or when asked about package versions, installation, or dependency management for LangChain, LangGraph…
SkillDFreshness: D★ 7Claude Code +9 - 0.466score
deep-agents-orchestration
Harmeet10000
INVOKE THIS SKILL when using subagents, task planning, or human approval in Deep Agents.
SkillDFreshness: D★ 7Claude Code +9 - 0.466score
langchain-middleware
Harmeet10000
INVOKE THIS SKILL when you need human-in-the-loop approval, custom middleware, or structured output.
SkillDFreshness: D★ 7Claude Code +9 - 0.466score
deep-agents-core
Harmeet10000
INVOKE THIS SKILL when building ANY Deep Agents application.
SkillDFreshness: D★ 7Claude Code +9 - 0.466score
deep-agents-memory
Harmeet10000
INVOKE THIS SKILL when your Deep Agent needs memory, persistence, or filesystem access.
SkillDFreshness: D★ 7Claude Code +9 - 0.466score
langsmith-dataset
Harmeet10000
INVOKE THIS SKILL when creating evaluation datasets, uploading datasets to LangSmith, or managing existing datasets.
SkillDFreshness: D★ 7Claude Code +9 - 0.466score
langsmith-trace
Harmeet10000
INVOKE THIS SKILL when working with LangSmith tracing OR querying traces.
SkillDFreshness: D★ 7Claude Code +9 - 0.463score
langchain-fundamentals
Harmeet10000
Create LangChain agents with create_agent, define tools, and use middleware for human-in-the-loop and error handling.
SkillDFreshness: D★ 7Claude Code +9 - 0.461score
crawl4ai
Harmeet10000
Complete toolkit for web crawling and data extraction using Crawl4AI.
SkillDFreshness: D★ 7Claude Code +9 - 0.460score
langchain-architecture
Harmeet10000
Design LLM applications using LangChain 1.x and LangGraph for agents, memory, and tool integration.
SkillDFreshness: D★ 7Claude Code +9
Signals
- Stars
- 7
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Mar 15, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Harmeet10000/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Harmeet10000
- 0.474score
text-to-speech
Harmeet10000
Convert text to speech using ElevenLabs voice AI.
SkillDFreshness: D★ 7Claude Code +9 - 0.469score
langchain-dependencies
Harmeet10000
INVOKE THIS SKILL when setting up a new project or when asked about package versions, installation, or dependency management for LangChain, LangGraph…
SkillDFreshness: D★ 7Claude Code +9 - 0.469score
ai-music-generation
Harmeet10000
Generate AI music and songs with Diffrythm, Tencent Song Generation via inference.sh CLI.
SkillDFreshness: D★ 7Claude Code +9 - 0.466score
deep-agents-core
Harmeet10000
INVOKE THIS SKILL when building ANY Deep Agents application.
SkillDFreshness: D★ 7Claude Code +9 - 0.466score
deep-agents-orchestration
Harmeet10000
INVOKE THIS SKILL when using subagents, task planning, or human approval in Deep Agents.
SkillDFreshness: D★ 7Claude Code +9 - 0.466score
deep-agents-memory
Harmeet10000
INVOKE THIS SKILL when your Deep Agent needs memory, persistence, or filesystem access.
SkillDFreshness: D★ 7Claude Code +9
Cite this page
langsmith-evaluator skill. Agent Mart. https://agentmart.dev/skills/harmeet10000-langsmith-evaluator (last updated 2026-10-24)