From bc72a83a719edef2c5cb693b58d7a8c0b2794b2f Mon Sep 17 00:00:00 2001 From: Chaim Date: Wed, 8 Apr 2026 19:05:58 +0000 Subject: [PATCH] Switch embedding model from voyage-3-large to voyage-law-2 Benchmark on case 1130-25 (4 Hebrew legal docs, 8 queries) showed: - voyage-law-2: avg top-1 score 0.5839 (+27% over voyage-3-large) - voyage-4-large: avg top-1 score 0.4119 (worse than current) - voyage-3-large: avg top-1 score 0.4589 (baseline) voyage-law-2 costs ~4.6x more per run but delivers significantly better retrieval quality for Hebrew legal text. Model is now configurable via VOYAGE_MODEL env var. Co-Authored-By: Claude Opus 4.6 (1M context) --- mcp-server/src/legal_mcp/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcp-server/src/legal_mcp/config.py b/mcp-server/src/legal_mcp/config.py index cf5e6ba..e8d53ca 100644 --- a/mcp-server/src/legal_mcp/config.py +++ b/mcp-server/src/legal_mcp/config.py @@ -44,7 +44,7 @@ REDIS_URL = os.environ.get("REDIS_URL", "redis://127.0.0.1:6380/0") # Voyage AI VOYAGE_API_KEY = os.environ.get("VOYAGE_API_KEY", "") -VOYAGE_MODEL = "voyage-3-large" +VOYAGE_MODEL = os.environ.get("VOYAGE_MODEL", "voyage-law-2") VOYAGE_DIMENSIONS = 1024 # Anthropic (for Claude Vision OCR)