Templates — API Reference
Package: dodil.data.pipeline.v1 · Service: PipelineService
Templates are catalog entries from Scriptum — the recipes new pipelines spawn from. See Core Concepts → Template for the type signature.
| RPC | HTTP |
|---|---|
ListTemplates | GET /admin/templates |
GetTemplate | GET /admin/templates/:template_id |
gRPC setup —
grpcurl, endpoints, reflection, and field-name casing — is covered once in Conventions → Using gRPC.
The catalog
There is no registry, manifest or seed table — the catalog is the template tree itself. Scriptum’s loader walks templates/ at boot: the directory name becomes the template’s category and the filename stem becomes its id. The count is whatever the loader finds, so treat the tables below as the shape of the catalog rather than a frozen inventory, and call ListTemplates for the live set.
The six category values are therefore the six directories: actions, core, ecommerce, embedding, financials, vision.
analysisis not a category. It exists only as a label value (labels.category), which is a different field from the top-levelcategorythe API returns and?category=filters on. Filtering?category=analysismatches nothing.
Core (9)
Domain-agnostic processing — classification, extraction, summarization. Warehouse-compatible: bind these to a Tables destination to land structured rows.
| Template | What it does | Modalities |
|---|---|---|
classification | Classify documents by type, topic, language, and sensitivity | text, pdf |
document_triage | Rapid intake triage — classify + extract entities | text, pdf, docx, html, email |
entity_pii_extraction | Extract structured entities and detect PII | text, pdf |
image_understanding | Image analysis — ML object detection + OCR + LLM vision reasoning | image |
invoice_parsing | Parse invoices into structured fields | pdf, image |
ocr_extraction | Extract text from scanned / image-based documents | pdf, image |
sentiment_intent_analysis | Sentiment, intent, topics, urgency, toxicity | text, pdf |
summarization | Multi-level document summarization + keyword extraction | text, pdf, docx, html |
translation | Translate text to a target language (Seed-X PPO 7B) | text |
Embedding (10)
The embedding category holds five *_index templates and their five *_search counterparts.
Index pipelines (5)
Ingestion-side embedding pipelines. Each indexes a modality into a Vector collection. Bind these as vector pipelines.
| Template | What it does | Modalities |
|---|---|---|
text_embedding_index | Resolves a source object → chunks → embeds → indexes. The canonical “ingest documents for RAG” pipeline. | text, pdf, docx, html, audio, video |
code_embedding_index | Code embedding with AST-aware chunking (tree-sitter) at function / class boundaries | code (rust, python, javascript, typescript, go, …) |
visual_embedding_index | Visual embedding (image, video frames, audio spectrograms, PDF page renders) | image, video, audio, pdf |
face_embedding_index | Per-bucket face indexing — SCRFD detect + embed | image |
object_embedding_index | Object indexing with open-vocabulary detection | image |
Search pipelines (5)
Query-side counterparts to the _index templates. You rarely create these by hand: CreateVectorPipeline derives the search-side template from the index one by the *_index → *_search convention and spawns that pipeline for you, which is why one collection shows up as two rows in ListPipelines.
| Template | What it does |
|---|---|
text_embedding_search | Per-chunk text query → multi-vector embed → fan-out to N collections → merged ranked results |
code_embedding_search | Per-chunk code query → multi-vector embed → fan-out → merged results |
visual_embedding_search | Visual query (text or image) → embed once → search N collections → merge by (collection, artifact_id) |
face_embedding_search | Face query → detect → crop → embed once → search N collections in parallel |
object_embedding_search | Object query → embed → search N collections in parallel |
What’s in the vector catalog
The five index templates back the auto-embed-on-ingest vector collections — you create a collection with the _index variant via CreateVectorPipeline, and K3 derives the _search counterpart automatically. Their resolved shape:
| Template (index) | embed_model | Dims | type label | @accepts_extension |
|---|---|---|---|---|
text_embedding_index | jina-embeddings-v4 | 768 | text | txt, md, html, htm, pdf, docx |
code_embedding_index | jina-embeddings-v4 | 1024 | code | rs, py, js, ts, tsx, go, java, c, cpp, h, hpp, rb, swift, kt |
visual_embedding_index | jina-embeddings-v4 | 1024 | visual | jpg, jpeg, png, gif, webp, mp4, mov, webm, mp3, wav, flac, pdf |
object_embedding_index | jina-embeddings-v4 (detector mm-gdino-large) | 1024 | object | jpg, jpeg, png, webp |
face_embedding_index | arcface-r100 (detector scrfd-10g) | 512 | face | jpg, jpeg, png, webp |
The five search counterparts carry the same model and dimensions but declare no accepted extensions, because nothing ingests through them. object_embedding_index is the only one with a required template input: labels, a list of 1–100 open-vocabulary class prompts for the detector.
The suffix convention is not validated.
CreateVectorPipelinederives<stem>_searchby string surgery and never checks the catalog for it. A custom template that does not end in_index, or whose_searchcounterpart does not exist, yields a collection that indexes but cannot be searched — surfaced only as a server-side warning and later as awarnings[]entry on the search route.
Vision (4)
Image / video / audio analysis. All warehouse-compatible.
| Template | What it does | Modalities |
|---|---|---|
audio_transcription | Transcribe with Whisper; optional speaker diarization + audio classification | audio, video |
code_intelligence | Source-code analysis — symbols, dependencies, architecture, docs | text |
object_detection | Detect objects in images / video keyframes (YOLOv8m) | image, video |
video_surveillance | Full video surveillance — object tracking + activity classification | video |
Ecommerce (2)
Domain templates for commerce / marketplace use cases. Both warehouse-compatible.
| Template | What it does | Modalities |
|---|---|---|
product_catalog_enrichment | Product catalog enrichment from images and descriptions | image, text |
review_analysis | Customer review analysis — sentiment, toxicity, keyword extraction | text, pdf |
Financials (2)
| Template | What it does | Modalities |
|---|---|---|
financial_statement_extraction | Extract line items and totals from financial statements | pdf, text |
tabular_data_ingest | Ingest tabular files into structured rows | csv, xlsx |
Actions (7)
Query-time templates behind the curated AI actions surface, rather than ingest-side pipelines: chunks_synthesize_answer, collection_topic_map, object_qa, objects_compare, objects_synthesis, plan_and_run, table_qa.
Unaudited templates do not ship. Scriptum’s loader hard-skips the
unaudited/directory at boot and logsskipping unaudited templates directory, so those templates are not in the image, not returned byListTemplates, and cannot be passed as atemplate_id— a pipeline referencing one fails to resolve. Names you may see quoted in older docs or tests —lease_extraction,contract_extraction,resume_parsing,content_moderation,claims_intake— are all unaudited and unavailable in production.
ListTemplates
Request
dodil data
dodil data template list
dodil data template list --category embedding
dodil data template list --search ocr
dodil data template list --label warehouse_compatible=true--label is repeatable. The CLI exposes no facet filter — use HTTP or gRPC for ?facet=.
Response
HTTP
{
"templates": [
{
"id": "text_embedding_index",
"name": "Text Embedding Index",
"description": "Resolves a source object → chunks → embeds → indexes.",
"tags": ["embedding", "rag"],
"toolsRequired": ["k3_vector_upsert"],
"labels": { "category": "embedding", "modality": "text", "pillar": "vectors" },
"category": "embedding",
"modalities": ["text"],
"acceptedExtensions": ["pdf", "docx", "txt", "html"],
"acceptedContentTypes": ["application/pdf"],
"outputKind": ""
}
]
}The id field is id, not templateId — the proto field is string id = 1.
outputKind is populated only for object-facet templates ("markdown" | "text" | "json" | "file"); it drives the writer’s extension picking and content-type stamp, and is empty when the template did not declare it. contract is omitted from ListTemplates responses in the sample above for brevity — fetch it with GetTemplate.
GetTemplate
Returns one template with its full typed ScriptContract (input fields, output schema, accepted modalities), proxied verbatim from Scriptum. K3 reads the contract server-side to validate caller-supplied template_inputs, and to resolve the schema-shaping facts — embed_model, dimensions, distance_metric, sparse_mode — when spawning a vector pipeline. Those facts come from the contract and cannot be overridden by the caller.
Request
dodil data
dodil data template get text_embedding_indexResponse
A Template — see Core Concepts → Template.
Using templates in pipeline creation
A template_id from this catalog is what the three facet creators take — they create the destination and the pipeline together in one call:
| Goal | Template to use | Create with |
|---|---|---|
| RAG ingest for PDFs / docs | text_embedding_index | CreateVectorPipeline |
| Code search across a repo | code_embedding_index | CreateVectorPipeline |
| Multimodal asset library | visual_embedding_index | CreateVectorPipeline |
| Extract entities + PII to a table | entity_pii_extraction | CreateTablePipeline |
| Triage incoming docs | document_triage | CreateTablePipeline |
| Transcribe meeting audio | audio_transcription | CreateTablePipeline |
| Object detection on uploaded images | object_detection | CreateTablePipeline |
| Sentiment dashboard | sentiment_intent_analysis | CreateTablePipeline |
| Summaries written back to S3 | summarization | CreateObjectPipeline |
For a table pipeline the template must declare @accepts_extension — the derived ingest rule’s globs come from it, and a table pipeline with none can never fire. Check acceptedExtensions on the template before you bind it.
CreatePipeline also takes a template id, via either scriptum_template or its historical alias spawn_from_template — both variants now mean the same thing, “this is the template id to dispatch”. Neither one creates a fresh Scriptum script: the worker builds the per-call env at dispatch time, so there is nothing to bake in at create. Use CreatePipeline to add a second pipeline onto a destination that already exists, or to make a free pipeline; use a facet creator to make the destination itself.
A pipeline created from a template does not ingest anything yet. Binding an ingest rule is a separate, mandatory step — see Rules.
See also
- Pipelines — spawn pipelines from templates
- Core Concepts → Template — type signature
- Core Concepts → ScriptContract — the typed I/O contract on
GetTemplate - CLI Guide → template —
dodil data template list / get - Vector — destination for embedding pipelines
- Tables — destination for
warehouse_compatibletemplates grpcurlreference — full flag set + reflection-disabled fallbacks