Class: Agentic::Verification::CriticResult

Inherits:
Object
  • Object
show all
Defined in:
lib/agentic/verification/critic_framework.rb

Overview

Represents the result of a critic’s evaluation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(task_id:, confidence:, verdict:, comments: []) ⇒ CriticResult

Initializes a new CriticResult

Parameters:

  • task_id (String)

    The ID of the task that was evaluated

  • confidence (Float)

    The confidence of the evaluation (0.0-1.0)

  • verdict (Boolean)

    The verdict of the evaluation (true = pass, false = fail)

  • comments (Array<String>) (defaults to: [])

    Comments from the critic



70
71
72
73
74
75
# File 'lib/agentic/verification/critic_framework.rb', line 70

def initialize(task_id:, confidence:, verdict:, comments: [])
  @task_id = task_id
  @confidence = confidence
  @verdict = verdict
  @comments = comments
end

Instance Attribute Details

#commentsArray<String> (readonly)

Returns Comments from the critic.

Returns:

  • (Array<String>)

    Comments from the critic



63
64
65
# File 'lib/agentic/verification/critic_framework.rb', line 63

def comments
  @comments
end

#confidenceFloat (readonly)

Returns The confidence of the evaluation (0.0-1.0).

Returns:

  • (Float)

    The confidence of the evaluation (0.0-1.0)



57
58
59
# File 'lib/agentic/verification/critic_framework.rb', line 57

def confidence
  @confidence
end

#task_idString (readonly)

Returns The ID of the task that was evaluated.

Returns:

  • (String)

    The ID of the task that was evaluated



54
55
56
# File 'lib/agentic/verification/critic_framework.rb', line 54

def task_id
  @task_id
end

#verdictBoolean (readonly)

Returns The verdict of the evaluation (true = pass, false = fail).

Returns:

  • (Boolean)

    The verdict of the evaluation (true = pass, false = fail)



60
61
62
# File 'lib/agentic/verification/critic_framework.rb', line 60

def verdict
  @verdict
end

Instance Method Details

#positive?Boolean

Checks if the evaluation is positive

Returns:

  • (Boolean)

    Whether the evaluation is positive



79
80
81
# File 'lib/agentic/verification/critic_framework.rb', line 79

def positive?
  @verdict
end

#to_hHash

Converts the critic result to a hash

Returns:

  • (Hash)

    The critic result as a hash



85
86
87
88
89
90
91
92
# File 'lib/agentic/verification/critic_framework.rb', line 85

def to_h
  {
    task_id: @task_id,
    confidence: @confidence,
    verdict: @verdict,
    comments: @comments
  }
end