Pinecone Store for Retrieval Augmented Generation (RAG)
When implementing Retrieval Augmented Generation (RAG), a robust document store is crucial. This guide demonstrates how to leverage a Pinecone database as the document store.
Leveraging the Pinecone Document Store
To make use of the Pinecone document store, you’ll need to include the following dependency:
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-pinecone</artifactId>
</dependency>
Configuration Settings
Customize the behavior of the extension by exploring various configuration options:
Configuration property fixed at build time - All other configuration properties are overridable at runtime
Configuration property |
Type |
Default |
---|---|---|
The API key to Pinecone. Environment variable: |
string |
required |
Environment name, e.g. gcp-starter or northamerica-northeast1-gcp. Environment variable: |
string |
required |
ID of the project. Environment variable: |
string |
required |
Name of the index within the project. If the index doesn’t exist, it will be created. Environment variable: |
string |
required |
Dimension of the embeddings in the index. This is required only in case that the index doesn’t exist yet and needs to be created. Environment variable: |
int |
|
The type of the pod to use. This is only used if the index doesn’t exist yet and needs to be created. The format: One of Environment variable: |
string |
|
The timeout duration for the index to become ready. Only relevant if the index doesn’t exist yet and needs to be created. If not specified, 1 minute will be used. Environment variable: |
||
The namespace. Environment variable: |
string |
|
The name of the field that contains the text segment. Environment variable: |
string |
|
The timeout duration for the Pinecone client. If not specified, 5 seconds will be used. Environment variable: |
About the Duration format
To write duration values, use the standard You can also use a simplified format, starting with a number:
In other cases, the simplified format is translated to the
|