Vector DB & RAG
Semantic search and Retrieval-Augmented Generation for your generated apps. Backed by pgvector with automatic chunking, embedding, and similarity search.
Vector DB requires the Pro plan or higher.
What It Does
The Vector DB SDK lets your app ingest text or files, automatically embed and chunk them, and search across that content by semantic meaning. Available at window.genmb.vectordb.
- Backed by pgvector on the shared Cloud SQL instance, no external vector store to wire up.
- Auto-chunking with sensible overlap so long documents are split into searchable segments.
- Embedding via Gemini text-embedding-004 (768 dimensions), no model selection or API keys.
- File ingestion supports PDF, TXT, MD, and CSV.
- Metadata filters scope results before similarity ranking.
Quickstart
The SDK is exposed on window.genmb.vectordb when the capability is enabled in your app.
Ingest content
ingest(text, metadata) with raw text, or ingestFile(file, metadata) with a File from an upload input. Returns { documentId, chunks }.Search by meaning
search(query, { limit, filter }). Each result includes content, a similarity score, the original metadata, and the parent documentId.List or delete documents
list() for an admin view or delete(documentId) to remove a document and its chunks.RAG Pattern
Combine Vector DB with the AI Chatbot SDK to build knowledge-base Q&A. Search retrieves the most relevant chunks; the chatbot uses them as grounded context.
Show citations
PassdocumentId back to the UI alongside the answer so users can click through to the source. This pattern is what turns a generic chatbot into a trusted knowledge assistant.Quotas & Rate Limits
Quotas are per app and refresh hourly for the rate-limited operations.
| Limit | Pro | Business |
|---|---|---|
| Max documents | 10,000 | 100,000 |
| Max storage | 1 GB | 10 GB |
| Searches per hour | 1,000 | 10,000 |
| Ingestions per hour | 100 | 1,000 |
When to Use It
Vector DB is the right tool when search by meaning matters more than exact keyword match.
- Knowledge bases - internal docs, FAQs, support runbooks, product handbooks.
- Customer support agents that need to ground answers in your own content.
- Document Q&A apps - let users ask questions across uploaded PDFs.
- Recommendation features - find related articles, products, or items by description similarity.
FAQs
How is the Vector DB different from the Database & Schema feature?▾
What embedding model is used?▾
Do I need to chunk content myself?▾
Can I filter searches by metadata?▾
What happens when I exceed the document quota?▾
Ready to build?
Create your first app for free, no credit card required.