#[repr(u8)]pub enum DifficultyHint {
None = 0,
Low = 1,
Medium = 2,
High = 3,
}Expand description
How hard an agent’s own conversation looks. Ordinal, four levels, deliberately coarse.
Four levels rather than a continuous score, because this feeds
ContextBucket and every extra distinction multiplies the bandit’s state space — the arms then
share less traffic and learn slower. A signal too fine to learn from is worse than a coarse one:
it looks more informative and performs worse.
Variants§
None = 0
No usable signal: a single-shot request, a non-agent client, or an unparseable body.
Low = 1
Some tool activity, nothing going wrong.
Medium = 2
Errors or repetition appearing.
High = 3
Sustained failure: the agent is stuck.
Implementations§
Source§impl DifficultyHint
impl DifficultyHint
Sourcepub fn score(s: TrajectorySignals) -> Self
pub fn score(s: TrajectorySignals) -> Self
Score signals into a hint.
The thresholds below are a prior, not a finding. They are a reasonable starting shape, and the bandit is what actually learns whether a given bucket deserves a higher start rung — so the job here is to separate genuinely different situations into different buckets, not to be right about which is harder. Getting the cut points slightly wrong costs a little learning rate; collapsing distinct situations into one bucket costs the signal entirely.
No tool activity yields DifficultyHint::None rather than DifficultyHint::Low: a
request with no tools has told us nothing, and “nothing” must not be confused with “fine”.
Sourcepub const fn as_u8(self) -> u8
pub const fn as_u8(self) -> u8
The wire value stored in Features::difficulty_hint.