Archon icon indicating copy to clipboard operation
Archon copied to clipboard

🐛 [Bug]: Need to Support Different Embedding Dimensions

Open seepage87 opened this issue 4 months ago • 3 comments

Archon Version

v0.1.0

Bug Severity

🟠 High - Blocks important features

Bug Description

Using Gemini instead of OpenAI breaks knowledge graph crawling because embedding dimensions are mismatched. gemini uses 768-D dimensions, whereas openAI uses 1536-D embeddings.

complete_setup.sql hard-codes 1536-D embeddings. This should be parameterized to match RAG model

Steps to Reproduce

Use chat model Gemini-Flash-2.5 and embedding model text-embedding-004. Knowledge graph ingestion will work, but Archon will fail to read the knowledge graph and will not be able to find chunks in Claude Code.

Expected Behavior

Claude Code should have been able to retrieve from the knowledge graph as expected, including identifying chunks of knowledge ingested.

Actual Behavior

Claude Code could contact the knowledge base, but ingested knowledge was shown to have zero chunks because of the embedding mismatch.

Error Details (if any)


Affected Component

🔍 Knowledge Base / RAG

Browser & OS

safari

Additional Context

No response

Service Status (check all that are working)

  • [x] 🖥️ Frontend UI (http://localhost:3737)
  • [x] ⚙️ Main Server (http://localhost:8181)
  • [x] 🔗 MCP Service (localhost:8051)
  • [x] 🤖 Agents Service (http://localhost:8052)
  • [x] 💾 Supabase Database (connected)

seepage87 avatar Aug 18 '25 23:08 seepage87

We are working on making it possible to have dynamic dimensions for different sources to support different embedding models! @tazmon95 is doing amazing work around this

coleam00 avatar Aug 19 '25 12:08 coleam00

You can change the dimensions in the .env please try that as well @seepage87

Wirasm avatar Aug 20 '25 19:08 Wirasm

The .env has the environment variable EMBEDDING_DIMENSIONS but the migration/complete_setup.sql creates tables expecting the 1536 size. Using the migration/RESET_DB.sql and manually editing the migration/complete_setup.sql references to 1536 to the same value i set in EMBEDDING_DIMENSIONS has shown success on knowledge crawl (tested with/without "Use Contextual Embeddings", no further testing)

theProf avatar Sep 04 '25 15:09 theProf