Switch to a multilingual embedding model for non-English queries #65

Merged
plank merged 1 commit from feature/multilingual-embedding into main 2026-11-09 22:13:25 +01:00
Owner

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

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
plank added 1 commit 2026-11-09 22:04:25 +01:00
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
plank merged commit c0e4013364 into main 2026-11-09 22:13:25 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: PWC/agentic-rag-policy-assistant#65
No description provided.