Switch to a multilingual embedding model for non-English queries #65
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feature/multilingual-embedding"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The embedding model (all-MiniLM-L6-v2) is English-only, so retrieval
quality degraded for questions asked in other languages even though the
chat model itself answers fine in them. Switched the default
EMBEDDING_MODEL to
sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 (50+
languages, same 384-dim output).
The vectorstore's on-disk cache was keyed only on the policy corpus
fingerprint, so changing the embedding model would have silently reused
a stale index built from the old model's (differently-meaning) vectors
instead of rebuilding. Folded EMBEDDING_MODEL into that fingerprint so a
model change now triggers a rebuild automatically.
Refs #16