New Tool Radar

AI Concepts

How to Choose the Embedding Model in AnythingLLM

Open Settings, AI Providers, Embedder in AnythingLLM, pick the built-in embedder or an Ollama embedding model such as nomic-embed-text, and re-embed your workspace documents afterwards.

Schematic diagram with three steps: open Settings then AI Providers then Embedder, pick a built-in or Ollama embedding model, then save and re-embed your workspace documents.

AnythingLLM’s chat model and its embedding model are two separate settings. The chat model writes the answers; the embedding model turns your documents into vectors so the app can find the right passages to answer from. Vectors from two different embedding models cannot be compared with each other, so AnythingLLM indexes every workspace document through one system-wide embedding model — and changing it later clears every workspace’s embeddings. This guide covers choosing that embedder. Picking the chat provider (LLM) is a different setting, covered in other guides.

Pick the embedder before your first upload

Choose before your first upload, because changing the embedder later clears every workspace’s embeddings and you then re-embed everything. A document-QA guide checked against AnythingLLM v1.19.0 lists the built-in choices:

Built-in model Size Languages Max chunk
all-MiniLM-L6-v2 (default) 23 MB English 1,000 characters
nomic-embed-text-v1 139 MB English 16,000 characters
multilingual-e5-small 487 MB 100+ 1,000 characters

The built-in embedder runs on your instance’s CPU, with no key and no bill. If your documents are not in English, use multilingual-e5-small or an API embedder; the default model is English-only. The same guide also lists the OpenAI route: Settings, AI Providers, Embedder, OpenAI, paste a key, and pick text-embedding-3-small under Model Preference — but then your document text goes to OpenAI to be embedded.

Switch to an Ollama embedding model

An Ollama embedding model such as nomic-embed-text can take the place of the built-in default, so documents are indexed by a model on your own Ollama server. Pull it first, then change the setting:

ollama pull nomic-embed-text

Then click the wrench icon beneath the workspace list, click AI Providers under INSTANCE SETTINGS, and click Embedder under AI Providers. Click the AnythingLLM Embedder box under Embedding Provider to open the provider list, type Ollama in Search all embedding providers, and select Ollama. Type the Ollama base URL into the field — http://localhost:11434 when Ollama runs on the same computer — and select nomic-embed-text:latest from Ollama Embedding Model. Only a model built for embeddings, pulled in addition to the chat model, suits document indexing: Ollama lists chat and embedding models together, and the list preselects the first entry, so check you picked the embedder. The model turns each text chunk into a 768-number vector and reads up to 2,048 tokens at a time, so change Max embedding chunk length from 8192 to 2048. Then click Save changes and click Confirm in the WARNING — This action is irreversible dialog.

Re-embed your documents and check the answers

Saving a different embedding provider or model deletes the vectors of every embedded document in every workspace and removes those documents from their workspaces. The uploaded files stay in the document library, but document questions return no sources until each workspace’s documents are embedded again. So open each workspace, select its documents, use Move to Workspace, and click Save and Embed. Then ask a question only the re-embedded document can answer — for a practice check, use a three-line file that says the ferry leaves at 9am — and confirm the reply cites that document under Sources.

Check What you should see If you do not see it
Provider Settings, AI Providers, Embedder shows Ollama with nomic-embed-text:latest You are still on the built-in embedder — change the provider and save again
Chunk length Max embedding chunk length reads 2048 A 2,048-character chunk stays well inside the model’s 2,048-token input — set it before saving
Re-embedded Each workspace’s documents show as embedded again The change removed them — move them back and Save and Embed
Answer The reply cites the re-embedded document under Sources A reply of “There is no relevant information in this workspace” means the search found no passage — check the document is embedded

Expected result. We checked a step-by-step AnythingLLM embedding guide for the settings path, the Ollama steps, the chunk-length change, and the irreversible warning, and a document-QA guide for the built-in model table and the choose-before-upload advice. We did not run AnythingLLM.

Limits

The embedder setting is system-wide: it reaches every workspace at once, not just the one you are looking at, so the change fits best before documents are added or when the affected workspaces can be rebuilt. The Docker steps in the guide use http://ollama:11434 because AnythingLLM contacts Ollama from inside its own container — on a desktop install with Ollama on the same computer, use http://localhost:11434 instead. The practice file above is fictional. We did not run AnythingLLM, so no embedding here is a recorded result.

Sources

See all