pub struct ScalarTemperature {
pub trit: i8,
pub confidence: f32,
pub temperature: f32,
pub reasoning: String,
pub prompt_hint: String,
}Expand description
Maps a ternary decision to a recommended LLM sampling temperature.
The core insight: ternary state directly encodes how much exploration an AI agent should do in its next generation step.
+1 (affirm, high confidence) → low temperature [0.05–0.3] — be precise 0 (tend, uncertain) → high temperature [0.7–1.0] — explore options -1 (reject, high confidence) → very low temperature [0.05–0.15] — be firm in refusal
The exact value within each range scales with confidence: high confidence → toward the extreme of the range low confidence → toward the middle of the range
Fields§
§trit: i8§confidence: f32§temperature: f32§reasoning: String§prompt_hint: StringRecommended system prompt addendum based on ternary state
Trait Implementations§
Source§impl Clone for ScalarTemperature
impl Clone for ScalarTemperature
Source§fn clone(&self) -> ScalarTemperature
fn clone(&self) -> ScalarTemperature
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ScalarTemperature
impl RefUnwindSafe for ScalarTemperature
impl Send for ScalarTemperature
impl Sync for ScalarTemperature
impl Unpin for ScalarTemperature
impl UnsafeUnpin for ScalarTemperature
impl UnwindSafe for ScalarTemperature
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more