- A multimodal extractor layer tree: the whole video, its scenes, and fixed short intervals.
- Embeddings only on the layer you search.
feature_searchon the scene layer.traverse_edgewithfollow: "lineage"andinclude_evidence: true, which returns the parent videos.
llm_enrich, sends each returned video to a model.
The layer tree
Each layer is its own collection. Thevideos collection reads the bucket and writes one document per video. The two child collections read videos and split each video again. Every child document records its parent in _internal.lineage.source_document_id. The stage walks that link back up.
time_split_interval takes fractions of a second, down to 0.1. A layer with run_multimodal_embedding: false still writes one document per segment, with start_time, end_time and lineage. Attribute filters read those documents, and feature search does not.
Index only the layers you search
An embedding costs processing time and storage on every segment it covers. In this tree, onlyscenes is searched, so only scenes embeds. videos and intervals set run_multimodal_embedding: false.
A feature search over a collection with no vector index fails with a 400 that names the collection. Search an embedded layer, and read the others with attribute_filter or through lineage.
The manifest
Apply it withPOST /v1/manifest/apply. Run it first with ?dry_run=true, which checks the whole plan and creates nothing.
input_schema is a flat dict keyed by field name. A JSON Schema object with properties is refused.
Search the scenes
feature_search runs on the retriever’s collections, here scenes alone. collection_identifiers takes a list of collection names or ids. A string, including an {{INPUT...}} template, is refused with a 422, because the collections a search reads are fixed when the retriever is created. To search a different set of layers, create one retriever per set.
Return the whole videos
traverse_edge with follow: "lineage" climbs from each scene to its document in videos. Fifty scene hits from 12 videos return 12 results. Each result is the stored videos document, scored by its best scene.
_evidence, one entry per scene that reached it, best first:
start_time and end_time give the moment inside the video, so a player can open at 312 s. The traverse edge page lists every _evidence field.
A scene that cannot reach videos is dropped and counted under stage_statistics.stages.whole_videos.metadata, with a reason per drop. The run also returns a warning that counts them. If a store read fails, the run fails with a 503 instead of returning fewer videos.
Optional: ask a model about each video
Addllm_enrich after traverse_edge to send each returned video to a model. Its video_field defaults to video_segment_url, which a whole document holds for the full video.
max_candidates documents, 10 unless you set it. A larger working set is refused before any model call, so cut it with final_top_k or a reduce stage first. A video stored outside this namespace’s storage is not sent. See Media per document.
What each step costs
Explain prices a retriever’s stages before you run it.
Related
- Traverse Edge: every lineage-mode parameter, metadata key and error
- Lineage Traversal: which lineage mechanism to use when
- Decomposition: how collections build on each other
- Multimodal extractor: every split parameter

