ReferenceSPQL

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

FunctionSummary
spql.ai.breakdown_taskSplit one episode's camera video into its manipulation subtasks.
spql.ai.classifyPut a text in the category whose definition it fits best.
spql.ai.detectDetect labeled objects in an Image.
spql.ai.embedEmbed an Image with an admitted, revision-pinned model.
spql.ai.estimate_depthEstimate a typed DepthMap from an Image.
spql.ai.scoreScore how well an Image matches a text description.
spql.ai.similarityEstimate the probability that a text describes the same operation as a query.
spql.ai.warp_rmScore 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

NameRequiredTypeDescription
videoyeslist(struct { decode_index, packet })?One episode's video in presentation order.
sample_intervalnof64Seconds between sampled pictures; default 0.5.
modelnoutf8Admitted model selector.
tasknoutf8?Optional instruction for the episode.
on_errornoutf8How 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

NameRequiredTypeDescription
textyesutf8?Text to classify.
categoriesyeslist(struct { name, definition })?One to 255 distinct, non-blank category names and definitions.
modelnoutf8Admitted model selector.
on_errornoutf8How 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

NameRequiredTypeDescription
imageyesspql.Image?Input image.
modelnoutf8Admitted model selector.
devicenoutf8Execution-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

NameRequiredTypeDescription
imageyesspql.Image?Input image.
modelnoutf8Admitted model selector.
devicenoutf8Execution-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

NameRequiredTypeDescription
imageyesspql.Image?Input image.
modelnoutf8Admitted model selector.
devicenoutf8Execution-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

NameRequiredTypeDescription
imageyesspql.Image?Input image.
textyesutf8?Text description.
modelnoutf8Admitted model selector.
devicenoutf8Execution-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

NameRequiredTypeDescription
textyesutf8?Text to compare.
queryyesutf8?The operation to compare each text against.
modelnoutf8Admitted model selector.
on_errornoutf8How 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

NameRequiredTypeDescription
videoyeslist(struct { decode_index, packet })?One episode's video in presentation order.
modelnoutf8Admitted model selector.
devicenoutf8Execution-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.

Found a problem? Edit this page or report an issue.

On this page