Skip to content
Skillv1.0.0

braintrust

You are an expert in Braintrust, the evaluation and observability platform for AI applications. You help developers run systematic evaluations, compare model versions, track experiments, log productio

by terminalskills(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from terminalskills/skills (skills/braintrust/SKILL.md). Install upstream with npx skills add terminalskills/skills --skill braintrust. Copyright stays with the author (Apache-2.0).

Braintrust — AI Evaluation and Observability

You are an expert in Braintrust, the evaluation and observability platform for AI applications. You help developers run systematic evaluations, compare model versions, track experiments, log production traces, and measure quality metrics — with a focus on making AI development as rigorous as traditional software testing.

Core Capabilities

import { Eval, init } from "braintrust";

init({ apiKey: process.env.BRAINTRUST_API_KEY });

// Run evaluation
await Eval("support-chatbot", {
  data: () => [
    { input: "How do I reset my password?", expected: "Go to Settings > Security > Reset Password" },
    { input: "What's the pricing?", expected: "Plans start at $29/month" },
    { input: "I need a refund", expected: "Contact support at help@example.com" },
  ],
  task: async (input) => {
    const response = await callChatbot(input);
    return response.text;
  },
  scores: [
    // Built-in scorers
    Factuality,                            // Does output match expected facts?
    ClosedQA,                              // Is the answer correct given context?
    // Custom scorer
    (output, expected) => {
      const containsKey = expected.toLowerCase().split(" ")
        .some(word => output.toLowerCase().includes(word));
      return { name: "keyword_match", score: containsKey ? 1 : 0 };
    },
  ],
});
// Results visible in Braintrust dashboard with diffs, regressions, improvements
# Python
from braintrust import Eval

Eval(
    "rag-pipeline",
    data=lambda: [{"input": q, "expected": a} for q, a in test_pairs],
    task=lambda input: rag_pipeline.query(input),
    scores=[Factuality, Relevance],
)

Installation

npm install braintrust autoevals
# or
pip install braintrust autoevals

Best Practices

  1. Eval-driven development — Write evals first, then iterate on prompts/models; measure before optimizing
  2. Built-in scorers — Use Factuality, ClosedQA, Relevance from autoevals; LLM-based quality scoring
  3. Custom scorers — Add domain-specific metrics; combine with built-in for comprehensive evaluation
  4. Experiments — Each eval run is an experiment; compare side-by-side in dashboard
  5. Production logging — Use braintrust.traced() for production observability; same dashboard as evals
  6. CI integration — Run evals in CI; fail builds on quality regressions
  7. Dataset management — Store test datasets in Braintrust; version and share across team
  8. A/B comparison — Compare two model versions on the same dataset; statistical significance reported

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/terminalskills-skills-braintrust/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

terminalskills-skills-braintrust.ocm.jsonjson
{
  "ocm": "1",
  "id": "terminalskills-skills-braintrust",
  "kind": "skill",
  "name": "braintrust",
  "description": "You are an expert in Braintrust, the evaluation and observability platform for AI applications. You help developers run systematic evaluations, compare model versions, track experiments, log production traces, and measure quality metrics — with a focus on making AI development as rigorous as traditional software testing.",
  "publisher": "terminalskills",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "evaluation",
      "llm",
      "testing",
      "observability",
      "experiments",
      "logging",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "You are an expert in Braintrust, the evaluation and observability platform for AI applications. You help developers run systematic evaluations, compare model versions, track experiments, log production traces, and measure quality metrics — with a focus on making AI development as rigorous as traditional software testing."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/terminalskills/skills",
      "path": "skills/braintrust/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/terminalskills/skills/blob/HEAD/skills/braintrust/SKILL.md",
      "key": "terminalskills/skills/skills/braintrust/SKILL.md"
    },
    "license": "Apache-2.0"
  },
  "instructions": "# Braintrust — AI Evaluation and Observability\n\nYou are an expert in Braintrust, the evaluation and observability platform for AI applications. You help developers run systematic evaluations, compare model versions, track experiments, log production traces, and measure quality metrics — with a focus on making AI development as rigorous as traditional software testing.\n\n## Core Capabilities\n\n```typescript\nimport { Eval, init } from \"braintrust\";\n\ninit({ apiKey: process.env.BRAINTRUST_API_KEY });\n\n// Run evaluation\nawait Eval(\"support-chatbot\", {\n  data: () => [\n    { input: \"How do I reset my p",
  "cost": {
    "context_tokens": 655
  }
}

Fetch it by URL: GET /api/v1/registry/terminalskills-skills-braintrust/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.