## 3 Methodology
### P(True)-Based Confidence Evaluation Mechanism
#### 3.5.2 Confidence Evaluation Mechanism  
**Confidence Scoring** After multi-round structured reasoning, the model produces one candidate tail entity for each sub-group of candidate entities. We collect all these candidate entities and construct the corresponding suffix prompts to calculate their confidence scores \(P_{i}(\text{True})\) for the candidate tail entities in the given triple. It is important to note that we do not compute confidence scores for all entities in the candidate sets. Instead, we only evaluate the entities actually generated by the model during the multi-round reasoning  
Figure 4: P(True) confidence computation method. The blue values denote the token-level probabilities within the generated output sequence, while the highlighted segments correspond to the input prompt delivered to the model. process. For example, given the query triple \((``\textit{Avatar}\",``\textit{director}\",? )\), the model may generate candidate entities such as _[PERSON]_, _[PERSON]_, and _[PERSON]_ in different reasoning rounds. We construct suffix prompts for these candidates and compute the corresponding confidence scores \(P_{i}\) using the method presented in Section 3.5.1. **Candidate Ranking** The candidate tail entities are ranked in descending order based on their computed confidence scores, and the one with the highest score is selected as the final prediction:  
\[t^{*}=\operatorname*{arg\,max}_{t_{i}\in T_{\text{out}}}P_{i}. \tag{3}\]  
where \(T_{\text{out}}\) represents the set of candidate entities generated during the reasoning process. Additionally, the model provides an explanation for the selected prediction. This post hoc verification mechanism, when coupled with structure-aware reasoning, improves the model's ability to differentiate among candidate entities and enhances both interpretability and prediction reliability. In summary, GLR incorporates a confidence evaluation component that ranks candidate tail entities based on their credibility estimates. Algorithmic 1 provides a unified algorithmic summary that encapsulates both the training and inference procedures of the GLR framework. It delineates the complete pipeline from Graph-CoT prompt construction and LoRA-based instruction tuning to multi-round reasoning and confidence-based prediction. This structured representation offers a clear and reproducible implementation roadmap for applying GLR to knowledge graph completion tasks. ```
0: Query triple \(q=(h,r,? )\); Knowledge graph \(\mathcal{G}\); Large language model \(M\); Instruction tuning set \(D_{\text{train}}\)
0: Final predicted tail entity \(t^{*}\)
1: Extract supporting triples \(S\subset\mathcal{G}\) satisfying: \(S=\{(h^{\prime},r^{\prime},t^{\prime})\in\mathcal{G}\mid h^{\prime}=h\lor r ^{\prime}=r\lor t^{\prime}=h\}\)
2: Construct Graph-CoT prompt \(P_{q}\) based on \(S\) and candidate entity set \(\mathcal{C}_{q}\) for query \(q\)
3: Construct instruction-tuning dataset: \(\mathcal{D}_{\text{prompt}}=(P_{q}^{j},t_{j})\mid(h_{j},r_{j},t_{j})\in D_{ \text{train}}\) by repeating Steps 1-2
4: Fine-tune \(M\) on \(\mathcal{D}_{\text{prompt}}\) using LoRA, resulting in adapted model \(M^{\prime}\)
5: Partition \(C_{q}\) as \(C_{q}=\bigcup_{i=1}^{k}C_{i}\), with \(C_{i}\subseteq\mathcal{C}_{q}\), subject to length constraints
6:for each batch \(C_{i}\)do
7: Construct prompt \(P_{q}^{i}\) using \(S\) and \(C_{i}\)
8: Predict tail entity: \(t_{i}\gets M^{\prime}(P_{q}^{i})\)
9:endfor
10: Collect predictions: \(T_{\text{out}}=\{t_{1},t_{2},\dots,t_{k}\}\)
11: Initialize confidence list \(P\)
12:for each \(t_{i}\in T_{\text{out}}\)do
13: Construct binary-choice prompt \(B_{i}\): \"The possible correct triple is: \((h,r,t_{i})\).