Loading...
Loading...
The RAG Starter Kit supports three embedding providers. The default is Google Gemini (free tier, 768D), which works out of the box with the database schema.
| Provider | Model | Dimensions | Cost | Setup |
|---|---|---|---|---|
| Google Gemini | text-embedding-004 | 768 | Free (1,500/day) | API key only |
| OpenAI | text-embedding-3-small | 1536 | $0.02/1M tokens | API key + migration |
| Ollama | nomic-embed-text | 768 | Free (local) | Local install |
No configuration needed beyond the API key. Produces 768D vectors matching the database schema.
GOOGLE_GENERATIVE_AI_API_KEY=your-gemini-api-key
EMBEDDING_PROVIDER=googleGet a free API key at aistudio.google.com. Free tier includes 1,500 requests/day.
OpenAI embeddings produce 1536-dimensional vectors. You must run a database migration to change the vector column from 768 to 1536 dimensions before switching.
EMBEDDING_PROVIDER=openai
EMBEDDING_MODEL=text-embedding-3-small
EMBEDDING_DIMENSIONS=1536
OPENAI_API_KEY=sk-...Run embeddings locally with Ollama. The nomic-embed-text model produces 768D vectors compatible with the default schema.
EMBEDDING_PROVIDER=ollama
EMBEDDING_MODEL=nomic-embed-text
OLLAMA_BASE_URL=http://localhost:11434ollama pull nomic-embed-textWhen you switch embedding providers, the system automatically detects the change and logs a warning. You should:
.env variablesGET /api/setup/test