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.

Important: The Pinecone Query Snap works differently based on how the authentication errors operate.
  • 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.

Pinecone Query Overview

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:

  • Stop Pipeline Execution Stops the current pipeline execution when the Snap encounters an error.
  • Discard Error Data and Continue Ignores the error, discards that record, and continues with the remaining records.
  • Route Error Data to Error View Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap Settings

Note:
  • 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 there are more than one of the same Snap 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:
  • Validate & Execute. Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only. Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled. Disables the Snap and all Snaps that are downstream from it.

Default value: Validate & Execute

Example: Execute only

Examples