Package com.tnsai.reasoning
Class ConsistencyResult
java.lang.Object
com.tnsai.reasoning.ConsistencyResult
Result of a self-consistency reasoning execution.
Contains the consensus answer from multiple reasoning paths along with confidence metrics and all individual reasoning chains.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for ConsistencyResult. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConsistencyResult.Builderbuilder()Creates a new builder for ConsistencyResult.Gets all reasoning paths generated.Gets the count of each unique answer.doubleGets the confidence score (0.0 - 1.0).Gets the consensus answer (most common answer across reasoning paths).intGets the total number of reasoning paths generated.booleanisConfident(double threshold) Returns true if confidence is above the given threshold.booleanReturns true if there was unanimous agreement across all paths.toString()
-
Method Details
-
getConsensusAnswer
Gets the consensus answer (most common answer across reasoning paths). -
getConfidence
public double getConfidence()Gets the confidence score (0.0 - 1.0). Calculated as: (count of consensus answer) / (total paths) -
getAllPaths
Gets all reasoning paths generated. -
getAnswerCounts
Gets the count of each unique answer. -
getTotalPaths
public int getTotalPaths()Gets the total number of reasoning paths generated. -
isUnanimous
public boolean isUnanimous()Returns true if there was unanimous agreement across all paths. -
isConfident
public boolean isConfident(double threshold) Returns true if confidence is above the given threshold. -
builder
Creates a new builder for ConsistencyResult. -
toString
-