Reference of the table schemas and Laminar-specific syntax
DEFAULT
- most of the spans fall into this categoryLLM
- a manual or automatically traced LLM callEVALUATION
- a span that represents an evaluation run. One datapoint is evaluated by one evaluation run.EXECUTOR
- a span that represents an executor run. One datapoint is evaluated by one executor run.EVALUATOR
- a span that represents an evaluator run. One datapoint may have multiple evaluator spans.TOOL
- a span that represents a tool call."spans"."path"
inner
function will be ["outer", "inner"]
.
However, Laminar SQL provides syntactic sugar for you to query, filter, order, or group by span path
items joined by a dot. That is, you can write WHERE path = 'outer.inner'
instead of WHERE attributes->'path' = '["outer", "inner"]'::jsonb
.
spans
table.
For example, if you have an evaluator named "Task alignment"
that scores between 0 and 1,
you can write WHERE evaluator_scores."Task alignment" > 0.5
to filter spans by their evaluator scores.
For example,
evaluation_results
table.
For example, if you have an evaluator named “My Score” that scores between 0 and 1,
you can write WHERE evaluation_scores."My Score" > 0.5
to filter evaluation results by their evaluator scores.
For example,
evaluation_name
and evaluation_id
in traces
and spans
tablesevaluation_name
and evaluation_id
are virtual columns that are automatically populated by the SQL Editor.
This sugar joins in the following way:
evaluation_name
or evaluation_id
in the traces
or spans
tables.
tag
in the spans
tablemy_tag
and my_other_tag
, you can write WHERE tag = 'my_tag'
to filter spans by their tags.
This is triggered when you select tag
in the spans
table.
evaluation_results
tableevaluation_results
table:
cost
total_token_count
start_time
end_time
duration
(Learn more)end_time - start_time
in seconds.
Whenever you query duration
in the evaluation_results
table, the traces
table,
or the spans
table, the SQL Editor will automatically
replace that with EXTRACT(EPOCH FROM end_time - start_time)
.
tags
in the spans
tabletags
are actually stored separately from the spans
table,
in the SQL Editor they are joined to the spans by span_id
and aggregated
as a text[]
array.
For examples on how to use tags in your queries, see the examples page.
start_time
than created_at
.
We will add more indexes as we see emerging usage patterns from the SQL Editor.