app.nzapp
AppsProjectsReposPullsChatIntegrationsGatewayModelsEvalsToolsDatasetsMCPDeploysPricingBlogDocsAssistantsCharactersArtMusic
Sign inStart building
Agent stack
Cloud coding agentAgents SDKIntegrationsBrowser agentMonitors & auto-agentsSchedulersAgent skillsMCP serversDeep research
Models & API
AI GatewayModel catalogModel evalsModel spacesPlaygroundText to imageImage to 3DText to 3DMusic & SFXAudio editorMedia optimizerAI art & libraryChatAPI referenceSchemaBecome a provider
Compute & hosting
DeploysAddonsPostgres hostinggobed vector searchSite hostingAnalyticsCog GPU hostingRL trainingBuilds & CIWorkersTask queuesDomainsGit hosting
Tools
AI toolsDrawDiffusion canvasLive DrawWriteSheetsArtifactsVideo studioNotebooksDatasets
Learn
DocsBlogEval guidesPrompt libraryCLIAlternativesPapersAI charactersArt gallerySecurityConsulting
Company
PricingEnterpriseSettingsBillingStatusInvestorsCreate accountTerms of ServicePrivacy Policy
app.nzapp.nz

AI agent cloud for coding, deploys, model routing, and research. Built for teams shipping software.

Built in New Zealand by App AI NZ.

Social
X / TwitterGitHubYouTube
The app.nz network
GpuBrainPapersReading TimeNetwrckText-Generator.ioCodex InfinityOpenPathsCuteDSLAI Art GeneratorAIArt-Generator.artSiteSimSimplexGenDictatorFlowWebFiddleRing.nzChatGibidyBitBankExperimentFlowEvangelerHires.nzHow.nzV5 GamesAddicting Word GamesBig Multiplayer ChessWord SmashingreWord GameMultiplication Master
© 2026 App AI NZ Ltd. All rights reserved.All systems normalTermsPrivacy
Blog
May 19, 2026·6 min read·app.nz

How to optimize prompts with evals (LLM-as-a-judge)

Treat prompts like code: score them with an eval, then let the optimizer search for a better one against your own dataset.

Most teams write a prompt, eyeball a few outputs, and ship. That works until it doesn't — and you have no way to tell whether a change made things better or worse. Here is the loop we use instead, and the two tools that run it for you.

Treat prompts like code: test them

The core idea is LLM-as-a-judge. You write a second prompt — the eval — whose only job is to score an output from 0 to 100 against a rubric. Now any prompt change is measurable: run it over a dataset, judge every output, and compare the mean and median.

input row ──▶ [ your prompt + model ] ──▶ output
output + rubric ──▶ [ judge model ] ──▶ score 0–100
aggregate across rows ──▶ mean / median / pass-rate

Step 1 — build a tiny dataset

You do not need thousands of rows. 15–25 representative inputs catch most regressions. Paste them, one per line, into Bulk Evals, write your prompt and a rubric, and run. You get a per-row score plus aggregate metrics in one pass.

A good rubric is specific and bounded:

Score 0–100. 100 = the reply resolves the issue with a concrete next step and a friendly tone. Deduct for vagueness, missing steps, or wrong information. 0 = generic or incorrect.

Step 2 — let the optimizer search for you

Hand-tuning prompts is slow. The Prompt Optimizer takes your base prompt, your eval, and your dataset, then:

  1. Scores your base prompt across every row.
  2. Generates several improved variants — seeded with your lowest-scoring cases so it fixes real failures.
  3. Re-scores every variant across the whole dataset.
  4. Returns the winner by mean score, with the full leaderboard.

It is a small, practical cousin of techniques like DSPy and OPRO: optimize against a metric instead of vibes.

Why mean and median

A model that scores 100 on most rows but 0 on a few has a high mean and a lower median — that spread is the signal. We sort candidates by mean, break ties by median, and surface pass-rate (the fraction scoring ≥ 60) so you can see consistency, not just average quality.

MetricTells you
MeanOverall quality
MedianTypical-case quality (robust to outliers)
Pass-rateConsistency / how often it clears the bar
MinYour worst case — what users will complain about

Close the loop

Once you have a winner, run it across more models with the Model Comparison tool to find the cheapest one that still passes, estimate cost with the Token & Cost Estimator, and ship it through the gateway or your agent. Same credits, same account, one loop.

Build what you just read

Ship agents, models, and apps on one cloud.

Start with free credits, then use the same platform from the web app, CLI, desktop app, or MCP.

Start building freeRead the docs

Keep reading

From Artificial Analysis to production: the useful eval loop

How to turn Artificial Analysis, Arena, LiveBench, SWE-bench, and open leaderboards into a runnable shortlist, workload eval, and production model decision.

Comfy models: from media evals to working GPU inference

Connect image and video benchmark evidence to hosted FLUX, SDXL, LTX, and Wan workflows, reproducible JSON, model provenance, and a global R2 weight cache.

Cheap and fast: choosing budget LLMs for high-volume work

A 3-step workflow to find the cheapest model that still clears your quality bar — measured as cost per acceptable output.