While I don't have the exact details or a specific example on your scenario, you can add the information about vector search in the extension_config
variable.
In your existing configuration dictionary, there's a section for "parameters"
where you specify Azure Cognitive Search endpoint and key details. You can extend this section to include vector search parameters.
Here's an example of how you might need to modify the extension_config
dictionary:
extension_config = dict(
dataSources = [
{
"type": "AzureCognitiveSearch",
"parameters": {
"endpoint": azure_search_endpoint,
"key": azure_search_key,
"indexName": azure_search_index,
"vectorProfile": "your_vector_profile_name", # Specify your vector profile name here
"vectorField": "vector" # Field in your index containing vectors
}
}
])
This code specifies both the vector field and the vector profile you are using in your index.
Please replace "your_vector_profile_name"
with your actual vector profile name. This would be the name of the profile you used when preparing your sample data for import and vectorization.
Remember to keep the "vectorField"
value as "vector"
if your vector field in the index is named vector
.
As a next step, try applying these modifications to your Python code and test if it now correctly uses the embedding vector for search.
Since this is a relatively new feature and the official documentation might not cover all aspects in depth, should you face any issues, consider reaching out to Azure support or user community forums for more assistance