Pinecone Query
Overview
You can use the Pinecone Query Snap to query records in the Pinecone vector database. Use the Pinecone Snap in an RAG-based LLM (Large Language Model) pipeline where the input vector comes from a user's query. The metadata for matching vectors can be sent to the LLM model for further processing to generate answers to the query.
- If the authentication to Pinecone fails, it results in a complete failure of the Snap (no documents are processed). This is because it cannot get the information to create the URL to contact the Pinecone endpoint.
- If the authentication issue is specific to the Index, such as the non-existing Index for the Account, then the Snap routes to the error view.
- Read-type Snap
- Works in Ultra Tasks
Prerequisites
- A valid account with the required permissions.
Limitations and known issues
None.
Snap views
View | Description | Examples of upstream and downstream Snaps |
---|---|---|
Input | This Snap has at the most one document input view. The input vector must have the same dimension as the connected database for distance calculation to work. | Mapper |
Output | This Snap has at the most one document output view. The Snap retrieves the top matching vectors close to a specific vector in the Pinecone database and outputs the corresponding metadata for those matching vectors (if required). | Mapper |
Error |
Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:
Learn more about Error handling in Pipelines. |
Snap settings
- Suggestion icon (): Indicates a list that is dynamically populated based on the configuration.
- Expression icon (): Indicates whether the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.
- Add icon (): Indicates that you can add fields in the field set.
- Remove icon (): Indicates that you can remove fields from the field set.
Field / Field set | Type | Description |
---|---|---|
Label | String |
Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline. Default value: Pinecone Query Example: TextSimilarityDocument |
Index name | String/Expression/Suggestion |
Required. Specify the name of the index to query the records from. Default value: N/A Example: document_embeddings |
Namespace | String/Expression/Suggestion |
Specify the namespace to query records from in the specified index. If left blank or null, the default namespace is used. Default value: N/A Example: document_embeddings |
Top K | String/Expression |
Required. Specify the number of matches to return per query result. Default value: 4 Example: 5 |
Include vector values | Checkbox/Expression |
Select this checkbox to include the vectors in the response.
Note:
This field does not support input values from the upstream Snap.
Default status: Deselected |
Include metadata | Checkbox/Expression |
Select this checkbox to include the metadata in the response.
Note:
This field does not support input values from the upstream Snap.
Default status: Selected |
Snap execution | Dropdown list |
Select one of the three modes in which the Snap executes.
Available options are:
Default value: Validate & Execute Example: Execute only |