Class: Phronomy::GeneratorVerifier::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/phronomy/generator_verifier.rb

Overview

Immutable value object returned by #invoke.

Instance Attribute Summary collapse

Instance Attribute Details

#citationsArray<Hash> (readonly)

WARNING: These citations are extracted from the LLM's own response and are not verified against any external knowledge base or URL. Do not treat them as authoritative without independent verification.

Returns:

  • (Array<Hash>)

    [excerpt:, ...]



68
69
70
71
72
73
74
# File 'lib/phronomy/generator_verifier.rb', line 68

Result = Struct.new(
  :output, :confidence, :citations, :iterations, :review_notes, :trusted,
  keyword_init: true
) do
  # @return [Boolean] true when confidence >= threshold
  alias_method :trusted?, :trusted
end

#confidenceFloat (readonly)

Returns combined confidence score (0.0–1.0).

Returns:

  • (Float)

    combined confidence score (0.0–1.0)



68
69
70
71
72
73
74
# File 'lib/phronomy/generator_verifier.rb', line 68

Result = Struct.new(
  :output, :confidence, :citations, :iterations, :review_notes, :trusted,
  keyword_init: true
) do
  # @return [Boolean] true when confidence >= threshold
  alias_method :trusted?, :trusted
end

#iterationsInteger (readonly)

Returns number of draft-review cycles executed.

Returns:

  • (Integer)

    number of draft-review cycles executed



68
69
70
71
72
73
74
# File 'lib/phronomy/generator_verifier.rb', line 68

Result = Struct.new(
  :output, :confidence, :citations, :iterations, :review_notes, :trusted,
  keyword_init: true
) do
  # @return [Boolean] true when confidence >= threshold
  alias_method :trusted?, :trusted
end

#outputString (readonly)

Returns the final answer text.

Returns:

  • (String)

    the final answer text



68
69
70
71
72
73
74
# File 'lib/phronomy/generator_verifier.rb', line 68

Result = Struct.new(
  :output, :confidence, :citations, :iterations, :review_notes, :trusted,
  keyword_init: true
) do
  # @return [Boolean] true when confidence >= threshold
  alias_method :trusted?, :trusted
end

#review_notesArray<String> (readonly)

Returns reviewer feedback for each cycle.

Returns:

  • (Array<String>)

    reviewer feedback for each cycle



68
69
70
71
72
73
74
# File 'lib/phronomy/generator_verifier.rb', line 68

Result = Struct.new(
  :output, :confidence, :citations, :iterations, :review_notes, :trusted,
  keyword_init: true
) do
  # @return [Boolean] true when confidence >= threshold
  alias_method :trusted?, :trusted
end

#trustedBoolean (readonly) Also known as: trusted?

Returns true when confidence >= threshold.

Returns:

  • (Boolean)

    true when confidence >= threshold



68
69
70
71
72
73
74
# File 'lib/phronomy/generator_verifier.rb', line 68

Result = Struct.new(
  :output, :confidence, :citations, :iterations, :review_notes, :trusted,
  keyword_init: true
) do
  # @return [Boolean] true when confidence >= threshold
  alias_method :trusted?, :trusted
end