Interface EmbeddingStoreProvider


public interface EmbeddingStoreProvider
Provides per-dimension EmbeddingStore instances for knowledge base storage.

Each embedding dimension may require its own store (or table) to avoid dimension mismatches when multiple knowledge bases use different embedding models.

The default implementation uses pgvector. Override this binding in your Guice module to use a different vector store backend.

  • Method Summary

    Modifier and Type
    Method
    Description
    dev.langchain4j.store.embedding.EmbeddingStore<dev.langchain4j.data.segment.TextSegment>
    get(int dimension)
    Returns the EmbeddingStore for the given dimension.
  • Method Details

    • get

      dev.langchain4j.store.embedding.EmbeddingStore<dev.langchain4j.data.segment.TextSegment> get(int dimension)
      Returns the EmbeddingStore for the given dimension. Implementations should create the store lazily on first access for each dimension.
      Parameters:
      dimension - the embedding vector dimension (from the embedding model config)
      Returns:
      the embedding store for this dimension