{context_id}_itemsVectorSearch query that searches the context’s embedded chunks and returns them joined with parent-item metadata. It is the same retrieval engine agents use — available to you directly over GraphQL.
The generated signature, for a context with ID product_docs:
queryRewriter, rewritten before searching. limit defaults to 10 (or the context’s maxRetrievalResults) and is capped at 250.
Search methods
Despite its name,
chunk_cosine_distance holds a similarity — computed as 1 - cosine distance — so 1.0 means identical direction and higher is better.Cutoffs
cosineDistance— minimum similarity, on the same 0–1 scale aschunk_cosine_distance.0.35is a reasonable starting floor for prose.tsvector— minimum full-text rank.hybrid— minimum hybrid score on a 0–100 scale, matching the returnedchunk_hybrid_score. ForhybridSearchyou can additionally bound the components with the other two cutoffs.
Context expansion
expand fetches up to before/after neighboring chunks (by chunk_index, within the same item) around every hit, deduplicates, and returns the final list ordered by item and chunk index. Expanded neighbors carry score 0 — treat scores as ranking signals for matched chunks only. Defaults come from the context’s configuration, otherwise no expansion.
Item filters and access control
itemFilters uses the context’s regular filter type and applies to the parent items, not the chunks — for example, restrict a search to non-archived guides with [{ category: { eq: GUIDE } }, { archived: { ne: true } }]. Row-level RBAC is enforced on the parent items too: you only ever get chunks from items you are allowed to read.
Worked examples
Semantic search with a cutoff and expansion:Entity filters and insights
Contexts with the entity layer enabled can constrain and enrich searches with the entity graph:type/name pairs to be resolved for you. mode is "any" (default — a chunk must mention at least one of the entities) or "all" (must mention every one):
entityInsights.
Result shape
context object identifies what was searched — name, id, and the embedder model. (The generated type is named VectoSearchResultContext; the missing “r” is in the schema itself.) The returned query is the preprocessed form actually used for matching. Score fields are populated per method, as in the table above.
To fetch a single chunk later — for example to render a citation — use the companion query:
Next steps
Knowledge pipeline
How items become chunks and embeddings in the first place.
Entities
Configure the entity layer that powers filters and insights.