Skip to content

feat(eval): add agent-based iterative format optimization framework and history - #7

Closed
gspencergoog wants to merge 27 commits into
mainfrom
iterative_optimization
Closed

feat(eval): add agent-based iterative format optimization framework and history#7
gspencergoog wants to merge 27 commits into
mainfrom
iterative_optimization

Conversation

@gspencergoog

Copy link
Copy Markdown
Owner

Summary

Adds the modular eval/iterative agent-based format optimization framework and evaluation diagnostic utilities. This framework automates prompt engineering and compiler optimizations for A2UI inference formats (such as Atom) via autonomous subagent evaluation loops, performance benchmarking, history archiving, and comparative reporting.

Changes

  • Core Optimizer Module: Modularized eval/iterative/optimize_format.py into dedicated submodules (utils/archiver.py, utils/format_tools.py, utils/reporter.py, utils/runner.py).
  • CLI Diagnostic Utilities:
    • eval/iterative/compare_results.py: Provides Markdown delta comparisons across evaluation runs and baseline benchmarks (computing median schema accuracy, quality score, latency, and reasoning token efficiency).
    • eval/iterative/sync_history.py: Automatically discovers and syncs iteration runs across parallel worktrees into main history with run ID collision re-indexing.
  • Unit Test Suites & Robustness:
    • Added unit test suites under eval/tests/ (test_compare_results.py, test_sync_history.py, test_utils.py, test_optimize_format.py), achieving 93% line coverage across eval/iterative/.
  • Iteration Archives: Included historical iteration runs (eval/iterative/history/) detailing prompt and compiler optimization experiments for Atom format.

Impact & Risks

  • Impact: Enables automated, reproducible format optimization for A2UI LLM inference formats.
  • Risks: None. All changes are scoped exclusively to eval/ and developer tooling.
  • Stacking: Stacked on top of atom_format branch.

Testing

  1. Verified all unit tests pass with 100% pass rate:
    uv run pytest eval/tests/
  2. Verified line coverage across eval/iterative/:
    uv run pytest --cov=eval/iterative --cov-report=term-missing eval/tests/
  3. Formatted code via ./scripts/fix_format.sh (Pyink).

@gspencergoog
gspencergoog force-pushed the iterative_optimization branch from a4ee7c1 to 85872d2 Compare July 23, 2026 02:54
…ck, archiver log fallback, and sync race conditions
…chiver metrics fallback, and transport format support
…ions, scores/usage guards, and mtime sorting
…rds, None coalescing, and glob de-duplication
…tering, S_opt zero fallbacks, and PID log dir
…solution, results.json archiving, and run_meta metric extraction
… samples dict normalization, and mtime eval file sorting
…ialized guard, module level sync import, and failure explanation list scores
…tion, non-none metric resolution, utf-8 subprocess, and baseexception cleanup
…guards, reporter metric accuracy fallback, and worktree history path filtering
…y dict guard, judging_val N/A check, and archiver results.json handling
…-format-optimizer skill

- Define inference-format-optimizer skill under eval/skills/inference-format-optimizer/ with SKILL.md, references/, templates/, scripts/, and unit tests (59/59 passing).
- Update archiver.py, sync_history.py, and optimize_format.py to support workspace-relative history storage (eval/history/) and configurable --history-dir option.
- Consolidate all historical run logs into format subdirectories (eval/history/atom/ and eval/history/express/) and update master index generators.
- Remove legacy eval/iterative/ directory.
@gspencergoog
gspencergoog force-pushed the iterative_optimization branch from 16167d3 to ab69d28 Compare July 24, 2026 17:41
@gspencergoog
gspencergoog changed the base branch from atom_format to main July 24, 2026 17:41
@gspencergoog

Copy link
Copy Markdown
Owner Author

Closing in favor of upstream PR a2ui-project#2092

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant