惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threatpost
The Hacker News
The Hacker News
AWS News Blog
AWS News Blog
Spread Privacy
Spread Privacy
T
Tenable Blog
C
CERT Recently Published Vulnerability Notes
Cisco Talos Blog
Cisco Talos Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Securelist
P
Privacy & Cybersecurity Law Blog
Know Your Adversary
Know Your Adversary
T
The Exploit Database - CXSecurity.com
Latest news
Latest news
D
Darknet – Hacking Tools, Hacker News & Cyber Security
I
Intezer
F
Fortinet All Blogs
Engineering at Meta
Engineering at Meta
Simon Willison's Weblog
Simon Willison's Weblog
The Register - Security
The Register - Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
L
Lohrmann on Cybersecurity
C
Cyber Attacks, Cyber Crime and Cyber Security
Microsoft Azure Blog
Microsoft Azure Blog
P
Proofpoint News Feed
H
Help Net Security
T
Threat Research - Cisco Blogs
D
DataBreaches.Net
S
Schneier on Security
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
P
Privacy International News Feed
S
Secure Thoughts
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recorded Future
Recorded Future
C
Cybersecurity and Infrastructure Security Agency CISA
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
Stack Overflow Blog
Stack Overflow Blog
IT之家
IT之家
人人都是产品经理
人人都是产品经理
NISL@THU
NISL@THU
博客园 - Franky
T
Tor Project blog
G
GRAHAM CLULEY
博客园 - 【当耐特】
Jina AI
Jina AI
Security Archives - TechRepublic
Security Archives - TechRepublic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
A
About on SuperTechFans
Hacker News - Newest:
Hacker News - Newest: "LLM"

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Braintrust Autoevals: CI Gates for LLM Regressions
Jangwook Kim · 2026-05-20 · via DEV Community

LLM applications need a different kind of regression test. Unit tests can tell you whether a function returns a value, but they do not tell you whether an assistant quietly changed a refund action, dropped a required field, or returned valid JSON with the wrong business meaning. That gap is where evaluation tooling becomes practical engineering infrastructure instead of research theater.

Braintrust frames evaluations as a way to measure AI application quality, catch regressions before production, and compare system changes over time. The platform spans playground iteration, experiments, CI/CD, production scoring, and feedback loops. The smaller piece tested here is Autoevals, Braintrust's evaluator library for scoring model outputs.

Effloow Lab ran a credential-free sandbox before writing this guide. The lab installed autoevals==0.1.0 and braintrust==0.19.0, built a tiny Python eval script, scored JSON outputs with ExactMatch and ValidJSON, ran a passing baseline, then triggered an intentional regression that exited with code 1. No Braintrust cloud project, API key, Claude API call, OpenAI API call, or paid model was used.

Effloow Lab — Local sandbox on macOS with Python 3.12.8. Lab run notes: data/lab-runs/braintrust-llm-eval-autoevals-ci-sandbox-poc-2026.md. The PoC validates a local scorer-and-exit-code pattern; it does not claim hosted Braintrust experiment logging or LLM-as-judge execution.

Why LLM Regression Tests Fail Late

Traditional CI works well when correctness is deterministic. A parser either accepts input or it does not. A migration either applies or it fails. A serializer either matches a snapshot or it differs. LLM features are less stable because the output is usually a distribution, not a single fixed return value.

That does not mean teams should skip CI. It means the CI gate needs to measure the right layer. A useful LLM eval suite usually combines:

  • Shape checks for JSON validity, schema compliance, field presence, and safe formatting.
  • Exact checks for outputs where the answer must be one of a few allowed labels or actions.
  • Semantic checks for summaries, retrieval quality, tool routing, and policy adherence.
  • Human review for subjective or high-risk cases.
  • Production trace feedback so the offline dataset does not freeze in time.

Braintrust's evaluation docs describe offline evaluation as a controlled dataset-based workflow where expected outputs are known and code-based or LLM-as-judge scorers can be used. That is the right mental model for CI: select a small set of critical examples, run the application against those examples, score the outputs, and fail the build if quality drops below the accepted threshold.

