Skip to main content

Module embed

Module embed 

Source
Expand description

Pluggable text embedding for inline embed()-at-insert/at-query (HelixDB-inspired, ADR-252 P3).

HelixQL’s built-in Embed(text) vectorizes inline so a caller never has to marshal a separate embedding service into the query. This module gives TypedGraph the same ergonomic via a pluggable Embedder trait: attach a model once, then create nodes from text or search by text and the binding’s dimension is validated against the schema’s vector type.

A real model is supplied by implementing Embedder. A dependency-free HashEmbedder is included for offline/dev/test use — it is not semantic (lexical token overlap only) and must be opted into explicitly; consistent with ADR-194, the typed graph never silently falls back to it.

Structs§

HashEmbedder
Deterministic, dependency-free feature-hashing embedder.

Traits§

Embedder
A text → vector embedding model.