Azure / azure-search-vector-samples

A repository of code samples for Vector search capabilities in Azure AI Search.
https://azure.microsoft.com/products/search
MIT License
738 stars 313 forks source link

Could not complete vectorization action. Could not reach the vectorization endpoint. #133

Open levalencia opened 9 months ago

levalencia commented 9 months ago

Hello

@farzad528

We have properly created indexes, indexers, data sources and skillsets and the indexers are working properly and we get document chunks in the index.

However we get this error: "Could not complete vectorization action. Could not reach the vectorization endpoint."

If we disable vector search in the query options, we can see the index content and the vector values without any problem. We are using version: 2023-10-01-Preview

If we try: 2023-11-01 then we get this error: "The request is invalid. Details: The parameter 'queryLanguage' in the request payload is not a valid parameter for the operation 'search'

We are using Azure Search Explorer for this testing.

PD: On this notebook: https://github.com/Azure/azure-search-vector-samples/blob/main/demo-python/code/azure-search-integrated-vectorization-sample.ipynb You mentioned: This sample currently uses version 11.4.0b12 which is a pre-release version. Please note, that integrated vectorization feature is in preview and has not been published to azure-search-documents on pypi.

We used 11.4.0.b9 in a different tenant and search service and it worked without any problem. Also I see on pypi that 11.4.b012 is not even there (https://pypi.org/project/azure-search-documents/#history) but 11.4.0 is released. I assume that this notebook is just outdated?

matteomarjanovic commented 8 months ago

Hi @levalencia, did you manage to solve that?

levalencia commented 8 months ago

No, still same issue.

matteomarjanovic commented 8 months ago

Maybe try this: https://github.com/Azure/azure-search-vector-samples/issues/135#issuecomment-1884958322. That solved my issue, even if I'm not sure it was the exact same error

cf-mnedzi commented 7 months ago

Hi @levalencia! Have you come up with any solution? Still have the same error...

SatyamD31 commented 7 months ago

Hi @cf-mnedzi, can you specify your issue...

abhisheknema18 commented 6 months ago

Getting issue - azure.core.exceptions.HttpResponseError: () Could not complete vectorization action. The vectorization endpoint returned status code '403' (Forbidden).

I am using Azure Search admin key for authentication with package azure-search-documents==11.6.0b2

`from azure.search.documents import SearchClient from azure.search.documents.models import VectorizableTextQuery

Pure Vector Search

query = "Which is more comprehensive, Northwind Health Plus vs Northwind Standard?"

search_client = SearchClient(endpoint, index_name, credential=credential) vector_query = VectorizableTextQuery(text=query, k_nearest_neighbors=1, fields="vector", exhaustive=True)

results = search_client.search(
search_text=None,
vector_queries= [vector_query], select=["parent_id", "chunk_id", "chunk"], top=1 )

for result in results:
print(f"parent_id: {result['parent_id']}")
print(f"chunk_id: {result['chunk_id']}")
print(f"Score: {result['@search.score']}")
print(f"Content: {result['chunk']}") `

Using Githug repo - [https://github.com/Azure/azure-search-vector-samples/blob/main/demo-python/code/integrated-vectorization/azure-search-integrated-vectorization-sample.ipynb]()

yashdhanore commented 6 months ago

i ran into this problem today and the solution for this was to go to query options in the AI search portal and set it to

image

previously it was 2023-10-01-preview

andmckay01 commented 5 months ago

In my case, it was an issue with the AZURE_OPENAI_API_KEY – I'm not even sure it's properly added when configuring an Index with the Azure UI.

How to fix

Assuming you already have an index properly built with a vectorizor, go to "Edit JSON"

Scroll to the bottom, you should see something like this:

Screenshot 2024-04-18 at 12 05 42 AM

Notice the "redacted". Replace this with your API Key found in your Azure OpenAI Resource.

-Mckay

gcarvajal1222 commented 4 months ago

i ran into this problem today and the solution for this was to go to query options in the AI search portal and set it to image previously it was 2023-10-01-preview

This also helped me solve the issue

John-Vance commented 4 months ago

If you're coming from an AOAI Studio chat playground deployment and hitting this issue, and you're using an existing Azure AI Search resource, make sure you have semantic ranking enabled under "Search management" in the portal. This resolved this error for me.