# Prompt Tree – Compare and Evaluate Prompt Edits

> Compare prompt edits on your own test cases and see which answers improved or regressed.

Prompt Tree – Compare and Evaluate Prompt Edits is a free AI agent skill on Agensi by Brayson, in Prompt & Skill Engineering. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Brayson](https://www.agensi.io/creators/creator-1584)
- Category: [Prompt & Skill Engineering](https://www.agensi.io/skills/prompt-skill-engineering)
- Version: 1.0
- Last updated: 2026-12-02
- Security: scan passed (2026-12-02); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/prompt-tree-compare-and-evaluate-prompt-edits
- Tags: prompt-engineering, llm-ops, node-js, testing, automation

## About this skill

Start with a prompt your application uses, examples with expected answers, and a scoring rule. Prompt Tree measures the original prompt, uses failed examples to propose small edits, and builds an HTML report. Pick any two versions to see the exact instructions, scores and per-example answers side by side.

On Restaurant8K, the original prompt returned “2” for “Booking for 2 people.” The selected prompt returned the complete phrase “2 people” in all five runs. Across 360 held-out requests, mean field accuracy rose from 88.17% to 91.06%. The experiment compared 17 prompt versions and used a separate validation set to select the final version.

## Requires

- Node.js 22 or later

## Known limitations

Results depend on the examples, scoring rule and model used. Set a call budget before comparing several versions. Running the local scripts requires Node.js 22 or later.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Prompt Tree – Compare and Evaluate Prompt Edits skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill prevent new prompt versions from making performance worse?

The report shows which examples improved and which regressed after each edit. Compare them with the baseline or any earlier branch before adopting a new version.

### What do I need to provide to start an optimization project?

Use Codex with Node.js 22 or later. Bring the prompt your application calls, examples with expected outputs, and a scoring rule. Codex can reuse your evaluator or help adapt the rule to your task.

### What specific deliverables will I receive after the optimization is complete?

The skill generates a comprehensive summary, a detailed Prompt Tree showing the evolution of versions, and full HTML reports in both Chinese and English. These reports include performance metrics, version comparisons, and statistical evidence for why a specific prompt was locked.

### How does the skill handle the actual modification of my prompts?

Each branch proposes a small change tied to an observed error. The report preserves the exact edit and its parent so you can see which cases changed.

### Does this skill account for the unpredictable nature of AI model responses?

You can retest finalists over several rounds on validation examples. If you have a separate test set, use it to evaluate the selected prompt and compare the results with the original.

### Are there any known limitations I should be aware of before starting?

The skill is limited by the quality and availability of the validation dataset you provide. Performance gains are highly dependent on having samples that accurately represent the task you want to optimize.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
