Stage Category: APPLYTransformation:
single_contextmode: N documents → 1 combined context documentformatted_listmode: N documents → N formatted documents
When to Use
When NOT to Use
Parameters
Truncation Strategies
Output Modes
Configuration Examples
Template Placeholders
Citation Styles
Output Schema
single_context Mode
formatted_list Mode
Each document gets:Citing Timestamped Source Clips (Video / Audio)
The defaultcitation object is {index, title, document_id} — enough to name the
source, but it does not inline the timestamp or a link back to the source clip.
For investigative / RAG use cases where every claim must resolve to a timestamped,
clickable source (e.g. “watch this at 03:12”), surface the anchor yourself — the
data is already on every document, so this needs no new stage or endpoint:
- Video/audio segment documents carry
start_time_s/end_time_s(see Universal Extractor → Output). - Every document carries
_internal.lineage.root_object_idpointing back to the original source object (see Lineage Traversal).
document_template so the timestamp travels into
the LLM context (and into any answer the LLM cites):
Timestamped clip citations
document_id returned in the
citations[] array (or the root_object_id above) into a playable URL with
GET /v1/documents/{id}?expand=root_object — see
Lineage Traversal. Do this in the app layer after
execute; the timestamp and source object are preserved end-to-end in the document,
they are simply not inlined into the structured citations[] array by default.
Citations attach at the document level.
rag_prepare (and summarize’s
source_document_ids) cite the set of source documents behind the context, not
individual sentences — per-claim/per-sentence attribution is up to the downstream
LLM prompt. Ask the LLM to emit the [n] marker inline with each claim so the
numbered citation resolves back to the timestamped clip above.Performance
Common Pipeline Patterns
Search + Prepare + External LLM
rag_context can then be passed to an external LLM call.
vs Summarize Stage
Related
- Summarize - LLM-powered summarization
- JSON Transform - Custom document formatting
- LLM Enrich - Extract structured data with LLM

