Examples of SQL queries you can write with the Laminar SQL Editor
the-evaluation-name
.
It is useful to filter by span type in this query to filter either the executor (forward pass) or the evaluator spans.
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.inner
function will be ["outer", "inner"]
.
Span path is stored as a JSONB array inside the attributes
column’s values.
However, Laminar SQL provides syntactic sugar for you to query, filter, order, or group by span path
items joined by a dot.
text[]
array. Tags are stored outside of the spans
table,
but Laminar SQL Editor joins them to the spans
table by span_id
and aggregates them
as an array.
SQL array syntax is not exactly trivial, so here are a few examples: