Class: Ask::Eval::Dataset::Item

Inherits:
Data
  • Object
show all
Defined in:
lib/ask/eval/dataset.rb

Overview

A single dataset item: the input fed to the agent, optional expected output, optional context, and tags/metadata for filtering.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context

Returns:

  • (Object)

    the current value of context



25
26
27
# File 'lib/ask/eval/dataset.rb', line 25

def context
  @context
end

#expectedObject (readonly)

Returns the value of attribute expected

Returns:

  • (Object)

    the current value of expected



25
26
27
# File 'lib/ask/eval/dataset.rb', line 25

def expected
  @expected
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



25
26
27
# File 'lib/ask/eval/dataset.rb', line 25

def id
  @id
end

#inputObject (readonly)

Returns the value of attribute input

Returns:

  • (Object)

    the current value of input



25
26
27
# File 'lib/ask/eval/dataset.rb', line 25

def input
  @input
end

#metadataObject (readonly)

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



25
26
27
# File 'lib/ask/eval/dataset.rb', line 25

def 
  @metadata
end

#tagsObject (readonly)

Returns the value of attribute tags

Returns:

  • (Object)

    the current value of tags



25
26
27
# File 'lib/ask/eval/dataset.rb', line 25

def tags
  @tags
end

Instance Method Details

#to_hObject



26
# File 'lib/ask/eval/dataset.rb', line 26

def to_h = { id: id, input: input, expected: expected, context: context, tags: tags, metadata:  }