What Braintrust and Autoevals Provide

Braintrust is the broader evaluation and observability platform. Its current Python SDK reference lists braintrust==0.19.0 and requires Python 3.10 or higher. The SDK includes evaluation, tracing, prompt, dataset, experiment, and integration surfaces. The same reference page lists integrations for Anthropic, OpenAI, OpenAI Agents, LangChain, LlamaIndex, LiteLLM, Pydantic AI, CrewAI, Temporal, and other agent frameworks.

Autoevals is the evaluator library. The current Python API reference identifies Autoevals Python API v0.1.0 and documents installation with pip install autoevals. It includes LLM evaluators such as Factuality, Summary, Translation, and LLMClassifier, but it also includes deterministic scorers such as ExactMatch, Levenshtein, NumericDiff, JSONDiff, and ValidJSON.

That split matters. You do not need to start with LLM-as-judge scoring or a hosted evaluation dashboard. For many production systems, the first useful eval is stricter and simpler: "Did the model return valid JSON, and did the required action stay the same?"

If you already use open-source observability, compare this with Effloow's Langfuse self-hosting guide. Langfuse is a strong fit when self-hosted traces and prompt observability are the center of gravity. Braintrust is compelling when the core need is systematic experiments, datasets, scorers, and CI-grade regression tracking.

What the Sandbox Built

The sandbox created a small application that returns compact JSON for two cases:

DATASET = [
    {
        "id": "refund-status",
        "input": "Return a compact JSON refund status.",
        "expected": {"status": "pending", "action": "collect_receipt"},
    },
    {
        "id": "shipping-status",
        "input": "Return a compact JSON shipping status.",
        "expected": {"status": "ready", "action": "notify_customer"},
    },
]

Enter fullscreen mode Exit fullscreen mode

The baseline mode returns the expected JSON. The regression mode changes one business action from notify_customer to email_customer. That is intentionally subtle: the output is still valid JSON, and a loose "does it parse?" check would pass. The business behavior is wrong.

The scorer uses two Autoevals checks:

from autoevals import ExactMatch, ValidJSON

exact = ExactMatch()
valid_json = ValidJSON()

Enter fullscreen mode Exit fullscreen mode

For each case, the script computes an exact score and a JSON-validity score, averages them, and exits successfully only when the overall average is 1.0. This is deliberately strict for a CI gate. If the goal is regression safety, a changed action should fail.

Step 1: Create the Sandbox

Use a temporary directory and a virtualenv. Keep this out of your production repository until the eval shape is proven.

rm -rf /tmp/effloow-braintrust-autoevals-poc
mkdir -p /tmp/effloow-braintrust-autoevals-poc
cd /tmp/effloow-braintrust-autoevals-poc
python3 -m venv .venv

Enter fullscreen mode Exit fullscreen mode

Pin the package versions used in this run:

autoevals==0.1.0
braintrust==0.19.0

Enter fullscreen mode Exit fullscreen mode

Install them:

.venv/bin/python -m pip install -r requirements.txt

Enter fullscreen mode Exit fullscreen mode

The sandbox install completed successfully with autoevals-0.1.0 and braintrust-0.19.0. A later production project can relax pins after compatibility testing, but pins are useful in an article PoC because they make the result easier to reproduce.

Step 2: Write a Minimal Eval Gate

Create eval_guardrail.py:

import json
import sys

from autoevals import ExactMatch, ValidJSON


DATASET = [
    {
        "id": "refund-status",
        "input": "Return a compact JSON refund status.",
        "expected": {"status": "pending", "action": "collect_receipt"},
    },
    {
        "id": "shipping-status",
        "input": "Return a compact JSON shipping status.",
        "expected": {"status": "ready", "action": "notify_customer"},
    },
]


def app(case, mode):
    if mode == "baseline":
        return json.dumps(case["expected"], separators=(",", ":"))
    if case["id"] == "shipping-status":
        return json.dumps({"status": "ready", "action": "email_customer"}, separators=(",", ":"))
    return json.dumps(case["expected"], separators=(",", ":"))


