pub struct Recommendation {
pub severity: RecommendationSeverity,
pub action: ActionKind,
pub turn: usize,
pub baseline_turn: usize,
pub candidate_turn: usize,
pub message: String,
pub rationale: String,
pub axis: Axis,
pub confidence: f64,
}Expand description
One prescriptive recommendation for a reviewer.
Wire format is verbose-but-diff-friendly (all fields named); the renderers condense it into one-line “severity · action · target” sentences for display.
Fields§
§severity: RecommendationSeveritySeverity/priority; sort key for display.
action: ActionKindWhat kind of move is being suggested.
turn: usize0-based turn index the recommendation refers to, in the baseline chat-response sequence. 0 when the recommendation is trace-wide (not tied to a specific turn).
Kept for backward compatibility: this is always equal to
baseline_turn. New consumers should prefer baseline_turn /
candidate_turn, since the former can exceed report.pair_count
(which is min(N_baseline, N_candidate)) when the candidate
dropped a turn.
baseline_turn: usize0-based index in the baseline’s chat-response sequence (mirror
of FirstDivergence::baseline_turn). May exceed
report.pair_count when the candidate dropped turns.
candidate_turn: usize0-based index in the candidate’s chat-response sequence (mirror
of FirstDivergence::candidate_turn). May differ from
baseline_turn when the alignment path contains gaps.
message: StringOne-line action statement, starts with an imperative verb.
Example: “Restore send_confirmation_email tool call at turn 9.”
rationale: StringOne-line explanation of the signal that triggered this
recommendation. Sourced from the underlying FirstDivergence’s
explanation field plus any rule-specific context.
axis: AxisWhich diff axis the signal came from. Lets callers filter recommendations by concern (e.g. only safety-related).
confidence: f64Confidence from the underlying divergence, 0..1. Low-confidence recommendations may be suppressed in compact views.
Trait Implementations§
Source§impl Clone for Recommendation
impl Clone for Recommendation
Source§fn clone(&self) -> Recommendation
fn clone(&self) -> Recommendation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Recommendation
impl Debug for Recommendation
Source§impl<'de> Deserialize<'de> for Recommendation
impl<'de> Deserialize<'de> for Recommendation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for Recommendation
impl PartialEq for Recommendation
Source§fn eq(&self, other: &Recommendation) -> bool
fn eq(&self, other: &Recommendation) -> bool
self and other values to be equal, and is used by ==.