# BookWriter-A2A (RQ1) This folder contains evaluation scripts and the reference trajectory configuration for the **BookWriter-A2A** runs under the `RESULTS` directory. ## Files - `evaluate_trajectory.py` - Evaluates multiple trajectory metrics (e.g., exact match, in-order match, any-order match, precision, recall). - Input: per-session `execution_path.md` files under each model's `test_results//` directory. - Output: a CSV summary (and optionally a CSV of failure reasons when enabled). - `evaluate_success.py` - Computes per-model success rate based on generated artifacts in each session folder. - Output: JSON (detailed) and CSV (summary). - `analyze_retry_patterns.py` - Analyzes retry patterns and error locations from `execution_path.md`. - Output: JSON/CSV summaries. - `reference_trajectory.yaml` - Defines the reference (ground-truth) trajectory and evaluation configuration. ## Usage Run from this directory: - Trajectory evaluation: - `python3 evaluate_trajectory.py --config reference_trajectory.yaml --output evaluation_results.csv` - Trajectory evaluation with failure diagnosis (CSV only): - `python3 evaluate_trajectory.py --config reference_trajectory.yaml --output evaluation_results.csv --diagnose-failures` - Success-rate analysis: - `python3 evaluate_success.py` - Retry-pattern analysis: - `python3 analyze_retry_patterns.py` ## Notes - These scripts assume the default `RESULTS` layout used in this repository (see the `BASE_DIR` / `PROJECT_NAME` constants in each script). - Markdown report generation is intentionally disabled in the trajectory evaluator; outputs are written as CSV/JSON only.