GRUET: Quantifying Uncertainty of Agentic Reasoning-and-Acting Processes
Authors: Shuang Liang, Xin-Yu Hu, Shao-Qun Zhang
Organizations: National Key Laboratory for Novel Software Technology, Nanjing University, China. · School of Intelligent Science and Technology, Nanjing University, China.
Agents have attracted considerably increasing attention due to the power of executing both Reasoning and Acting (ReAct) in open and dynamic environments. The ReAct process typically exhibits a multi-turn trajectory in which one drives Large Language Models (LLMs) to generate both reasoning chains and task-specific actions in an interleaved manner. However, agents often suffer from significant uncertainty, where identical tasks yield divergent trajectories; trajectories with higher uncertainty often produce incomprehensible behaviors, severely undermining agent credibility. This work conjectures that such trajectory-level uncertainty frequently stems from cumulative turn-level reasoning uncertainty induced by LLMs; the latter often exhibits a collection of branches of divergent reasoning chains and their resulting actions. Built upon this, we present the Graph-based Reasoning UncErtainty in Trajectories (GRUET) method for the uncertainty quantification of ReAct, comprising turn-level reasoning uncertainty quantification and trajectory-level uncertainty aggregation; the former precisely quantifies reasoning uncertainty via modeling the reasoning space spanned by potential reasoning branches as a graph and then approximating the reasoning space complexity with graph complexity, while the latter employs simple aggregation strategies for quantifying the overall trajectory credibility. Empirical evaluations across nine LLMs and five benchmarks validate the effectiveness of our proposed GRUET in terms of selective generation performance, measured by AUROC, AUPRC, and AUARC.
Figures & tables
Figure 1: Workflow of our proposed GRUET.
Figure 2: Visualizations of aggregation strategies on SWE-bench Verified and Lite benchmarks with the Qwen3.5-35B-A3B.
Strategy
Formulation
Number of Samples
First-turn
u=u1
K−1
Last-turn
u=uT
K−1
Head- d%
u=∑i=1αui/α for α=max(⌊Td%⌋,1)
α(K−1)
Tail- d%
u=∑i=T−α+1Tui/α
α(K−1)
Top- d%
u=∑i=1αu(i)/α
T(K−1)
All-turn
u=∑i=1Tui/T
T(K−1)
Table 1: Formulation and number of samples of the proposed aggregation strategies.
Figure 3: Comparisons of UQ performance for partial Qwen3.5 family.
Metric
Rnd
Reflexive-based
Information-based
Diversity-based
GRUET (Ours)
P(True)
VC
Ppl
PE
Eig
Ecc
Deg
SD
SSAR
SE
First-turn
All-turn
AUROC
Avg. mean
50.00
50.07
55.67
48.20
56.89
55.74
55.06
55.04
46.05
54.03
58.38
66.11
75.49
Avg. std.
0.00
2.53
2.25
2.36
2.35
2.30
2.27
2.28
2.37
2.39
2.30
2.31
1.93
AUPRC
Avg. mean
36.57
39.34
41.92
37.86
42.75
43.07
42.35
42.29
37.49
41.97
44.68
54.05
61.10
Avg. std.
0.00
2.37
2.23
2.30
2.55
2.68
2.63
2.67
2.51
2.63
2.74
3.18
3.20
AUARC
Avg. mean
36.57
36.75
39.05
34.56
38.98
38.77
37.96
37.82
33.02
37.67
40.13
47.14
51.91
Table 2: Comparisons of the overall discriminative performance of GRUET and its contenders, averaged across all evaluated LLMs and benchmarks, where bold and underlined values denote the best and second-best results, respectively.
Strategy
SWE-bench Verified
SWE-bench Lite
InterCode MBPP
InterCode Spider
InterCode NL2Bash
AUROC
AUPRC
AUARC
AUROC
AUPRC
AUARC
AUROC
AUPRC
AUARC
AUROC
AUPRC
AUARC
AUROC
AUPRC
AUARC
LLM Family: Qwen3.5
First-turn
55.36
60.29
58.26
49.95
53.92
51.88
66.14
53.40
46.60
69.09
77.98
76.03
78.41
43.72
26.63
Last-turn
59.78
59.74
57.46
54.85
54.74
52.86
67.89
44.37
38.63
59.33
68.88
67.34
74.03
28.90
21.39
Head-25%
67.82
69.22
65.64
59.95
55.51
53.58
62.77
46.89
42.64
68.22
79.05
76.93
78.10
47.13
27.16
Tail-25%
65.17
66.89
63.72
60.22
56.97
55.07
70.38
47.95
40.96
66.63
75.55
73.61
71.86
26.75
20.29
Table 3: Comparisons of the average discriminative performance of all proposed aggregation strategies with the Qwen3.5 and Gemma 4 families, where bold and underlined values denote the best and second-best results, respectively.
Figure 4: Sensitivity analyses of GRUET with the all-turn strategy for the Qwen3.5 family.
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Benchmarks
SWE-bench Series
InterCode Series
SWE-bench Verified
SWE-bench Lite
InterCode MBPP
InterCode Spider
InterCode NL2Bash
Language
Python
Python
Python
SQL
Bash
Level
Repository-level
Repository-level
Function-level
Query-level
Command-level
Instances
500
300
974
1034
200
Reward
Binary
Binary
Binary
Binary
Binary
Appendix
Table 4: Overview of the evaluated benchmarks.
Figure 5: Comparisons of UQ performance across the Gemma 4 family.
Figure 6: Comparisons of UQ performance across the Qwen3.5 family.
LLM Family: Qwen3.5
LLM Family: Gemma 4
Scale
Strategy
SWE-bench Verified
SWE-bench Lite
Scale
SWE-bench Verified
SWE-bench Lite
AUROC
AUPRC
AUARC
AUROC
AUPRC
AUARC
AUROC
AUPRC
AUARC
AUROC
AUPRC
AUARC
35B- A3B
First-turn
52.24
58.10
55.61
47.69
52.18
49.69
31B
64.29
41.26
35.66
58.13
25.65
21.90
Last-turn
63.56
60.34
58.07
57.97
51.84
49.99
73.02
49.20
40.35
71.34
45.72
30.82
Head-25%
74.76
71.38
66.38
57.81
50.85
48.95
75.42
52.74
42.24
77.24
36.89
28.56
Tail-25%
59.96
57.14
55.09
63.19
55.71
53.47
77.23
42.15
36.35
80.83
38.37
29.84
Appendix
Table 6: Comparison of UQ performance of all proposed aggregation strategies for each LLM on the SWE-bench series, where bold and underlined values denote the best and second-best results, respectively.
Scale
Strategy
InterCode MBPP
InterCode Spider
InterCode NL2Bash
AUROC
AUPRC
AUARC
AUROC
AUPRC
AUARC
AUROC
AUPRC
AUARC
LLM Family: Qwen3.5
9B
First-turn
66.24
56.27
50.23
63.93
74.56
72.85
78.21
37.58
25.86
Last-turn
57.36
37.55
32.98
58.81
68.18
66.97
76.91
34.24
24.63
Head-25%
63.49
54.09
48.71
66.93
77.15
75.11
74.95
37.57
25.41
Tail-25%
58.94
38.56
34.27
62.93
72.66
70.96
72.33
27.70
21.47
Appendix
Table 7: Comparison of UQ performance of all proposed aggregation strategies for each LLM on the InterCode series, where bold and underlined values denote the best and second-best results, respectively.
Figure 7: Sensitivity analyses of the percentage d% in the aggregation strategy for the Qwen3.5 and Gemma 4 families.
Figure 8: Sensitivity analyses of GRUET with the all-turn strategy for the Gemma 4 family.
Recent years have witnessed great advances in the reasoning ability of Large Language Models (LLMs). However, the reasoning processes of LLMs often exhibit uncertainty, where LLMs often produce a proliferation of divergent branches at each reasoning step even when fed the same prompting inputs, and certain branches exhibit evidently incredible, even nonsensical, reasoning chains and results. In this paper, we propose the Graph-complexity-based UncerTainty (GUT) method for investigating the reasoning uncertainty of LLMs. The key idea of GUT is to characterize the potential branches of each reasoning chain with a directed acyclic graph, thereby ensuring that all potential branches are comprehensively covered within the graph space. Building upon this recognition, we further build two modules of GUT, that is, a Quantification (GUT-Q) module and an Optimization (GUT-O) module, for quantifying and reducing the reasoning uncertainty of LLMs, respectively. GUT-Q measures LLM reasoning uncertainty by approximating the reasoning space complexity with graph complexity. GUT-O implements uncertainty optimization by treating negative uncertainty as the reward function in reinforcement learning. Experimental results conducted on four LLMs and five datasets validate the effectiveness of GUT.
Shuang Liang, Xin-Yu Hu, Xiang-Jun Ou +1
National Key Laboratory for Novel Software Technology, Nanjing University, China. · School of Intelligent Science and Technology, Nanjing University, China.
Reliable uncertainty quantification (UQ) is essential for deploying large language model (LLM) agents in complex interactive environments. Existing UQ methods largely rely on local signals, such as token probabilities, predictive entropy, or per-step confidence, and therefore overlook the long-range dependencies through which errors accumulate across an execution trajectory. As a result, they may fail to identify agent failures whose causes originate several reasoning or interaction steps before the final answer. We propose RUPA (Relational Uncertainty Propagation for Agents), a trajectory-level UQ framework for LLM agents. RUPA represents an execution history as a directed trajectory graph in which reasoning states, tool interactions, and environment feedback are nodes connected by temporal and semantic dependency edges. It then propagates uncertainty over this graph to capture how execution risk accumulates and transfers across interaction steps. The propagated signal is combined with trajectory-level behavioral features and goal-alignment information to produce a confidence estimate for the full agent trajectory. We evaluate RUPA on representative agent benchmarks, including τ-2, Terminal-Bench-2, and GAIA, using 6 open-source LLMs spanning multiple model families. Experimental results show that RUPA consistently outperforms existing UQ methods by providing more accurate uncertainty estimates, enabling earlier failure detection, and improving uncertainty-guided agent execution across diverse agent tasks. These results demonstrate that explicitly modeling relational dependency is crucial to reliable UQ for long-horizon LLM agents, providing a practical foundation for trustworthy agent execution.
Large language model (LLM)-based agents often make suboptimal tool-use decisions, including unsupported tool invocation and hallucinated direct responses, which may accumulate errors throughout multi-step interactions. Existing approaches mainly improve these behaviors through inference-time correction or coarse-grained reward signals based on decision outcomes and structured checklists, leaving the uncertainty characteristics of agent decisions underexplored. We observe that decision-oriented reinforcement learning tends to weaken the uncertainty separation between correct and incorrect actions, resulting in overconfident mistakes and weaker exploration signals. Therefore, we propose TRUST, which incorporates uncertainty quantification into reward design as a repulsive force for maintaining uncertainty separation, and labels lightweight key-turn annotations for unified post-training of multi-turn trajectories. Experimental results across diverse tool-use benchmarks show that TRUST consistently enhances both decision quality and agent performance while maintaining more reliable uncertainty estimates during optimization.
Yijin Zhou, Linqian Zeng, Xiaoya Lu +4
Shanghai Jiao Tong University, China · Shanghai Artificial Intelligence Laboratory, China · Shanghai Innovation Institute, China