Class: Braintrust::Models::LogFetchResponse::Event
- Defined in:
- lib/braintrust/models/log_fetch_response.rb
Defined Under Namespace
Classes: Context, Metrics, SpanAttributes
Instance Attribute Summary collapse
-
#_xact_id ⇒ String
The transaction id of an event is unique to the network operation that processed the event insertion.
-
#context ⇒ Braintrust::Models::LogFetchResponse::Event::Context
Context is additional information about the code that produced the project logs event.
-
#created ⇒ String
The timestamp the project logs event was created.
-
#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).
-
#log_id ⇒ Symbol
A literal 'g' which identifies the log as a project log.
-
#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::LogFetchResponse::Event::Metrics
Metrics are numerical measurements tracking the execution of the code that produced the project logs event.
-
#org_id ⇒ String
Unique id for the organization that the project belongs under.
-
#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.
-
#project_id ⇒ String
Unique identifier for the project.
-
#root_span_id ⇒ String
The
span_id
of the root of the trace this project logs event belongs to. -
#scores ⇒ Hash
A dictionary of numeric values (between 0 and 1) to log.
-
#span_attributes ⇒ Braintrust::Models::LogFetchResponse::Event::SpanAttributes
Human-identifying attributes of the span, such as name, type, etc.
-
#span_id ⇒ String
A unique identifier used to link different project logs events together as part of a full trace.
-
#span_parents ⇒ Array<String>
An array of the parent
span_ids
of this project logs event. -
#tags ⇒ Array<String>
A list of tags to log.
Method Summary
Methods inherited from BaseModel
Instance Attribute Details
#_xact_id ⇒ String
The transaction id of an event is unique to the network operation that processed the event insertion. Transaction ids are monotonically increasing over time and can be used to retrieve a versioned snapshot of the project logs (see the version
parameter)
27 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 27 required :_xact_id, String |
#context ⇒ Braintrust::Models::LogFetchResponse::Event::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
62 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 62 optional :context, -> { Braintrust::Models::LogFetchResponse::Event::Context } |
#created ⇒ String
The timestamp the project logs event was created
32 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 32 required :created, String |
#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.
67 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 67 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
22 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 22 required :id, String |
#input ⇒ Object
The arguments that uniquely define a user input (an arbitrary, JSON serializable object).
72 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 72 optional :input, Braintrust::Unknown |
#log_id ⇒ Symbol
A literal 'g' which identifies the log as a project log
37 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 37 required :log_id, Braintrust::Enum.new(:'g') |
#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
77 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 77 optional :metadata, Hash |
#metrics ⇒ Braintrust::Models::LogFetchResponse::Event::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
82 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 82 optional :metrics, -> { Braintrust::Models::LogFetchResponse::Event::Metrics } |
#org_id ⇒ String
Unique id for the organization that the project belongs under
42 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 42 required :org_id, String |
#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.
87 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 87 optional :output, Braintrust::Unknown |
#project_id ⇒ String
Unique identifier for the project
47 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 47 required :project_id, String |
#root_span_id ⇒ String
The span_id
of the root of the trace this project logs event belongs to
52 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 52 required :root_span_id, String |
#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.
92 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 92 optional :scores, Hash |
#span_attributes ⇒ Braintrust::Models::LogFetchResponse::Event::SpanAttributes
Human-identifying attributes of the span, such as name, type, etc.
97 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 97 optional :span_attributes, -> { Braintrust::Models::LogFetchResponse::Event::SpanAttributes } |
#span_id ⇒ String
A unique identifier used to link different project logs events together as part of a full trace. See the tracing guide for full details on tracing
57 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 57 required :span_id, String |
#span_parents ⇒ Array<String>
An array of the parent span_ids
of this project logs event. This should be empty for the root span of a trace, and should most often contain just one parent element for subspans
102 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 102 optional :span_parents, Braintrust::ArrayOf.new(String) |
#tags ⇒ Array<String>
A list of tags to log
107 |
# File 'lib/braintrust/models/log_fetch_response.rb', line 107 optional :tags, Braintrust::ArrayOf.new(String) |