Docent Query Language (DQL) is a read-only SQL subset for ad-hoc queries over a Docent collection. Queries can only run over a single collection by design (if you need multi-collection support, please reach out to us!) The Docent Agent is the most ergonomic way to write DQL. To write DQL by hand, see the DQL schema reference for the column schema of each table and the execute_dql reference for Python SDK methods, operators, and common patterns. For filtering agent runs (Documentation Index
Fetch the complete documentation index at: https://docs.transluce.org/llms.txt
Use this file to discover all available pages before exploring further.
select_agent_run_ids), see Query Agent Runs.
When to use DQL
DQL is great for structured queries like getting the average reward by model, or identifying tasks where one model regressed compared to another. Ask the agent:A few illustrative queries
A simple SELECT
Aggregating with CTEs
Per-environment success rates, normalized via a CTE.Joining runs with judge results
Pulls the most recent rubric result per run, then joins to surface the model responsible for each score.What DQL does and doesn’t do
- Read-only. Only
SELECT-style queries are permitted. - Single statement. Batches and multiple statements are rejected.
- Explicit projection. Wildcard
*is disallowed; list columns explicitly so downstream tooling stays predictable. - Single-collection scope. A query runs against one collection at a time.
- 10,000 row cap. Every query is capped by the server. Use
LIMIT/OFFSETfor pagination, or export offline for larger sets. - JSON performance. Metadata is stored as JSON; heavy traversal across large collections is slower than filtering on indexed scalar columns.
- Type awareness. JSON paths expose a generic
jsontype. Cast explicitly (e.g.,CAST(metadata_json->>'duration_ms' AS BIGINT)) when precision matters.

