Embeddings

Set up embedding providers in the console, test their models over the embeddings API, and choose the index's embedding model.

Every chunk of code and every work item text is embedded before it is stored, and every query is embedded to search. Synaxis calls any OpenAI-compatible embeddings API: a hosted one, or a local server such as Ollama or Text Embeddings Inference.

The index's embedding model

One index is built with one embedding model. Available (Embedding) shows it under The index's embedding model (Model, Dimensions, Endpoint), and Models shows the running values under Embeddings.

Setting Means
Endpoint (Embedding:BaseUrl) The API's address, such as https://api.openai.com/v1 or http://ollama:11434/v1
Model (Embedding:Model) The model name, such as text-embedding-3-small or nomic-embed-text
Dimensions (Embedding:Dimensions) The vector size to request, or empty for the model's own
Key (Embedding:ApiKeyRef) The name of the stored secret holding the API key, or empty for a local endpoint without one

To add an embedding provider

  1. Open Available (Embedding) and select Add embedding provider.
  2. Keep From Provider Settings and choose the Provider, or select Custom provider and give it a Name. From Provider Settings offers only the providers whose Provider Settings name an Embeddings URL: OpenAI, Google, Mistral, Together, Fireworks, DeepInfra, Alibaba, Cloudflare Workers AI and the local servers (Ollama, LM Studio, vLLM, llama.cpp). To offer another, give it an Embeddings URL on Provider Settings.
  3. Check the Embeddings URL (OpenAI's shape, ending in /embeddings, or Ollama's own, ending in /api/embed) and enter the API key. A local server needs none. The key is kept in the server's secret store and never shown again.
  4. Select Fetch models. The server reads the provider's list of models (the Models list, or the one next to the Embeddings URL) and adds only its embedding models. Or type a model id and select Add model.
  5. Select Test beside a model, before or after saving. The server embeds a short text through the provider's embeddings API, never its chat API, with the Embeddings URL and key as they stand, and says how many dimensions the vector has; an empty Dimensions is filled in. A key typed here is used for the test and stored only by Save.
  6. Fill in what you know of each model (Dimensions, Max input tokens, USD per 1M input tokens, Requests at once) and select Save.

To choose the index's model

  1. On Available (Embedding), select Use for the index beside a model whose test passed, and confirm. The configuration now names the model, its endpoint, its dimensions and its record's key.
  2. Restart the server (docker compose up -d, or helm upgrade): the embedding model is read at start. Until then the page says which model the configuration names and which one the server runs.
  3. Open Generations and start a new generation (Index generations).

Choosing a model never re-points an index: an index can only be searched with the model it was built with, so searches keep using the serving index and its model until the new generation serves.

Note: The index calls the OpenAI embeddings API. A record whose Embeddings URL ends in /api/embed can be tested but not used for the index; for Ollama, add its http://ollama:11434/v1/embeddings address.

To use local embeddings with Docker Compose

  1. Keep the defaults in .env: SYNAXIS_EMBEDDING_URL=http://ollama:11434/v1 and SYNAXIS_EMBEDDING_MODEL=nomic-embed-text.
  2. Start with the local-models profile: docker compose --profile local-models up -d. A one-time container pulls the model into Ollama's models volume.
  3. For an NVIDIA GPU, uncomment the device reservation under ollama in compose.yaml.

Note: The Compose defaults point at the local-models profile's Ollama. Without that profile, set a hosted endpoint, or indexing cannot embed anything.

In the deployment files

The same settings can be given without the console:

  • Compose, in .env: SYNAXIS_EMBEDDING_URL, SYNAXIS_EMBEDDING_MODEL and SYNAXIS_EMBEDDING_KEY_SECRET.
  • Helm, in your values: embedding.baseUrl, embedding.model, embedding.dimensions and embedding.apiKeyRef.
  • The models.embedding section of the configuration file (baseUrl, model, dimensions, apiKey: { secretRef: openai }), with the key stored first: synaxis secret set openai --from-file openai-key.txt.

Restart the server afterwards. A configuration revision's embedding model wins over the deployment files.

What it costs

Indexing's embeddings are metered against the embedding budget and queries' against the query budget, with tokens estimated at four characters each. See Budgets.

See also