Convex RAG Component
A Convex component for semantic search over text chunks and embeddings, used to give an AI agent retrieval-augmented context, with per-user namespaces, custom filtering and importance weighting.
This component adds semantic search to a Convex application for retrieval-augmented generation with an AI agent. Content is added as text chunks with embeddings, computed automatically with any AI SDK model that supports embeddings unless the caller supplies its own chunks and vectors, and each call to add content creates a new entry that can later be replaced.
Content can be organized into namespaces so that search can be scoped per user, filtered on custom indexed fields, and weighted by an importance value between zero and one; a chunk-context option returns surrounding chunks for better context, and namespaces or whole sets of content can be migrated without disrupting search. It installs as an npm package alongside the AI SDK as a peer dependency, and is registered in a Convex application's configuration file before use.