@convex-dev/rag
FrameworkFreeA rag component for Convex.
Capabilities8 decomposed
semantic document embedding and vector storage
Medium confidenceAutomatically converts documents into dense vector embeddings using configurable embedding models (OpenAI, Anthropic, or local alternatives) and persists them in Convex's serverless database with metadata indexing. The system handles chunking strategies, batch processing, and incremental updates without requiring external vector databases like Pinecone or Weaviate.
Integrates embedding generation and vector storage directly into Convex's serverless database layer, eliminating the need for external vector DBs and enabling co-location of documents, embeddings, and application state in a single ACID-compliant database
Simpler than Pinecone/Weaviate for Convex users (no separate infrastructure), but slower than specialized vector DBs for large-scale similarity search due to lack of ANN indexing
semantic similarity search with configurable distance metrics
Medium confidenceExecutes vector similarity queries against stored embeddings using cosine distance, dot product, or Euclidean distance metrics. Queries are performed via Convex functions that compute similarity scores between a query embedding and all stored document embeddings, returning ranked results with configurable result limits and filtering predicates applied before or after similarity computation.
Performs similarity search within Convex's transactional database context, allowing atomic combination of vector search with document updates, metadata filtering, and application logic in a single function call without network round-trips to external services
More integrated with application state than Pinecone (no sync delays), but significantly slower than specialized vector DBs with HNSW/IVF indexing for large-scale searches
document chunking and recursive text splitting
Medium confidenceAutomatically splits long documents into semantically coherent chunks using configurable strategies (character-based, token-based, or recursive with overlap). The framework handles chunk size limits, overlap windows to preserve context, and metadata propagation so each chunk retains references to the original document and its position, enabling retrieval of full context during RAG synthesis.
Integrates chunking directly into the Convex RAG pipeline with automatic metadata propagation, so chunks are stored with full lineage information enabling direct retrieval of source documents without separate lookup queries
Simpler than LangChain's text splitters (no external dependencies), but less sophisticated than semantic chunking approaches that use embeddings to identify natural boundaries
embedding model provider abstraction and switching
Medium confidenceProvides a pluggable interface for embedding generation supporting OpenAI, Anthropic, and local/self-hosted models through a unified API. The framework abstracts provider-specific details (API endpoints, authentication, request/response formats) so developers can switch embedding models without changing application code, and handles retries, rate limiting, and error recovery transparently.
Abstracts embedding provider selection at the Convex function level, allowing different documents or batches to use different embedding models within the same application without architectural changes, and storing provider metadata with embeddings for future re-embedding decisions
More flexible than LangChain's embedding wrappers (supports Convex-native batching), but requires manual re-embedding when switching models unlike some managed RAG platforms that handle this automatically
rag context retrieval and synthesis integration
Medium confidenceProvides utilities to retrieve relevant documents from semantic search results and format them as context for LLM prompts, handling token budgeting, context window management, and integration with LLM APIs (OpenAI, Anthropic, etc.). The framework manages the retrieval-augmented generation loop: query → embed → search → retrieve → format context → call LLM → return answer.
Orchestrates the complete RAG loop within Convex functions, maintaining document/embedding/LLM state in a single transactional context and enabling atomic updates to conversation history and retrieved context without external workflow engines
More integrated than LangChain's RAG chains (no separate orchestration layer), but less flexible than frameworks like LlamaIndex for complex retrieval strategies or multi-stage reasoning
incremental document indexing and update handling
Medium confidenceAutomatically detects document changes and re-embeds only modified documents rather than rebuilding the entire index. The system tracks document versions, timestamps, and change hashes to identify which documents need re-embedding, and handles concurrent updates safely within Convex's transactional guarantees without requiring manual index invalidation or rebuild triggers.
Leverages Convex's transactional database to track document versions and automatically trigger re-embedding on updates, eliminating the need for external change data capture (CDC) systems or manual index invalidation
More seamless than Pinecone's upsert operations (automatic change detection), but less sophisticated than specialized search engines with incremental indexing strategies optimized for massive document collections
batch embedding generation with error handling and retries
Medium confidenceProcesses multiple documents in batches through the embedding API, handling rate limiting, transient failures, and partial failures gracefully. The framework groups documents into optimal batch sizes for the embedding provider, implements exponential backoff retry logic, and tracks which documents succeeded/failed so applications can retry failed embeddings without re-processing successful ones.
Integrates batch processing directly into Convex functions with automatic retry and error tracking, allowing failed embeddings to be persisted and retried without re-processing the entire batch or losing application state
Simpler than managing batch jobs with external task queues (no separate infrastructure), but less sophisticated than specialized ETL tools with checkpoint/resume capabilities for massive-scale embedding operations
metadata filtering and hybrid search (semantic + keyword)
Medium confidenceCombines semantic similarity search with metadata-based filtering and optional keyword matching to refine results. The framework applies metadata predicates (e.g., 'category=finance AND date>2024') before or after similarity computation, and can optionally incorporate keyword/BM25 scoring alongside vector similarity for hybrid ranking that balances semantic relevance with exact term matches.
Performs metadata filtering within Convex's query engine before similarity computation, reducing the number of documents to score and enabling efficient combination of structured filtering with semantic ranking in a single database query
More integrated than Elasticsearch hybrid search (no separate index), but less flexible than Pinecone's metadata filtering for complex boolean queries on high-cardinality fields
Capabilities are decomposed by AI analysis. Each maps to specific user intents and improves with match feedback.
Related Artifactssharing capabilities
Artifacts that share capabilities with @convex-dev/rag, ranked by overlap. Discovered automatically through the match graph.
DocMason – Agent Knowledge Base for local complex office files
I think everyone has already read Karpathy's Post about LLM Knowledge Bases. Actually for recent weeks I am already working on agent-native knowledge base for complex research (DocMason). And it is purely running in Codex/Claude Code. I call this paradigm is: The repo is the app. Codex is
quivr
Dump all your files and chat with it using your generative AI second brain using LLMs &...
Vectorize
** - [Vectorize](https://vectorize.io) MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.
DocAnalyzer
Easy to use and Intelligent chat with your...
@memberjunction/ai-vectordb
MemberJunction: AI Vector Database Module
RAG-chunk – A CLI to test RAG chunking strategies
Show HN: RAG-chunk – A CLI to test RAG chunking strategies
Best For
- ✓teams building Convex-native applications who want RAG without infrastructure overhead
- ✓developers prototyping semantic search features without committing to external vector stores
- ✓small-to-medium scale applications (thousands to low millions of documents)
- ✓applications with <100k documents where linear scan similarity is acceptable
- ✓teams wanting semantic search without learning specialized vector DB query languages
- ✓use cases combining metadata filtering with semantic relevance (e.g., 'find similar docs from this category')
- ✓applications processing documents longer than embedding model context windows (>8k tokens)
- ✓teams building citation-aware RAG systems that need to trace results back to source documents
Known Limitations
- ⚠Embedding generation latency depends on chosen model provider (OpenAI ~500ms-2s per document, local models variable)
- ⚠No built-in approximate nearest neighbor (ANN) indexing — similarity search is linear scan, O(n) complexity unsuitable for >100k documents without pagination/filtering
- ⚠Metadata filtering during search requires Convex query predicates, not specialized vector DB filtering syntax
- ⚠Batch embedding operations are not automatically parallelized across Convex functions
- ⚠Linear O(n) similarity computation scales poorly beyond 50-100k documents; no approximate nearest neighbor acceleration
- ⚠Distance metric selection is fixed per query; cannot dynamically switch between cosine/dot-product in single query
Requirements
Input / Output
UnfragileRank
UnfragileRank is computed from adoption signals, documentation quality, ecosystem connectivity, match graph feedback, and freshness. No artifact can pay for a higher rank.
Repository Details
Package Details
About
A rag component for Convex.
Categories
Alternatives to @convex-dev/rag
Search the Supabase docs for up-to-date guidance and troubleshoot errors quickly. Manage organizations, projects, databases, and Edge Functions, including migrations, SQL, logs, advisors, keys, and type generation, in one flow. Create and manage development branches to iterate safely, confirm costs
Compare →Are you the builder of @convex-dev/rag?
Claim this artifact to get a verified badge, access match analytics, see which intents users search for, and manage your listing.
Get the weekly brief
New tools, rising stars, and what's actually worth your time. No spam.
Data Sources
Looking for something else?
Search →