Class ConsistencyResult

java.lang.Object
com.tnsai.reasoning.ConsistencyResult

public final class ConsistencyResult extends Object
Result of a self-consistency reasoning execution.

Contains the consensus answer from multiple reasoning paths along with confidence metrics and all individual reasoning chains.

  • Method Details

    • getConsensusAnswer

      public String 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

      public List<ReasoningPath> getAllPaths()
      Gets all reasoning paths generated.
    • getAnswerCounts

      public Map<String,Integer> 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

      public static ConsistencyResult.Builder builder()
      Creates a new builder for ConsistencyResult.
    • toString

      public String toString()
      Overrides:
      toString in class Object