def numeric_score(result):
    if hasattr(result, "score"):
        return float(result.score)
    if isinstance(result, dict) and "score" in result:
        return float(result["score"])
    return float(result)


def run(mode):
    exact = ExactMatch()
    valid_json = ValidJSON()
    rows = []

    for case in DATASET:
        output = app(case, mode)
        expected = json.dumps(case["expected"], separators=(",", ":"))
        exact_score = numeric_score(exact(output=output, expected=expected))
        json_score = numeric_score(valid_json(output=output))
        combined = (exact_score + json_score) / 2
        rows.append({"id": case["id"], "exact": exact_score, "valid_json": json_score, "combined": combined})

    average = sum(row["combined"] for row in rows) / len(rows)
    print(json.dumps({"mode": mode, "average": average, "rows": rows}, indent=2))
    return 0 if average >= 1.0 else 1


if __name__ == "__main__":
    selected_mode = sys.argv[1] if len(sys.argv) > 1 else "baseline"
    raise SystemExit(run(selected_mode))

Enter fullscreen mode Exit fullscreen mode

This is not pretending to be a full AI app. It isolates the evaluation mechanics. In a real service, app(case, mode) would call your RAG pipeline, tool router, support assistant, refund classifier, or coding agent. The important part is that outputs are scored against examples with known expectations.

Step 3: Verify the Baseline

Run:

.venv/bin/python eval_guardrail.py baseline

Enter fullscreen mode Exit fullscreen mode

The baseline output scored perfectly:

{
  "mode": "baseline",
  "average": 1.0,
  "rows": [
    {
      "id": "refund-status",
      "exact": 1.0,
      "valid_json": 1.0,
      "combined": 1.0
    },
    {
      "id": "shipping-status",
      "exact": 1.0,
      "valid_json": 1.0,
      "combined": 1.0
    }
  ]
}

Enter fullscreen mode Exit fullscreen mode

That is the minimum standard for adding the gate to CI. If your baseline does not pass locally, do not add it to pull requests yet. Fix the dataset, scoring function, prompt, or application behavior first.

Step 4: Trigger a Real Regression

Run:

.venv/bin/python eval_guardrail.py regression
echo "exit_code=$?"

Enter fullscreen mode Exit fullscreen mode

The regression output scored 0.75 and exited with code 1:

{
  "mode": "regression",
  "average": 0.75,
  "rows": [
    {
      "id": "refund-status",
      "exact": 1.0,
      "valid_json": 1.0,
      "combined": 1.0
    },
    {
      "id": "shipping-status",
      "exact": 0.0,
      "valid_json": 1.0,
      "combined": 0.5
    }
  ]
}

Enter fullscreen mode Exit fullscreen mode

This is the useful failure. The model output remained machine-readable, so a schema-only check would have missed it. ExactMatch caught the changed action. In production, this kind of example belongs in an eval suite whenever the output drives workflow state, customer communication, billing, refunds, compliance, or operational escalation.

Step 5: Add the CI Gate

A minimal GitHub Actions job can run the same command:

name: llm-eval

on:
  pull_request:
  push:
    branches: [main]

jobs:
  eval:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.11"
      - run: pip install -r requirements.txt
      - run: python eval_guardrail.py baseline

Enter fullscreen mode Exit fullscreen mode

The PoC did not execute this workflow on GitHub. It only validated the local command the workflow would run. For a real repository, add the workflow after the local eval is stable, keep provider keys in GitHub Actions secrets, and avoid running expensive model-backed evals on every trivial documentation change.

How to Evolve This Into a Real Braintrust Setup

The sandbox used Autoevals locally, but Braintrust's larger value appears when evaluations become experiments and traces rather than isolated scripts. The official docs describe a cycle of playground iteration, experiment promotion, CI/CD automation, production scoring, and feedback into datasets.

