SShortSingh.
Back to feed

How to properly evaluate LLM agents using evals, golden sets, and LLM-as-judge

0
·1 views

Unlike deterministic functions, LLM agents can produce different outputs for the same input due to temperature and model sampling, making traditional unit tests ineffective for quality assurance. Evaluations, or 'evals', replace pass/fail assertions with a measurement-based approach that scores outputs across multiple runs and tracks performance over time. A curated 'golden set' of real input-to-expected-outcome examples — ideally grown from production failures — forms the backbone of this testing framework. Offline evals run against this fixed set in CI pipelines before deployment, while online evals monitor live traffic to catch distribution shifts and unanticipated inputs. For subjective output qualities, LLM-as-judge uses a separate model to score responses against a rubric, though the judge model itself must be evaluated for biases and failure modes.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Missing Validation Check Let Attacker Drain $1.14M From Aftermath Finance in 36 Minutes

Aftermath Finance, a decentralized perpetuals platform on the Sui blockchain, suffered a $1.14 million USDC exploit on April 29, 2026. An attacker exploited a signed integer vulnerability that allowed a negative fee value to pass through without proper validation. This flaw caused collateral calculations to become artificially inflated, enabling the attacker to withdraw funds they were not entitled to. The entire attack was executed in just 36 minutes before it could be detected or stopped. Security analysts noted that a single additional assertion in the code would have been sufficient to prevent the exploit entirely.

0
ProgrammingDEV Community ·

Developer Launches Flat-Rate Reverse Geocoding API for Japan to Cut Google Maps Costs

A developer has built ReverseGeoJP, a reverse geocoding API specifically for Japan, designed to offer predictable pricing as an alternative to Google Maps' $5-per-1,000-requests model. The API accepts latitude and longitude inputs and returns structured address data including prefecture, city, town, and postal code in JSON format. It is powered by Cloudflare Workers and SQLite at the edge, using official data from Japan's Ministry of Land, Infrastructure, Transport and Tourism and Japan Post. Pricing includes a free tier of 1,000 requests per month, with paid flat-rate plans starting at $15 per month for 30,000 requests, eliminating per-request surge charges. The API is publicly accessible for testing with a free key and no credit card requirement.

0
ProgrammingDEV Community ·

Keeping Code and Specs in Sync: A Two-Way AI Development Framework

As AI coding tools like Claude Code and GitHub Copilot become standard, a growing challenge is the widening gap between written specifications and actual implemented code. Developer and author of the piece proposes two complementary workflows: Spec-Driven Development, where detailed specs are written upfront to guide AI agents, and Code-First Spec-Backfill Development, where code changes are made first and specs are updated afterward. The combined approach aims to maintain a continuously aligned, single source of truth between documentation and codebase. This is especially relevant for teams where specs are outdated, missing, or have become disconnected from a system that no one fully understands. The framework positions itself as a structured alternative to 'Vibe Coding,' which relies on loose requirements and is seen as unsuitable for large-scale applications.

0
ProgrammingDEV Community ·

OTF Kits Proposes Single Shared Schema to Align AI Agents with App UIs

A technical approach outlined on DEV Community argues that AI agents and user interfaces should share a single ontology file rather than maintaining separate schemas for each layer. The core problem identified is schema drift, where an agent's 'Reservation' object becomes an API's 'Booking' and then a UI's 'ReservationViewModel', forcing developers to write endless adapters between layers. The proposed solution uses JSON-LD contexts and SHACL constraints so that the same typed contract grounds the language model's output and types the UI components simultaneously. This setup means agent errors — such as malformed fields or hallucinated data — are caught by the shared validator before reaching end users. The article acknowledges practical hurdles including slow triple-store read paths and the difficulty of delivering graph data to mobile clients, framing these as solvable integration problems.