Vector Search Azure Openai Elastic
openai-chatgptlangchain-pythonchatgptgenaiazure-openaielasticsearchelasticopenaiAIintegrationschatlogvectordatabasenotebooksPythonsearchgenaistackvectorelasticsearch-labslangchainapplications
Export
Quickstart: Vector search using Azure OpenAI Embeddings and Elasticsearch
This tutorial demonstrates how to use the Azure OpenAI API to create embeddings and store them in Elasticsearch. Elasticsearch will enable us to perform vector search (Knn) to find similar documents.
setup
-
Elastic Credentials - Create Cloud deployment to get all Elastic credentials (
ELASTIC_CLOUD_ID,ELASTIC_API_KEY). -
AZURE_OPENAI_API_KEY- To use the Azure OpenAI API, you need an API key. Follow to create a key. -
AZURE_OPENAI_ENDPOINT- Endpoint for your Azure OpenAI Resource. -
AZURE_DEPLOYMENT_ID- The deployment name you chose when you deployed the model. -
AZURE_OPENAI_API_VERSION- The API version to use for this operation. This follows the YYYY-MM-DD format.
Install packages
[ ]
Import packages and credentials
[ ]
Embedding generation
[ ]
Connecting Elasticsearch
[ ]
Index document with Elasticsearch
[ ]
Searching for document with Elasticsearch
[7]
ID: SxtQyY4BMvvuJ06pSACG Text: India generally experiences a hot summer from March to June, with temperatures often exceeding 40°C in central and northern regions. Monsoon season, from June to September, brings heavy rainfall, especially in the western coast and northeastern areas. Post-monsoon months, October and November, mark a transition with decreasing rainfall. Winter, from December to February, varies in temperature across the country, with colder conditions in the north and milder weather in the south. India's diverse climate is influenced by its geographical features, resulting in regional