Class: Agentic::Verification::VerificationResult
- Inherits:
-
Object
- Object
- Agentic::Verification::VerificationResult
- Defined in:
- lib/agentic/verification/verification_result.rb
Overview
Represents the result of a verification process
Instance Attribute Summary collapse
-
#confidence ⇒ Float
readonly
The confidence score (0.0-1.0) of the verification.
-
#messages ⇒ Array<String>
readonly
Messages from the verification process.
-
#task_id ⇒ String
readonly
The ID of the task that was verified.
-
#verified ⇒ Boolean
readonly
Whether the verification passed.
Instance Method Summary collapse
-
#initialize(task_id:, verified:, confidence:, messages: []) ⇒ VerificationResult
constructor
Initializes a new VerificationResult.
-
#to_h ⇒ Hash
Converts the verification result to a hash.
-
#verified_with_confidence?(threshold: 0.8) ⇒ Boolean
Checks if the verification passed with high confidence.
Constructor Details
#initialize(task_id:, verified:, confidence:, messages: []) ⇒ VerificationResult
Initializes a new VerificationResult
24 25 26 27 28 29 |
# File 'lib/agentic/verification/verification_result.rb', line 24 def initialize(task_id:, verified:, confidence:, messages: []) @task_id = task_id @verified = verified @confidence = confidence @messages = end |
Instance Attribute Details
#confidence ⇒ Float (readonly)
Returns The confidence score (0.0-1.0) of the verification.
14 15 16 |
# File 'lib/agentic/verification/verification_result.rb', line 14 def confidence @confidence end |
#messages ⇒ Array<String> (readonly)
Returns Messages from the verification process.
17 18 19 |
# File 'lib/agentic/verification/verification_result.rb', line 17 def @messages end |
#task_id ⇒ String (readonly)
Returns The ID of the task that was verified.
8 9 10 |
# File 'lib/agentic/verification/verification_result.rb', line 8 def task_id @task_id end |
#verified ⇒ Boolean (readonly)
Returns Whether the verification passed.
11 12 13 |
# File 'lib/agentic/verification/verification_result.rb', line 11 def verified @verified end |
Instance Method Details
#to_h ⇒ Hash
Converts the verification result to a hash
40 41 42 43 44 45 46 47 |
# File 'lib/agentic/verification/verification_result.rb', line 40 def to_h { task_id: @task_id, verified: @verified, confidence: @confidence, messages: @messages } end |
#verified_with_confidence?(threshold: 0.8) ⇒ Boolean
Checks if the verification passed with high confidence
34 35 36 |
# File 'lib/agentic/verification/verification_result.rb', line 34 def verified_with_confidence?(threshold: 0.8) @verified && @confidence >= threshold end |