Record Class Confidence
java.lang.Object
java.lang.Record
ai.doctruth.Confidence
- Record Components:
score- the confidence in[0.0, 1.0].rationale- a free-form, possibly empty explanation of why the score was chosen.
A confidence score for a single extracted field, plus a free-form rationale. The score is
typically LLM-self-reported (a prior production extraction system-style
Field(ge=0.0, le=1.0)) — the library
does NOT compute it from signals; it carries through what the model emits.
Invariants (enforced by the compact constructor):
scoreis a real number in[0.0, 1.0]—NaNand infinities are rejected.rationaleis non-null. Empty string is allowed (some prompts skip rationale).
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionConfidence(double score, String rationale) Creates an instance of aConfidencerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of therationalerecord component.doublescore()Returns the value of thescorerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Confidence
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
score
-
rationale
-