Commit 37cb0f1
fix(eval): fall back AgentRunHistory to final output when no tool was called
trace_to_str() only ever renders spans carrying tool.name, so a run where
the agent answered in plain text and made zero tool calls produced an
empty AgentRunHistory - not because nothing happened, but because
trace_to_str had nothing tool-shaped to render. This hid the agent's real
final answer from both trajectory evaluators, matching UV-16309's
"AgentRunHistory omits the agent's own text responses, causing false 0s
(empty) or unearned high scores (non-empty)" description.
Both LegacyTrajectoryEvaluator and LLMJudgeTrajectoryEvaluator (via
BaseLLMTrajectoryEvaluator) now append WorkloadExecution.workload_output -
the agent's actual final answer, independent of the trace - whenever it's
non-empty, so the judge always sees what the agent answered.
Co-Authored-By: Claude Sonnet 5 <[email protected]>1 parent 1bdff0c commit 37cb0f1
2 files changed
Lines changed: 33 additions & 2 deletions
File tree
- packages/uipath/src/uipath/eval/evaluators
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
| |||
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
146 | 160 | | |
147 | 161 | | |
148 | 162 | | |
| |||
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
84 | 101 | | |
85 | 102 | | |
86 | 103 | | |
| |||
0 commit comments