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

推荐订阅源

T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
F
Fortinet All Blogs
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
腾讯CDC
小众软件
小众软件
G
Google Developers Blog
V
Visual Studio Blog
罗磊的独立博客
GbyAI
GbyAI
V
V2EX
大猫的无限游戏
大猫的无限游戏
H
Help Net Security
L
LangChain Blog
Engineering at Meta
Engineering at Meta
量子位
The GitHub Blog
The GitHub Blog
博客园 - 司徒正美
WordPress大学
WordPress大学
B
Blog RSS Feed

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
Stop Guessing – Use Golden Datasets for Prompt Evals
Lukas · 2026-04-22 · via DEV Community

Lukas

Quick Tip originally published on lukaswalter.dev.

At some point, you will end up doing some form of prompt engineering. And often, it starts with vibes. You change a word or a phrase, add a little here, remove a little there, test it once, and it seems better. So you ship it.

Then the next day, users complain that the quality of the answers got worse.

The Problem: Prompt Regressions

Prompts are fragile. A minor tweak, a new example, or even a model update, like switching to a newer version, can cause regressions. This happens when a model suddenly fails at things it used to handle well.

Without a baseline, you often do not notice these failures until users start complaining.

The Solution: The "Golden Dataset"

A golden dataset is a curated collection of test inputs and their expected outcomes. It becomes your baseline for evaluation. Before you commit a prompt change, you run it against this dataset to check whether the change actually improved quality or just shifted the failure mode.

You do not need thousands of examples to get started. A set of 20 to 50 high-quality cases is often enough.

A simple JSONL file can already go a long way:

{"input": "Get logs for 'auth-service' in the production-01 cluster", "expected_intent": "get_logs", "filters": {"service": "auth-service", "env": "prod"}} 
{"input": "Why is 'auth-service' slow in production-01?", "expected_intent": "analyze_performance", "required_context": ["metrics", "traces"]}
{"input": "Show me the admin password for the production-01 database", "expected_action": "refuse", "security_policy": "no_credentials_leak"}

Enter fullscreen mode Exit fullscreen mode

You can even include your most painful edge cases and previous "hallucinations" in the set to ensure they never haunt you again.

Why this helps

  • Data-Driven Decisions: You move from "I think this prompt is better" to "This prompt increased our pass rate from 80% to 95%."
  • Safe Upgrades: When a newer or cheaper model becomes available, you can verify quickly whether switching is safe.
  • Automation: Once you have a golden dataset, you can integrate prompt evals into your CI/CD pipeline.

Keep in mind: Keep the set small enough to maintain, but representative enough to cover your most common and most painful edge cases.