fix(agent): make the recall reranker opt-in and use the word embedder in tests
The reference-set comparison showed the cross-encoder adds nothing to mem0's ranking and costs about 130 ms per search.
This commit is contained in:
@@ -28,14 +28,20 @@ if (!process.env.WAGGLE_PHASE5_CANARY_PCT) {
|
||||
process.env.WAGGLE_PHASE5_CANARY_PCT = '0';
|
||||
}
|
||||
|
||||
// W4.5: the cross-encoder reranker is default-ON in production (kill switch
|
||||
// WAGGLE_RERANKER=0). Tests pin it OFF — the real ONNX model is a ~22MB
|
||||
// download + per-call CPU inference, both unwanted in unit suites. Tests
|
||||
// that exercise reranking inject a mock Reranker via OrchestratorConfig.
|
||||
// The cross-encoder reranker is opt-in (WAGGLE_RERANKER=1). Tests pin it
|
||||
// OFF explicitly; tests that exercise reranking inject a mock Reranker via
|
||||
// OrchestratorConfig.
|
||||
if (!process.env.WAGGLE_RERANKER) {
|
||||
process.env.WAGGLE_RERANKER = '0';
|
||||
}
|
||||
|
||||
// Memory (ADR-0007): the sidecar embeds memories with an in-process model
|
||||
// that is a ~90MB download. Tests use the deterministic word embedder, which
|
||||
// needs no model and no network.
|
||||
if (!process.env.WAGGLE_MEMORY_EMBEDDER) {
|
||||
process.env.WAGGLE_MEMORY_EMBEDDER = 'words';
|
||||
}
|
||||
|
||||
// W4 (2026-06-11): the PromptAssembler is default-ON in production (kill
|
||||
// switch WAGGLE_PROMPT_ASSEMBLER=0) after the live chat smoke. Tests pin it
|
||||
// OFF so the broad chat-route suite keeps exercising the stable legacy
|
||||
|
||||
Reference in New Issue
Block a user