Model Inference
Run admitted, revision-pinned models over typed multimodal values.
The spql.ai namespace covers embedding, classification, detection and other model tasks. Asynchronous remote inference is planned; see Availability.
Scalar Functions
| Function | Summary |
|---|---|
spql.ai.breakdown_task | Split one episode's camera video into its manipulation subtasks. |
spql.ai.classify | Put a text in the category whose definition it fits best. |
spql.ai.detect | Detect labeled objects in an Image. |
spql.ai.embed | Embed an Image with an admitted, revision-pinned model. |
spql.ai.estimate_depth | Estimate a typed DepthMap from an Image. |
spql.ai.score | Score how well an Image matches a text description. |
spql.ai.similarity | Estimate the probability that a text describes the same operation as a query. |
spql.ai.warp_rm | Score signed relative task progress over one episode's top-camera video with WARP-RM. |
spql.ai.breakdown_task
Split one episode's camera video into its manipulation subtasks.
- Kind:
scalar function - Visibility:
experimental
spql.ai.breakdown_task(video, 1?, 'model'?, task?, 'on_error'?) -> list(struct { start_ns: u64, end_ns: u64, description: utf8 })?Returns consecutive subtasks with descriptions and half-open start/end timestamps on the video's presentation timeline. Null video returns null. A row the model cannot answer follows on_error.
Parameters
| Name | Required | Type | Description |
|---|---|---|---|
video | yes | list(struct { decode_index, packet })? | One episode's video in presentation order. |
sample_interval | no | f64 | Seconds between sampled pictures; default 0.5. |
model | no | utf8 | Admitted model selector. |
task | no | utf8? | Optional instruction for the episode. |
on_error | no | utf8 | How to handle an unanswered row: null (default) or fail. |
spql.ai.classify
Put a text in the category whose definition it fits best.
- Kind:
scalar function - Visibility:
experimental
spql.ai.classify(text, categories, 'model'?, 'on_error'?) -> struct { category: utf8, probability: f64 }?Returns the most probable category's name and probability. Probabilities across offered categories sum to one. Null text or categories return null; invalid categories or unanswered rows follow on_error.
Parameters
| Name | Required | Type | Description |
|---|---|---|---|
text | yes | utf8? | Text to classify. |
categories | yes | list(struct { name, definition })? | One to 255 distinct, non-blank category names and definitions. |
model | no | utf8 | Admitted model selector. |
on_error | no | utf8 | How to handle an unanswered row: null (default) or fail. |
spql.ai.detect
Detect labeled objects in an Image.
- Kind:
scalar function - Visibility:
experimental
spql.ai.detect(image, 'model'?, 'device'?) -> list(spql.LabeledBox)?Returns a nullable list of typed detections with labels, confidence scores and normalized image-coordinate bounding boxes.
Parameters
| Name | Required | Type | Description |
|---|---|---|---|
image | yes | spql.Image? | Input image. |
model | no | utf8 | Admitted model selector. |
device | no | utf8 | Execution-device preference; provider support is planned. |
spql.ai.embed
Embed an Image with an admitted, revision-pinned model.
- Kind:
scalar function - Visibility:
experimental
spql.ai.embed(image, 'model'?, 'device'?) -> vortex.tensor.vector?Returns a typed floating-point vector whose dimensions depend on the selected model. Recompute stored embeddings and rebuild their indexes when changing models.
Parameters
| Name | Required | Type | Description |
|---|---|---|---|
image | yes | spql.Image? | Input image. |
model | no | utf8 | Admitted model selector. |
device | no | utf8 | Execution-device preference; provider support is planned. |
spql.ai.estimate_depth
Estimate a typed DepthMap from an Image.
- Kind:
scalar function - Visibility:
experimental
spql.ai.estimate_depth(image, 'model'?, 'device'?) -> spql.DepthMap?Returns depth samples with explicit representation and calibration metadata. Model outputs without metric calibration or confidence leave those values null.
Parameters
| Name | Required | Type | Description |
|---|---|---|---|
image | yes | spql.Image? | Input image. |
model | no | utf8 | Admitted model selector. |
device | no | utf8 | Execution-device preference; provider support is planned. |
spql.ai.score
Score how well an Image matches a text description.
- Kind:
scalar function - Visibility:
experimental
spql.ai.score(image, text, 'model'?, 'device'?) -> f32?Higher scores indicate a stronger match within the selected model. Scores are not probabilities and are not normalized across rows or descriptions. Null image or text returns null.
Parameters
| Name | Required | Type | Description |
|---|---|---|---|
image | yes | spql.Image? | Input image. |
text | yes | utf8? | Text description. |
model | no | utf8 | Admitted model selector. |
device | no | utf8 | Execution-device preference; provider support is planned. |
spql.ai.similarity
Estimate the probability that a text describes the same operation as a query.
- Kind:
scalar function - Visibility:
experimental
spql.ai.similarity(text, query, 'model'?, 'on_error'?) -> f64?Returns a value in [0, 1] for the same manipulation operation on the same kind of object, even when worded differently. Null text or query returns null. A row the model cannot answer follows on_error.
Parameters
| Name | Required | Type | Description |
|---|---|---|---|
text | yes | utf8? | Text to compare. |
query | yes | utf8? | The operation to compare each text against. |
model | no | utf8 | Admitted model selector. |
on_error | no | utf8 | How to handle an unanswered row: null (default) or fail. |
spql.ai.warp_rm
Score signed relative task progress over one episode's top-camera video with WARP-RM.
- Kind:
scalar function - Visibility:
experimental
spql.ai.warp_rm(video, 'model'?, 'device'?) -> list(struct { frame_index: u32, timestamp_ns: u64, velocity: f32, progress: f32?, window_stride: u32, support: u32 })?Returns signed velocity and relative progress for each frame, with frame indices and presentation timestamps. Progress is normalized cumulative velocity, not a completion probability. Null video returns null.
Parameters
| Name | Required | Type | Description |
|---|---|---|---|
video | yes | list(struct { decode_index, packet })? | One episode's video in presentation order. |
model | no | utf8 | Admitted model selector. |
device | no | utf8 | Execution-device preference; provider support is planned. |
Availability
Asynchronous implementations of the spql.ai functions that call remote inference providers are planned. These functions are not yet available through Scans, Arrow batch evaluation, DataFusion or Enrichment expressions. Model defaults and support for execution-device options will be documented as providers become available.