Semantic search over your own content, in your own Cloudflare account. Workers AI embeds, Vectorize indexes, D1 keeps the text.
@pithy-sh/vector
pithy add vectorSemantic search over your own content, in your own account. Ask a question in words and get back the passages that mean the same thing, rather than the ones that share a keyword.
What it sits on
Workers AI produces the embeddings, Vectorize holds the index, and D1 keeps the text so a result can be rendered without a second store.
The honest bit
Vectorize makes filterable metadata a provisioning-time decision wearing the costume of a query-time one, and gives you no error when you get it wrong — the filter simply returns nothing.
This package makes the decision explicit in your schema and checks it at boot, which is the whole reason it exists rather than a Vectorize call in your handler.
If you build it yourself
Embedding text is one call. Making the results filterable is where people lose a week.
Vectorize decides which fields are filterable when the index is created, and a filter on anything else returns nothing — with no error to tell you why.
How you side-by-side a document decides what the search can find. Too small loses context, too large loses precision.
The index holds the embedding; something has to hold the passage, and the two must not drift.
A new model means every vector is stale, and a migration you cannot do in place.
Semantic search alone misses exact matches, so most real search is two queries and a merge.
pithy add vectorIn the dashboard
Index size, what is filterable, and whether your schema still matches what was provisioned.
The dashboard is the admin interface for your own application: whatever this capability writes, your team can look up, check and act on from a browser. Reading is free, forever, with no time limit. Connect the project when you deploy.
Everything else
Each one composes the same way. Nothing you skip costs you anything.
One command installs the package, wires its bindings into every environment your project declares, and runs its migrations.