Text vs vectors
Decide between the text ingest/search path (needs an embedder) and the raw-vector path (bring your own precomputed float32 vectors) in Telys.
Every Telys collection stores vectors. The only choice is who computes them: Telys, from your text through an attached embedder, or you, precomputed from any model. Both paths write to the same collection and query it the same way.
add_texts / upsert_texts / search_text
add / upsert / search
Collection has an embedder attached
Collection needs no embedder
You pass str documents and queries
You pass float32 arrays of shape (n, dim)
Telys embeds with the collection's embedder
You embed with OpenAI, BGE, or any model you like
Simplest for on-device lexical/semantic memory
Best when you already run a model elsewhere
The text path
Attach an embedder at creation and pass strings. You never touch a vector.
from telys import Telys
from telys.embedding import AlgentaMultigramEmbedder
telys = Telys("telys-store")
embedder = AlgentaMultigramEmbedder()
notes = telys.create_collection(
"notes",
dim=embedder.profile.dimension,
partition_by="scope",
embedder=embedder,
)
notes.add_texts(
["kubernetes rollout stuck on readiness probe"],
ids=["note-1"],
metadata=[{"scope": "ops"}],
)
notes.save()The vector path (bring your own)
If you already produce embeddings, create the collection with dim set to your model's output width and add raw vectors. No embedder is required.
Two rules keep the vector path safe:
Shape. Vectors must be
(n, dim)withn == len(ids) == len(metadata).Dtype. Vectors must be
float32; call.astype("float32")if your model returnsfloat64.
Expected result
Both paths return the external ids they wrote and grow the collection identically:
At query time the two collections are indistinguishable: notes answers search_text, docs answers search, both over the same kind of vectors.
Next steps
Search by text — query the text path with a string.
Search by vector — query the vector path with a precomputed query.
CallableEmbedder (bring your own) — wrap any model as an embedder to use
search_textwith BYO vectors.
Last updated
Was this helpful?