EverOS icon indicating copy to clipboard operation
EverOS copied to clipboard

Undocumented 1024-dim embedding floor fails asynchronously while /health still reports embed: true

Open jscales4000 opened this issue 2 months ago • 2 comments

Summary

[embedding] hard-requires vectors of at least 1024 dimensions, but this floor is undocumented and unvalidated at startup. A 768-dim provider is accepted everywhere it is checked, and only fails later, asynchronously, in the ingest cascade — while /health continues to report embed: true and ok.

The practical result is an index that silently contains nothing and a health endpoint that says it is fine.

Reproduce

Configure any 768-dim embedding provider — Ollama's nomic-embed-text is the obvious one, since it is the most common local default:

[embedding]
provider = "openai"          # Ollama's OpenAI-compatible endpoint
base_url = "http://127.0.0.1:11434/v1"
model    = "nomic-embed-text"

Then:

  1. everos server start
  2. GET /api/v2/health → {"embed": true, "status": "ok"} ← passes
  3. POST /api/v2/memory/add → 202 Accepted ← accepted
  4. The background cascade fails:
ValidationError: List should have at least 1024 items after validation, not 768
  1. Rows are persisted with retryable=FALSE.
  2. POST /api/v2/memory/search → zero results, HTTP 200.
  3. GET /api/v2/health → still ok, still embed: true.

Why this is worth fixing

Every surface a user would check to answer "is my embedding provider working?" returns a positive answer:

  • the health endpoint reports embed: true
  • the write returns 202
  • search returns 200, just with an empty result list

Nothing distinguishes "the corpus contains no match" from "nothing was ever indexed." Silent, non-retryable data loss with a green health check is a bad failure mode for a memory system specifically, because the symptom — recall that comes back empty — is indistinguishable from normal operation on a cold store.

Suggested fix

Any one of these would be enough; the first is the cheapest:

  1. Validate at startup. Embed a probe string once when the provider is configured, compare len(vector) against _DEFAULT_DIM, and refuse to start (or log a hard error) on mismatch. This turns a silent async failure into a loud synchronous one.
  2. Reflect it in /health. embed: true should mean "an embedding of the correct dimension was produced", not "a provider is configured".
  3. Document the floor. At minimum, state the ≥1024 requirement next to the [embedding] config block, and name a couple of local models that satisfy it — this is not discoverable from the config reference today.

Workaround

Use a provider whose native dimension is ≥1024, or truncate client-side. For Ollama, qwen3-embedding:8b (4096-dim) works; nomic-embed-text (768) does not.

Environment

  • everos 1.2.3, Python 3.12, Linux
  • LanceDB backend, local Ollama for both LLM and embeddings
  • Found while ingesting a 45-file Markdown corpus; 0 of the first batch became searchable before the dimension mismatch was identified

jscales4000 avatar Sep 04 '26 15:09 jscales4000

I will take this issue. Please assign it to me.

The problem is that the system accepts embeddings with fewer than 1024 dimensions without validation, leading to silent failures later. I will first check the startup logic in the embedding configuration to add a validation step. This will ensure that the dimension check occurs early. I will also update the /health endpoint to reflect the correct status based on this validation. Finally, I will add documentation to clarify the 1024-dimension requirement.

modelpath-dev avatar Sep 09 '26 07:09 modelpath-dev

Fixed in #510.

A model that returns fewer dimensions than the index column is no longer accepted. Startup embeds once, compares the model's real output width against the configured one, and refuses to start when it is too narrow — naming both numbers and the two steps that fix it. The 768-dimension provider this issue reported is no longer allowed to accept writes it could never store.

/health capabilities.embed now reports the result of that startup probe rather than whether the three provider fields happen to be set, so it no longer answers true against an endpoint that is not responding.

Two further pieces came with it:

  • [embedding] dim (env EVEROS_EMBEDDING__DIM) sets the vector column width, so a 768-dimension model is a supported configuration rather than something to work around. The width is documented in docs/configuration.md, along with what happens when it disagrees with the model.
  • The index records which embedding model built it, and startup refuses to open one built by a different model. Swapping models used to make the stored vectors silently incomparable: searches returned nothing useful, with no error on any surface.

Upgrading needs no action when the configuration already matches the model. When the model is narrower than dim, the first start stops and names the two steps — set dim to what the model returns, then run everos cascade rebuild. Markdown is untouched throughout, and the index is rebuilt from it.

It will go out in the next release.

Thanks for the precise report — the /health half of it is what made the failure mode worth fixing at startup rather than in the cascade.

gloryfromca avatar Oct 20 '26 03:10 gloryfromca