Separate chat models from embedding models
Status: Ready
Article ID: 023
Truth label: Current
Audience: System operator
Reader outcome: Change a chat provider or model without silently mixing incompatible vectors in a persistent knowledge collection.
Related articles: 009, 021, 024
Target week: 09
Last verified: 2026-09-13
Technical reviewer: Codex source audit
Editorial reviewer: Codex editorial audit
Separate generation from retrieval
A chat model turns a prompt into a response. An embedding model turns text into vectors used for semantic comparison. They can come from different providers and have different lifecycles.
Brain reflects that separation in configuration. Chat uses the selected LLM provider and model for each request. Embeddings use their own provider and model settings for persistent Chroma collections. Changing the chat model does not require re-embedding stored knowledge.
Protect the vector space
Vectors from different embedding models do not share a guaranteed coordinate space. Even two models from the same provider can produce different vector dimensions or meanings. Mixing them in one collection makes similarity scores unreliable.
Brain records the embedding identity for each persistent collection and rejects a mismatch. That refusal is a data-integrity control. It prevents a new process configuration from writing incompatible vectors beside old ones. Do not bypass it to make startup appear successful.
Choose the safe response to a mismatch
When Brain reports an embedding identity mismatch, choose one of three paths:
- restore the provider and model that created the collection
- rebuild the collection completely under the new embedding identity
- use a new data root so the new collection is physically separate
The first preserves the existing index. The second changes retrieval behavior and needs a measured comparison. The third is useful for a controlled trial. Copying only part of the old collection into the new vector space is not a valid migration.
Change chat providers independently
Chat provider selection can change per request when the provider is currently usable. A local model may keep prompt content on owned infrastructure. A cloud model may offer different quality, latency, context, or price. None of those choices requires changing the embedding configuration.
After a chat-provider change, compare factual quality, latency, usage, and retrieval citations on a fixed prompt set. If retrieval changes even though the embedding identity did not, investigate prompt handling, tool behavior, or model interpretation before rebuilding the index.
Record both identities
For an incident or evaluation, capture:
- chat provider and model from the generation report
- embedding provider and model from the collection configuration
- collection name and data root
- index or rebuild date
- the fixed query and relevant record ids
This makes “the model changed” specific enough to diagnose. It also prevents a chat-model experiment from being blamed for an unrelated index migration.
Current limits
Matching embedding identity prevents known vector-space mixing. It does not prove retrieval quality, freshness, scope, or relevance. Chroma is operated by one controlled Brain process, not as a distributed multi-process database. Back up or preserve the old data root before an intentional rebuild.
Next lesson
Continue with Choose Ollama, OpenAI, Anthropic, or Google for chat.
Derivative map
- Weekly package: WEEK-09
- Long video: VIDEO-W09-LONG
- Shorts: SHORT-W09-PROBLEM, SHORT-W09-MECHANISM, SHORT-W09-WARNING
- Email: EMAIL-W09
- LinkedIn: LI-W09-A, LI-W09-B
- X: X-W09-A, X-W09-B
- Visual: VISUAL-W09
Review record
- Chat routing, embedding routing, and collection identity behavior checked against current source.
- Rebuild, backup, and retrieval-quality limits reviewed.
- Migration choices avoid destructive or partial-index instructions.
- Internal links and repository voice reviewed.
Review completed: 2026-08-27
Re-audited against the running product: 2026-09-13