Elasticsearch is a distributed, open source search and analytics engine. Data is stored as JSON files in Elasticsearch indexes.
You can associate an Elasticsearch vector store with a foundation model prompt to use information from documents in the store to ground the prompt input in current facts.
Before you can associate an Elasticsearch vector store with a foundation model prompt, you must perform the one-time task of setting up a connection to the Elasticsearch vector store.
To set up the store, complete the following steps:
-
Set up an Elasticsearch database.
For example, you can provision a Databases for Elaticsearch service instance from IBM Cloud. Choose a plan that includes vector search support. For more information, see Getting Started.
-
Create a service credential. You use properties from the credential to set up the data store connector.
-
Deploy the ELSER model that is required to vectorize documents, and then create a vector index by uploading data.
For more information about how to configure a Databases for Elaticsearch service instance to use ELSER, see Use ELSER, Elastic's Natural Language Processing model.
-
From your watsonx.ai project, create a connector to the Elasticsearch database.
For a Databases for Elaticsearch service instance, use values from the service credential in the connector fields:
- URL:
connection.https.composed[0]
- Authentication Method: Username & Password
- Username:
connection.https.authentication.username
- Password:
connection.https.authentication.password
- SSL certificate:
connection.https.certificate.certificate_base64
For more information, see Connecting to Elasticsearch.
- URL:
After you set up a connection to Elasticsearch from your project, you can choose Elasticsearch as the vector store.
Learn more
Parent topic: Creating a vector index