What it means: Your query embeddings (768D) don't match stored embeddings (384D)
Instant fix:
# Open .env file and change:
EMBEDDING_PROVIDER=huggingface
HUGGINGFACE_EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
# Restart your applicationWhat it means: Your query embeddings (384D) don't match stored embeddings (768D)
Instant fix:
# Open .env file and change:
EMBEDDING_PROVIDER=ollama
OLLAMA_EMBEDDING_MODEL=nomic-embed-text:v1.5
# Make sure Ollama is running: ollama serve
# Pull the model: ollama pull nomic-embed-text:v1.5
# Restart your applicationWhat it means: Your query embeddings (1536D) don't match stored embeddings (384D)
Instant fix:
# Open .env file and change:
EMBEDDING_PROVIDER=huggingface
HUGGINGFACE_EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
# Restart your applicationLook at your error message and find the dimension numbers:
shapes (X,) and (Y,)→ X = query dimensions, Y = stored dimensions
| Stored Dimensions (Y) | Set in .env |
|---|---|
| 384 | EMBEDDING_PROVIDER=huggingfaceHUGGINGFACE_EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2 |
| 768 | EMBEDDING_PROVIDER=ollamaOLLAMA_EMBEDDING_MODEL=nomic-embed-text:v1.5 |
| 1024 | EMBEDDING_PROVIDER=ollamaOLLAMA_EMBEDDING_MODEL=mxbai-embed-large |
| 1536 | EMBEDDING_PROVIDER=openaiOPENAI_EMBEDDING_MODEL=text-embedding-3-small |
# Edit your .env file
nano .env # or use your preferred editor
# Find the EMBEDDING_PROVIDER lines and update them
# Save the file# Kill current process (Ctrl+C)
# Restart
uvicorn app:app --reload# Test with a simple query
curl -X POST "http://localhost:8080/chat" \
-H "Content-Type: application/json" \
-d '{"message": "chicken recipe"}'If you prefer to use a different embedding model permanently:
# 1. Choose your preferred model in .env
EMBEDDING_PROVIDER=ollama
OLLAMA_EMBEDDING_MODEL=nomic-embed-text:v1.5
# 2. Enable database refresh
DB_REFRESH_ON_START=true
# 3. Restart application (this will rebuild everything)
uvicorn app:app --reload
# 4. IMPORTANT: Disable refresh after startup
DB_REFRESH_ON_START=false# Switch to ChromaDB (will create fresh database)
VECTOR_STORE_PROVIDER=chromadb
# Restart application
uvicorn app:app --reloadAdd a comment to your .env file:
# Created 2025-08-27 with all-MiniLM-L6-v2 (384 dimensions)
EMBEDDING_PROVIDER=huggingface
HUGGINGFACE_EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2If working in a team, ensure everyone uses the same configuration:
# Share this in your team chat:
# "Use EMBEDDING_PROVIDER=huggingface with all-MiniLM-L6-v2"Still stuck? Check the full Embedding Compatibility Guide for detailed explanations.