TL;DR
PROTEA is an interactive, evaluation-driven framework designed to debug and refine multi-agent LLM workflows. By utilizing "backward node evaluation" to infer intermediate expectations from final answers, it automatically pinpoints graph bottlenecks, suggests targeted prompt revisions, and re-evaluates the workflow in a unified, closed-loop interface.
What Problem Does This Paper Address?
As LLM applications transition from single prompts to complex, multi-agent architectures (using frameworks like LangGraph or AutoGen), debugging them becomes a systems-level headache. When a workflow's final output is incorrect, the root cause is often a subtle error or formatting drift in an upstream node that propagated downstream.
Currently, developers face two major hurdles:
- The Labeling Bottleneck: Real-world datasets rarely contain ground-truth labels for every intermediate step—usually, only the final answer is known.
- The Iteration Loop: Existing observability tools provide execution traces, but developers must still manually inspect long logs, deduce which prompt failed, modify the code, rerun the pipeline, and manually compare the changes.
PROTEA addresses these challenges by providing a unified interface for offline, test-driven optimization of graph-based LLM workflows.
Methods
PROTEA introduces a closed-loop system that coordinates execution, evaluation, and prompt optimization:
- Backward Node Evaluation: To bypass the lack of intermediate labels, PROTEA works backward from the final-answer reference. It generates candidate node-level expectations based on the final answer and downstream node requirements.
- Graph-Overlaid LLM Judging: It evaluates observed intermediate outputs against these generated expectations using LLM-as-a-judge rubrics. Nodes are flagged with discrete states (
PASS,WARN,FAIL) directly on the workflow graph visualization, allowing developers to instantly localize bottlenecks. - Interactive Prompt Refinement: When a developer selects a problematic node, PROTEA generates a targeted prompt revision based on the evaluator's rationale. This is presented as an editable before/after comparison.
- Automatic Re-evaluation: Once a prompt edit is approved, PROTEA automatically reruns the workflow across the test suite, updating the scores and displaying historical trajectories within the same interface. It also includes an AUTO LOOP mode to run this cycle fully autonomously for a fixed number of iterations.
Datasets
The authors evaluated PROTEA using three distinct setups:
- Case Study A (Enterprise Document Inspection): An internal production-adjacent workflow ($N=5$ nodes) evaluated against several dozen manually labeled documents with strict policy and style constraints.
- Case Study B (Conversational Recommendation): An internal workflow ($N=6$ nodes) that clarifies user requests, retrieves candidates, and ranks them.
- Automatic Iteration Stress Test: Eleven independently generated multi-agent workflows. Quantitative analysis focused on a 5-workflow subset with intentionally minimal initial prompts, covering tasks like HTTP log triage, course scheduling, incident-ticket generation, multi-step word problems, and support responses.
Key Insights and Ideas
- Backward Inference Unlocks Intermediate Evaluation: You don't need human-annotated data for every step of a multi-agent system. An LLM can successfully infer what an upstream agent should have produced by looking at the final correct answer and what the downstream agents needed.
- Visual Localization Beats Trace Reading: In user studies, developers heavily favored having
PASS/WARN/FAILstates overlaid directly on the Directed Acyclic Graph (DAG). It drastically reduces cognitive load compared to scrolling through massive text-based execution traces. - The Danger of Binary Graded Signals: During automatic optimization, tasks with binary exact-match criteria (like the word problem workflow) failed to improve. Without partial-credit criteria (e.g., tracking intermediate facts or format validity), the prompt optimizer receives no gradient signal showing whether a revision moved the system closer to the correct answer.
Key Results
PROTEA demonstrated substantial performance gains across both human-in-the-loop and fully automated testing:
- Document Inspection (Case Study A): Improved item-level correctness from 64.3% to 83.9%. Revisions primarily focused on making intermediate outputs explicit and tightening rubrics.
- Conversational Recommendation (Case Study B): Increased recommendation quality (Hit@5) from 0.30 to 0.38.
- Automatic Stress Test (AUTO LOOP): In the minimal-prompt stress test, 4 out of 5 workflows saw significant improvements over a no-rewrite baseline. For instance, the course scheduling workflow score jumped from 0.186 to 0.800.
Limitations and Future Work
- Fixed DAG Architectures Only: PROTEA currently only supports fixed directed acyclic graphs. It does not yet handle cyclic control flows, supervisor-based agent coordination, or long-running interactive agents.
- Dependence on Rubric Design: The framework relies heavily on well-calibrated LLM judges. Poorly designed rubrics or unstable judges can lead to noisy optimization signals.
- No Structural Modifications: The system optimizes prompts within a fixed architecture but cannot automatically add/remove nodes or rewire dependencies. The authors flag architectural edits as a promising direction for future versions.
Summary updated