From 4dfc870dd1e87d1e10f63509e528faa80eeae7e9 Mon Sep 17 00:00:00 2001 From: alvis Date: Mon, 6 Jul 2026 05:56:58 +0000 Subject: [PATCH] [Adolf] Swap cognee embedding to bge-m3 (1024-d, multilingual) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace nomic-embed-text (768-d) with bge-m3 (1024-d, GPU-served via the same :11436 ollama) as cognee's embedding model, for better multilingual recall. cognee's Qdrant collections held only P4 smoke-test fixtures (no real conversation data — adolf-llm's cogneeSearch/cogneeAdd are still stubs), so the stale 768-d collections were dropped and left for cognee to recreate at 1024-d on next write, rather than migrated. Verified: bge-m3 returns 1024-dim vectors via ollama /api/embed; after recreating the cognee container, a remember/recall round trip (including Russian text) produced correctly dimensioned (1024-d) Qdrant collections and recalled the exact fact stored, then the test dataset was deleted. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01LeqyaxJF2nbRXJtae2kNB2 --- openai/cognee/cognee.env | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/openai/cognee/cognee.env b/openai/cognee/cognee.env index 44ebcf3..6b16b64 100644 --- a/openai/cognee/cognee.env +++ b/openai/cognee/cognee.env @@ -70,15 +70,23 @@ LLM_INSTRUCTOR_MODE=json_mode # own default is "http://localhost:11434/api/embed"), unlike the # openai_compatible engine which appends its own path onto a base URL. Ollama's # native /api/embed (batch endpoint, not the singular /api/embeddings) returns -# {"embeddings": [[...]]}; the engine handles that key. Tested directly against -# :11436 with model nomic-embed-text -> 768-dim vector, confirmed working -# before wiring this in. +# {"embeddings": [[...]]}; the engine handles that key. +# +# Swapped nomic-embed-text (768-d) -> bge-m3 (1024-d, multilingual, GPU-served) +# 2026-07-06 [Adolf kb#60]. bge-m3 pulled into the same :11436 ollama; tested +# directly against :11436 -> 1024-dim vector, confirmed working. cognee's +# Qdrant collections were all still 768-d (a handful of P4 smoke-test points +# only — "pineapple-7742"/"p4 deployment smoke test" fixtures, no real +# conversation data; adolf-llm's cogneeSearch/cogneeAdd are still stubs and +# have never actually written to cognee), so the stale 768-d collections were +# dropped rather than migrated — cognee recreates them at the new dimension +# on first write. ############################################################################### EMBEDDING_PROVIDER=ollama -EMBEDDING_MODEL=nomic-embed-text +EMBEDDING_MODEL=bge-m3 EMBEDDING_ENDPOINT=http://host.docker.internal:11436/api/embed -EMBEDDING_DIMENSIONS=768 -HUGGINGFACE_TOKENIZER=nomic-ai/nomic-embed-text-v1.5 +EMBEDDING_DIMENSIONS=1024 +HUGGINGFACE_TOKENIZER=BAAI/bge-m3 ############################################################################### # Graph store — SPIKE-FINDINGS gate 4: Kuzu embedded, not Neo4j.