Evaluate a PAL inference prompt using the promptfoo harness in eval/. Use when a prompt constant in src/ has changed or may have regressed, when scaffolding a new prompt eval from scratch, or when comparing a v2 candidate against the current baseline.
Installation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Evaluate a PAL inference prompt using the promptfoo harness in eval/. Use when a prompt constant in src/ has changed or may have regressed, when scaffolding a new prompt eval from scratch, or when comparing a v2 candidate against the current baseline.
argument-hint
<prompt-name> [promptfoo-flags]
eval-prompt
Maintainer-only skill. Operates on the eval/ directory of the PAL repo. Do not use outside this repo.
Workflow
Running an existing eval
Run the eval, forwarding any extra flags the user passed:
bun eval/run.ts <prompt-name> [--providers haiku] [--no-cache] [--filter-pattern "A1"]
Read the results table. For each failing test, note the prompt column (v1 vs v2) and the expected vs actual sentiment/rating field.
Report: pass rate per prompt, which cases failed, and whether v2 outperforms v1.
Crystallizing a winning prompt
When v2 passes ≥95% of cases and outperforms v1 on its target failures:
Copy the winning prompt text back into its source constant in src/ (read the source file first to locate the constant).
Overwrite v1 with v2: cp eval/<name>/prompts/v2-<desc>.json eval/<name>/prompts/v1-current.json
Remove or archive the v2 file.
Run the eval again to confirm v1 now passes at the higher rate.
If the production code calls injectJsonSchemaInstruction(), append the schema instruction to the system prompt string — that is what the model receives.
Write promptfoo.yaml. Use this template:
description:"<name> — v1 baseline vs v2 candidate"prompts:-file://prompts/v1-current.jsonproviders:-id:anthropic:messages:claude-haiku-4-5-20251001label:haikuconfig:output_format:type:json_schemaschema:<pastetheoutputJSONschemahere>-id:openai:chat:gpt-4o-minilabel:gpt-4o-minidefaultTest:assert:-type:javascriptvalue:file://assertions/valid-json.jsdescription:"Output must be a parseable JSON object"tests: []
Write assertion files. Each file is one line using the shared factory in eval/lib/assert.js: