Subchapter 155.10
references/6-analyze-outcomes.mdMarkdown16 KBView on GitHub
Why this step: pixie test produced raw scores. Now you analyze those results to understand what they mean — completing pending evaluations, identifying patterns, validating hypotheses, and producing an actionable improvement plan. The analysis is structured in three phases that build on each other: entry-level → dataset-level → action plan.
After pixie test, the result directory looks like:
{PIXIE_ROOT}/results/<test_id>/
meta.json
dataset-{idx}/
metadata.json
entry-{idx}/
config.json # evaluators, description, expectation
eval-input.jsonl # input data fed to evaluators
eval-output.jsonl # output data captured from app
evaluations.jsonl # scored + pending evaluations
trace.jsonl # LLM call tracesRead meta.json to find the <test_id>. All the data you need for analysis is in this directory.
You are the grader for Step 6. Pending evaluations are not a handoff to the user, and the web UI is not a substitute for grading. You may use the web UI to browse traces and outputs, but completion happens by writing files on disk.
Step 6 is incomplete until all of the following are true:
"status": "pending" entry in every evaluations.jsonl has been replaced with a scored entry that contains both score and reasoning.analysis.md and analysis-summary.md.action-plan.md and action-plan-summary.md.resources/ directory passes for the target results directory.Forbidden shortcuts:
"status": "pending" entries in placepixie_qa/06-analysis.mdevaluations.jsonlIf you do any of the above, Step 6 is not done.
If you are iterating across multiple fix/test cycles, every successful pixie test run creates a new pixie_qa/results/<test_id> directory and a new Step 6 obligation. The moment that directory exists, it becomes the analysis target for the current cycle.
Before you edit application code, prompts, datasets, evaluators, or rerun pixie test, complete Step 6 for that exact results directory. Do not skip earlier cycles and analyze only the last run.
Additional forbidden shortcut:
pixie_qa/results/<test_id> and leave an older one from the same task without Step 6 artifacts.Every analysis detailed artifact you produce must follow these principles:
Every persisted analysis summary artifact must follow these principles:
Every persisted analysis artifact in this step has two files:
| Artifact | Detailed file (for agent) | Summary file (for human) |
|---|---|---|
| Dataset analysis | dataset-{idx}/analysis.md | dataset-{idx}/analysis-summary.md |
| Action plan | action-plan.md | action-plan-summary.md |
Always write the detailed version first, then derive the summary from it. The summary is a strict subset of the detailed version’s content — it should never contain claims or conclusions not present in the detailed version.
Process each dataset entry individually. For each dataset-{idx}/entry-{idx}/:
Read these files for the entry:
config.json — what evaluators were configured, the description, the expectationeval-input.jsonl — what data was fed to the app/evaluatorseval-output.jsonl — what the app producedevaluations.jsonl — current evaluation results (scored and pending)trace.jsonl — what LLM calls the app made (if available)If evaluations.jsonl contains entries with "status": "pending", you must grade them:
criteria field of the pending evaluation1.0 — fully meets the criteria0.5–0.9 — partially meets criteria (explain what’s missing)0.0–0.4 — does not meet criteriaevaluations.jsonl with the scored result. Do not append a second row and leave the pending row in place. Overwrite the pending row itself.Before (pending):
{
"evaluator": "ResponseQuality",
"status": "pending",
"criteria": "The response should..."
}After (scored):
{
"evaluator": "ResponseQuality",
"score": 0.85,
"reasoning": "Response addresses the main question but omits..."
}Grading guidelines:
evaluations.jsonlIn this trimmed workflow, do not write entry-{idx}/analysis.md or entry-{idx}/analysis-summary.md. Phase 1 is only for reading evidence and converting every pending evaluation into a scored row in evaluations.jsonl.
You may take temporary scratch notes while reasoning, but they are not deliverables. Persist only:
evaluations.jsonl in each entry directoryAfter all entries in a dataset are analyzed, produce the dataset-level analysis. Write analysis.md in the dataset directory (dataset-{idx}/analysis.md).
Summarize across all entries in the dataset:
Come up with exactly 3 high-confidence hypotheses across these three dimensions:
Test cases quality — Does the set of test cases sufficiently and efficiently verify the application’s capabilities? Does it cover the important failure modes? Are there blind spots?
Evaluation criteria/evaluator quality — Do the evaluators have proper granularity and grading to catch real issues? Are there rubber-stamp evaluators (all 1.0)? Are there flaky evaluators (high variance without code changes)? Are criteria too vague or too strict?
Application quality — Based on the evaluation results, what are the application’s strengths and weaknesses? Where does it produce high-quality output? Where does it fail?
For each hypothesis:
It is always possible to produce 3 hypotheses even when the data is limited. If the evaluation data doesn’t give a conclusive answer on application quality, that itself is a signal about test case or evaluator gaps.
Produce two files for the dataset analysis. Write the detailed version first, then derive the summary.
This file is for agent consumption — it provides the complete data aggregation, hypothesis formation with evidence chains, and validated conclusions that a coding agent can act on directly.
Writing principles:
entry-3/evaluations.jsonl, entry-3/eval-output.jsonl, or entry-3/trace.jsonl).Content:
This file is for human review — a scannable overview of the dataset results, key findings, and recommended actions.
Template:
# Dataset Analysis — Summary
**Dataset**: <name> | **Entries**: <N> | **Pass rate**: <X/N (Y%)>
## Results at a glance
| Evaluator | Pass rate | Avg score | Notes |
| --------- | --------- | --------- | ---------------------- |
| ... | ... | ... | <one-liner if notable> |
## Key findings
1. <Finding>: <1-2 sentences with the conclusion and its implication>
2. ...
3. ...
## Recommended actions (priority order)
1. <Action>: <what to do and expected impact, 1-2 sentences>
2. ...
3. ...Maximum ~40 lines for the summary.
After all datasets are analyzed, produce the action plan. Write two files at the test run root. Write the detailed version first, then derive the summary.
This file is for agent consumption — it provides specific, implementable improvement items with full evidence trails, so a coding agent can pick up any item and execute it without additional context-gathering.
Writing principles:
scrapegraphai/prompts/generate_answer.py line 45, add instruction: ‘…’”. The more specific, the more actionable.Structure:
# Action Plan (Detailed)
## Summary
- X datasets analyzed, Y total entries, Z% overall pass rate
- [1-2 sentence high-level assessment]
## Priority 1: [Most impactful improvement]
- **What**: [specific change to make]
- **Why**: [which hypothesis from which dataset analysis, with entry/evaluator references]
- **Evidence**: [specific scores, output excerpts, trace data that support this]
- **Expected impact**: [which entries/evaluators this will improve, and predicted score change]
- **How**: [concrete implementation steps with file paths and line numbers]
- **Verification**: [how to verify the fix worked — which entries to re-run, what scores to expect]
## Priority 2: ...
...This file is for human review — a prioritized list of improvements that a human can understand and approve in under 2 minutes.
Template:
# Action Plan — Summary
**Overall**: <X entries, Y% pass rate. 1-sentence assessment.>
## Actions (priority order)
1. **<Action title>**: <What to change and why, 2-3 sentences. Expected impact.>
2. **<Action title>**: <What to change and why, 2-3 sentences. Expected impact.>
3. ...Maximum ~30 lines for the summary.
Prioritization criteria:
The action plan should have 3–5 items. Each must trace back to a validated hypothesis from Phase 2. Do not include items that are speculative or lack evidence.
evaluations.jsonldataset-{idx}/analysis.md + dataset-{idx}/analysis-summary.mdaction-plan.md + action-plan-summary.mdProcess entries within a dataset concurrently (using subagents if available). Process phases sequentially — Phase 2 depends on Phase 1 outputs, Phase 3 depends on Phase 2 outputs.
Before you end your turn, run the Step 6 verifier script that ships beside setup.sh in this skill’s resources/ directory against the exact test run directory you analyzed.
Example shape:
python /path/to/eval-driven-dev/resources/verify_step6_completion.py pixie_qa/results/<test_id>If the verifier reports any error, keep working. Step 6 is not complete until the verifier passes.