Class: Braintrust::Models::InsertProjectLogsEventReplace
- Defined in:
- lib/braintrust/models/insert_project_logs_event_replace.rb
Defined Under Namespace
Classes: Context, Metrics, SpanAttributes
Instance Attribute Summary collapse
-
#_is_merge ⇒ Object
The
_is_merge
field controls how the row is merged with any existing row with the same id in the DB. -
#_object_delete ⇒ Boolean
Pass
_object_delete=true
to mark the project logs event deleted. -
#_parent_id ⇒ Object
Use the
_parent_id
field to create this row as a subspan of an existing row. -
#context ⇒ Braintrust::Models::InsertProjectLogsEventReplace::Context
Context is additional information about the code that produced the project logs event.
-
#created ⇒ DateTime
The timestamp the project logs event was created.
-
#error ⇒ Object
The error that occurred, if any.
-
#expected ⇒ Object
The ground truth value (an arbitrary, JSON serializable object) that you'd compare to
output
to determine if youroutput
value is correct or not. -
#id ⇒ String
A unique identifier for the project logs event.
-
#input ⇒ Object
The arguments that uniquely define a user input (an arbitrary, JSON serializable object).
-
#metadata ⇒ Hash
A dictionary with additional data about the test example, model outputs, or just about anything else that's relevant, that you can use to help find and analyze examples later.
-
#metrics ⇒ Braintrust::Models::InsertProjectLogsEventReplace::Metrics
Metrics are numerical measurements tracking the execution of the code that produced the project logs event.
-
#output ⇒ Object
The output of your application, including post-processing (an arbitrary, JSON serializable object), that allows you to determine whether the result is correct or not.
-
#scores ⇒ Hash
A dictionary of numeric values (between 0 and 1) to log.
-
#span_attributes ⇒ Braintrust::Models::InsertProjectLogsEventReplace::SpanAttributes
Human-identifying attributes of the span, such as name, type, etc.
-
#tags ⇒ Array<String>
A list of tags to log.
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
#_is_merge ⇒ Object
The _is_merge
field controls how the row is merged with any existing row with the same id in the DB. By default (or when set to false
), the existing row is completely replaced by the new row. When set to true
, the new row is deep-merged into the existing row
16 |
# File 'lib/braintrust/models/insert_project_logs_event_replace.rb', line 16 optional :_is_merge, Braintrust::BooleanModel |
#_object_delete ⇒ Boolean
Pass _object_delete=true
to mark the project logs event deleted. Deleted events will not show up in subsequent fetches for this project logs
21 |
# File 'lib/braintrust/models/insert_project_logs_event_replace.rb', line 21 optional :_object_delete, Braintrust::BooleanModel |
#_parent_id ⇒ Object
Use the _parent_id
field to create this row as a subspan of an existing row. It cannot be specified alongside _is_merge=true
. Tracking hierarchical relationships are important for tracing (see the guide for full details).
28 |
# File 'lib/braintrust/models/insert_project_logs_event_replace.rb', line 28 optional :_parent_id, String |
#context ⇒ Braintrust::Models::InsertProjectLogsEventReplace::Context
Context is additional information about the code that produced the project logs event. It is essentially the textual counterpart to metrics
. Use the caller_*
attributes to track the location in code which produced the project logs event
33 |
# File 'lib/braintrust/models/insert_project_logs_event_replace.rb', line 33 optional :context, -> { Braintrust::Models::InsertProjectLogsEventReplace::Context } |
#created ⇒ DateTime
The timestamp the project logs event was created
38 |
# File 'lib/braintrust/models/insert_project_logs_event_replace.rb', line 38 optional :created, DateTime |
#error ⇒ Object
The error that occurred, if any.
43 |
# File 'lib/braintrust/models/insert_project_logs_event_replace.rb', line 43 optional :error, Braintrust::Unknown |
#expected ⇒ Object
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. Braintrust currently does not compare output
to expected
for you, since there are so many different ways to do that correctly. Instead, these values are just used to help you navigate while digging into analyses. However, we may later use these values to re-score outputs or fine-tune your models.
48 |
# File 'lib/braintrust/models/insert_project_logs_event_replace.rb', line 48 optional :expected, Braintrust::Unknown |
#id ⇒ String
A unique identifier for the project logs event. If you don't provide one, BrainTrust will generate one for you
9 |
# File 'lib/braintrust/models/insert_project_logs_event_replace.rb', line 9 optional :id, String |
#input ⇒ Object
The arguments that uniquely define a user input (an arbitrary, JSON serializable object).
53 |
# File 'lib/braintrust/models/insert_project_logs_event_replace.rb', line 53 optional :input, Braintrust::Unknown |
#metadata ⇒ Hash
A dictionary with additional data about the test example, model outputs, or just about anything else that's relevant, that you can use to help find and analyze examples later. For example, you could log the prompt
, example's id
, or anything else that would be useful to slice/dice later. The values in metadata
can be any JSON-serializable type, but its keys must be strings
58 |
# File 'lib/braintrust/models/insert_project_logs_event_replace.rb', line 58 optional :metadata, Hash |
#metrics ⇒ Braintrust::Models::InsertProjectLogsEventReplace::Metrics
Metrics are numerical measurements tracking the execution of the code that produced the project logs event. Use "start" and "end" to track the time span over which the project logs event was produced
63 |
# File 'lib/braintrust/models/insert_project_logs_event_replace.rb', line 63 optional :metrics, -> { Braintrust::Models::InsertProjectLogsEventReplace::Metrics } |
#output ⇒ Object
The output of your application, including post-processing (an arbitrary, JSON serializable object), that allows you to determine whether the result is correct or not. For example, in an app that generates SQL queries, the output
should be the result of the SQL query generated by the model, not the query itself, because there may be multiple valid queries that answer a single question.
68 |
# File 'lib/braintrust/models/insert_project_logs_event_replace.rb', line 68 optional :output, Braintrust::Unknown |
#scores ⇒ Hash
A dictionary of numeric values (between 0 and 1) to log. The scores should give you a variety of signals that help you determine how accurate the outputs are compared to what you expect and diagnose failures. For example, a summarization app might have one score that tells you how accurate the summary is, and another that measures the word similarity between the generated and grouth truth summary. The word similarity score could help you determine whether the summarization was covering similar concepts or not. You can use these scores to help you sort, filter, and compare logs.
73 |
# File 'lib/braintrust/models/insert_project_logs_event_replace.rb', line 73 optional :scores, Hash |
#span_attributes ⇒ Braintrust::Models::InsertProjectLogsEventReplace::SpanAttributes
Human-identifying attributes of the span, such as name, type, etc.
78 |
# File 'lib/braintrust/models/insert_project_logs_event_replace.rb', line 78 optional :span_attributes, -> { Braintrust::Models::InsertProjectLogsEventReplace::SpanAttributes } |
#tags ⇒ Array<String>
A list of tags to log
83 |
# File 'lib/braintrust/models/insert_project_logs_event_replace.rb', line 83 optional :tags, Braintrust::ArrayOf.new(String) |