Semantic Search with Strata
Strata is Storyblok’s semantic search layer. It indexes your stories as vector embeddings so that people, applications, AI assistants, and agents can find content by meaning rather than by exact keywords.
How semantic search works
Section titled “How semantic search works”Search comes in three common forms, and Strata adds the third:
- Keyword search matches exact strings. A search for “winter gear” only finds content that contains those words.
- Fuzzy search tolerates typos and close variants, so a small misspelling of “winter gear” still matches. The variation has to be predictable.
- Semantic search compares meaning. Strata turns content into vector embeddings that capture meaning, so “winter gear” can surface jackets, coats, scarves, and ski equipment even when those exact words never appear.
To do this, Strata indexes your space’s stories as vector embeddings and refreshes that index on a daily schedule. When someone searches, Strata measures the distance between the meaning of the query and the meaning of your content, then returns the closest matches. It doesn’t interpret the question or write an answer. It retrieves relevant content for your application to use.
What you can build with Strata
Section titled “What you can build with Strata”Strata returns relevant content for your application to act on. The following are some common patterns, not an exhaustive list:
- Site search: add meaning-based search to your website or app, so results rank by relevance instead of exact keyword matches.
- Retrieval for AI: fetch the most relevant stories for a question and pass them to an AI assistant or LLM as context. Its answers then draw on your own content instead of stale or guessed information.
- Contextual recommendations: from a product or article page, query for related content based on what the reader is currently viewing.
- Content discovery: find similar, duplicate, or related stories across a large space, for example before creating something new.
What Strata isn’t
Section titled “What Strata isn’t”Strata is retrieval only. In its current form it doesn’t:
- generate or rewrite content,
- tag or categorize content automatically,
- personalize or adapt delivery in real time,
- fact-check or answer questions on its own.
Pair Strata with your application or an AI model to act on the content it returns.
Accessing Strata
Section titled “Accessing Strata”A space admin enables Strata in the space’s Settings, where they can also run a test search. Applications then query the index through two APIs:
- Content Delivery API (public or preview access token): the recommended API for most search. It’s high-volume and public, so it can power search directly. Refer to the Content Delivery API search endpoint.
- Management API (personal access or OAuth access token): for private queries scoped to the user’s permissions. It’s lower-volume and rate-limited. Refer to the Management API search endpoint.
Search always respects the token’s permissions. A scoped public access token searches only the stories in its scope, and a personal access or OAuth access token searches as the user it belongs to.
Further resources
Section titled “Further resources”Was this page helpful?
This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window).Terms of Service (opens in a new window) apply.
Get in touch with the Storyblok community