Configuration/Embedding Models

All embedding model providers can be configured using the following configuration options.  Not all options are required for every model.

An embedding model is configured in the SETTINGS page like this, very similar to the Text Models and Image Models:

ai:
  embeddingModels:
  # Only the first model is currently used
  - name: <name>
    provider: <provider>
    modelName: <model name>
    baseUrl: <base url of api>
    requireAuth: <true or false>
    secretName: <secret name>



Options:


Enabling and Using Embeddings


Generating vector embeddings is disabled by default for privacy (and cost) reasons. It is recommended to only enable it if using a locally hosted model using Ollama or an openai-compatible api.

When turned on, every page in your space will end up being sent to the embeddings provider. We recommend using a locally-hosted model.

warning If you are not comfortable sending all of your notes to a 3rd party, do not use a 3rd party api for embeddings.


To enable generation and indexing of embeddings, add the following section to SETTINGS:

ai:
  indexEmbeddings: true
  indexEmbeddingsExcludePages:
  - my_passwords
  indexEmbeddingsExcludeStrings:
  - "**user**:"
  - "Daily Quote:"
  embeddingModels:
  # Only the first model is currently used
  - name: ollama-all-minilm
    modelName: all-minilm
    provider: ollama
    baseUrl: http://localhost:11434
    requireAuth: false


Options:


After setting indexEmbeddings to true OR changing the first embeddingModels model, you must run the Space: Reindex command.

Generating and indexing note summaries


warning This is an experimental feature, mostly due to the amount of extra time and resources it takes during the indexing process.  If you try it out, please report your experience!


In addition to generating embeddings for each paragraph of a note, we can also use the llm model to generate a summary of the entire note and then index that.

This can be helpful for larger notes or notes where each paragraph may not contain enough context by itself.

To enable this feature, ensure you have these options in your SETTINGS:

aiSettings:
  indexSummaryModelName: ollama-gemma2
  indexSummary: true
  textModels:
  - name: ollama-gemma2
    modelName: gemma2
    provider: openai
    baseUrl: http://localhost:11434/v1
    requireAuth: false


Options:


warning If you are not comfortable sending all of your notes to a 3rd party, do not use a 3rd party api for embeddings or summary generation.


Suggested models for summary generation


info Please report your experiences with using different models!


These models have been tested with Ollama for generating note summaries, along with their quality.  Please report any other models you test with and your success (or not) with them.