Embedding stores

To use RAG, you need a place to store the embeddings (the vectors). These places are called Vector Stores (or EmbeddingStore in the Langchain4J library).

The agent SDK includes support out of the box for two stores:

  1. A simple embedding store that keeps things in memory. This is the default store. It is not particularly sophisticated with how it looks things up, but is a good option when loading simple documents from the classpath. No other configuration is required to activate this store.

  2. Pinecone. Pinecone.io is a much more advanced vector database for processing and searching your documents. They include a free version in addition to paid versions.

Configuring Pinecone

To enable Pinecone support, add the following to application.properties. You'll receive your key after you create your first instance in Pinecone. The built-in retrievers for Organization Uploads and Personal Uploads will create the necessary indices you need along with namespaces as needed. If you create other retrievers, you'll need to manage that piece yourself.

peoplelogic.agent.rag.store.type=pinecone
peoplelogic.agent.rag.store.key=pcsk_xxxx
peoplelogic.agent.rag.store.host=https://host.svc.aped-4627-b74a.pinecone.io

Connecting other stores

In addition to the built-in stores, you can pull in support for other embedding stores through Langchain4J. We are happy to help you get this setup - just Slack us or email [email protected].

We'll show where to set this up when you create Content Retrievers later in the documentation.

Last updated

Was this helpful?