A production version should add:

  • A dataset with real failure cases from production or support review.
  • Multiple scorers: schema validity, exact action labels, semantic similarity, retrieval groundedness, and policy checks.
  • Hosted experiment logging through the Braintrust SDK.
  • Baseline comparison using Braintrust experiment history.
  • Pull-request reporting so reviewers see which cases changed.
  • Online scoring rules for production traces.
  • Human review for examples where the correct answer is not purely mechanical.

The Python SDK reference includes optional base experiment fields, which are designed for comparing new experiment runs against earlier runs. That is where a CI gate becomes more useful than a single threshold: it can fail because a change regressed against an accepted baseline, not because a hard-coded number was guessed months ago.

Pricing and Plan Reality

As of the official pricing page checked on May 20, 2026, Braintrust lists a Starter plan at $0 / month with 1 GB processed data, 10k scores, 14 days retention, and unlimited users, projects, datasets, playgrounds, and experiments. The same page lists Pro at $249 / month, with higher included usage and lower overage rates.

The plans-and-limits page also says Starter has a $0 platform fee, no credit card required, 1 GB processed data per month, 10k scores per month, and 14 days retention. It lists sandbox evals as a Pro/Enterprise feature, so do not assume every hosted feature is available on the free plan.

Those details are current only for the sources checked during this run. Pricing and limits change often; verify Braintrust's pricing page before committing a team budget.

Common Mistakes

The first mistake is making the eval dataset too broad. A five-example eval that catches the three failures that would hurt users is more useful than a 500-example suite nobody trusts. Start with high-risk cases: wrong action, missing escalation, invalid structured output, unsafe instruction following, or retrieval answers that must cite internal policy.

The second mistake is treating JSON validity as correctness. The sandbox regression proves the problem. Valid JSON can still be the wrong answer.

The third mistake is relying only on LLM-as-judge scoring. LLM judges are useful for open-ended outputs, but deterministic checks are cheaper, faster, and easier to reason about when the expected answer is known.

The fourth mistake is blocking every pull request on a slow model-backed eval. Split your suite. Run fast deterministic gates on every PR, and run larger model-backed or hosted experiment suites on scheduled jobs, risky code paths, or explicit release branches.

The fifth mistake is claiming "tested in production" because an eval passed locally. A local eval is evidence, but it is not production monitoring. Keep the claim boundary honest.

FAQ

Q: Can Autoevals run without a Braintrust API key?

Yes for local deterministic scorers in this sandbox. ExactMatch and ValidJSON ran locally without a Braintrust API key or model provider key. Hosted Braintrust experiment logging and provider-backed LLM judges require additional configuration.

Q: Should an LLM eval fail CI?

It should fail CI when the eval checks behavior that must not regress. Examples include structured workflow actions, safety labels, routing decisions, required citations, and schema contracts. For subjective quality checks, use pull-request reports or warnings until the scorer is stable.

Q: Is exact match too strict for LLM outputs?

Exact match is too strict for open-ended prose, but it is appropriate for constrained outputs such as labels, actions, JSON enum fields, and routing decisions. Pair it with schema and semantic scorers when the answer space is flexible.

Q: Does this replace observability?

No. Offline evals catch known cases before deployment. Observability catches real user traces after deployment. A healthy LLM engineering loop uses both.

Q: What did Effloow Lab actually prove?

Effloow Lab proved that the pinned Autoevals package can run a local deterministic scoring gate, that a passing baseline exits successfully, and that a subtle behavior regression exits nonzero. It did not prove hosted Braintrust reporting, model-provider integration, or production monitoring.

Key Takeaways

Braintrust Autoevals is useful even before a full observability rollout. The low-friction starting point is a local eval script that turns critical examples into a CI gate.

The sandbox result is narrow but practical: ValidJSON caught shape, ExactMatch caught behavior, and the process exit code made the regression enforceable. That is enough to justify a first eval suite for any LLM feature that returns structured decisions.

For production, add hosted Braintrust experiment tracking, real provider calls, baseline comparison, and production trace feedback. But do not wait for the perfect eval platform rollout before writing the first regression test. Start with the smallest failure that would embarrass your application, then make that failure impossible to merge quietly.

Sources