This example pipeline demonstrates how to generate an embedding vector and use it to query results from the OpenSearch database.
-
Configure the JSON Generator Snap to pass
your input data to query.
-
Configure the Azure OpenAI Embedder Snap to generate
embedding vectors for input data based on the Deployment ID, Batch size, and input
document.
On validation, the input data from the upstream Snap is processed into embedded
vectors and you can view the data in the output preview.
Azure OpenAI Embedder Snap
Configuration |
Azure OpenAI Embedder Snap Output |
|
|
-
Configure the Mapper Snap with the
generated embeddings with $vector, ensuring the embeddings are
correctly mapped for the subsequent query.
-
Configure the OpenSearch Query Snap with the
Index name and Vector field name, then
select the relevant Search method and space type to use the
embedding vector for retrieving results.
On validation, the Snap retrieves the top matching vectors closest to the specified
vector in the OpenSearch index and, as configured, outputs the corresponding mappings for
those vectors.
OpenSearch Query Snap Configuration |
OpenSearch Query Snap Output |
|
|
To successfully reuse pipelines:
- Download and import the pipeline into SnapLogic Platform.
- Configure Snap accounts, as applicable.
- Provide pipeline parameters, as applicable.