Class: Braintrust::Models::FeedbackExperimentItem

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/braintrust/models/feedback_experiment_item.rb

Defined Under Namespace

Classes: Source

Instance Attribute Summary collapse

Method Summary

Methods inherited from BaseModel

#[], #initialize, #inspect, #to_h, #to_s

Constructor Details

This class inherits a constructor from Braintrust::BaseModel

Instance Attribute Details

#commentString

An optional comment string to log about the experiment event

Returns:

  • (String)


14
# File 'lib/braintrust/models/feedback_experiment_item.rb', line 14

optional :comment, String

#expectedObject

The ground truth value (an arbitrary, JSON serializable object) that you'd compare to output to determine if your output value is correct or not

Returns:

  • (Object)


19
# File 'lib/braintrust/models/feedback_experiment_item.rb', line 19

optional :expected, Braintrust::Unknown

#idString

The id of the experiment event to log feedback for. This is the row id returned by POST /v1/experiment/{experiment_id}/insert

Returns:

  • (String)


9
# File 'lib/braintrust/models/feedback_experiment_item.rb', line 9

required :id, String

#metadataHash

A dictionary with additional data about the feedback. If you have a user_id, you can log it here and access it in the Braintrust UI.

Returns:

  • (Hash)


24
# File 'lib/braintrust/models/feedback_experiment_item.rb', line 24

optional :metadata, Hash

#scoresHash

A dictionary of numeric values (between 0 and 1) to log. These scores will be merged into the existing scores for the experiment event

Returns:

  • (Hash)


29
# File 'lib/braintrust/models/feedback_experiment_item.rb', line 29

optional :scores, Hash

#sourceSymbol

The source of the feedback. Must be one of "external" (default), "app", or "api" One of the constants defined in Source

Returns:

  • (Symbol)


35
# File 'lib/braintrust/models/feedback_experiment_item.rb', line 35

optional :source, enum: -> { Braintrust::Models::FeedbackExperimentItem::Source }