Choosing an embedder
Compare the on-device lexical embedders against the bring-your-own dense path and pick the right vector space for your collection.
An embedder turns text into a fixed-width float32 vector and defines the vector space a collection lives in. Each collection binds to one embedder through its EmbeddingProfile, written to disk on save(). Picking an embedder is three decisions:
Where embedding runs — on-device in the native kernel, or in your own code.
Similarity type — lexical n-gram hashing, or dense semantic vectors.
Dimension of every vector the collection stores.
You cannot mix spaces in one collection. Changing the embedder changes the space, which means a new collection. See EmbeddingProfile & space compatibility.
Embedders are not top-level exports. Import them from telys.embedding:
from telys.embedding import (
AlgentaBigramEmbedder,
AlgentaMultigramEmbedder,
CallableEmbedder,
EmbeddingProfile,
)The three practical choices
Three embedders ship and work in a normal install (given the native kernel):
AlgentaBigramEmbedder— compact on-device lexical matching.AlgentaMultigramEmbedder— richer on-device lexical matching; the default for the MCP server andtelys mem.CallableEmbedder— wraps your own function for any dense model (OpenAI, BGE, sentence-transformers) or lexical scheme.
A fourth, AlgentaPooledEmbedder, is listed in telys.embedding.__all__ but resolves lazily from the signed runtime and is unavailable in a runtime-free install. See AlgentaPooledEmbedder.
Decision matrix
AlgentaBigramEmbedder
Yes — native kernel
None
Native kernel (hint: 64-d)
Compact lexical matching over short strings: keys, tags, symbol names; lowest memory.
AlgentaMultigramEmbedder
Yes — native kernel
None
Native kernel (hint: 384-d)
Richer lexical recall over prose; the MCP / telys mem default.
CallableEmbedder
Depends on your fn
Depends on your fn
profile.dimension you declare
Bring-your-own dense models and services (OpenAI, BGE, sentence-transformers).
AlgentaPooledEmbedder
Runtime-only
Runtime-defined
Runtime-defined
Only when the signed runtime is installed; not part of the SDK surface.
Lexical or dense?
The Algenta embedders are lexical: they hash character n-grams into a bounded vector, so similarity rewards shared substrings and exact terms. They run entirely on-device, need no model download, and are strong for code, identifiers, tags, and keyword recall. They cannot match meaning worded differently — "car" and "automobile" do not match unless the characters overlap.
CallableEmbedder is the dense path: hand Telys a function that returns semantic vectors from a model you control. That gives paraphrase-aware recall at the cost of a model dependency (and possibly a network call). For the full tradeoff, see Lexical vs dense embeddings.
Constructing each
Reopening a collection later
save() records the embedder's profile with the collection. open_collection(name) re-attaches the embedder automatically for the Algenta providers. A CallableEmbedder function cannot be serialized, so register the provider first and pass the embedder back:
Reattach succeeds only when the profile matches — same provider, model_id, dimension, and pooling. That is the check compatible_with performs. See Dimensions & space IDs.
Next steps
Last updated
Was this helpful?