pub struct UncertaintyReport {
pub level: String,
pub score: f64,
pub reasons: Vec<UncertaintyReason>,
pub recommended_action: String,
pub recovery_suggestions: Vec<RecoverySuggestion>,
pub exact_symbol_match: bool,
pub sources: UncertaintySourceBreakdown,
}Expand description
Machine-readable uncertainty rollup.
Always emitted — even when level is “low”, so dashboards can rely on
structural consistency without null-checking.
Fields§
§level: StringAggregated uncertainty level: “low” | “medium” | “high” | “critical”.
score: f64Normalised uncertainty score [0.0, 1.0] (0 = certain, 1 = completely uncertain).
reasons: Vec<UncertaintyReason>Structured reasons, sorted by weight descending.
recommended_action: StringSingle most-actionable recommendation for the agent. Values: “none” | “narrow_query” | “add_domain_term” | “check_index_coverage” | “broaden_query”
recovery_suggestions: Vec<RecoverySuggestion>Recovery quality metrics: one entry per scoped suggestion.
exact_symbol_match: boolTrue when the query is an exact match for a known indexed symbol name.
When true, the level is capped at “medium” regardless of ambiguity signals — because the agent typed the exact name they want and ASD knows that symbol.
sources: UncertaintySourceBreakdownPer-source uncertainty breakdown: query / db_state / result_set.
Lets agents target the right fix (refine query, annotate more, broaden scope) instead of responding generically to a high uncertainty level.