Azure-Samples / Azure-Samples/azure-search-python-samples
Azure Agentic retrieval fails with unhelpful error response in spite of correct setup
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 178
- Fork
- 310
- Merge trung bình
- 6 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 2
Mô tả
When using the [example python notebook provided for agentic search](https://github.com/Azure-Samples/azure-search-python-samples/tree/main/Quickstart-Agentic-Retrieval), after having configured everything correctly, I get the following response:
```
HttpResponseError Traceback (most recent call last)
[](https://localhost:8080/#) in ()
12 })
13
---> 14 retrieval_result = agent_client.retrieve(
15 retrieval_request=KnowledgeAgentRetrievalRequest(
16 messages=[KnowledgeAgentMessage(role=msg["role"], content=[KnowledgeAgentMessageTextContent(text=msg["content"])]) for msg in messages if msg["role"] != "system"],
3 frames
[/usr/local/lib/python3.11/dist-packages/azure/search/documents/agent/_generated/operations/_knowledge_retrieval_operations.py](https://localhost:8080/#) in retrieve(self, retrieval_request, x_ms_query_source_authorization, request_options, **kwargs)
219 map_error(status_code=response.status_code, response=response, error_map=error_map)
220 error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
--> 221 raise HttpResponseError(response=response, model=error)
222
223 deserialized = self._deserialize("KnowledgeAgentRetrievalResponse", pipeline_response.http_response)
HttpResponseError: () An error has occurred.
Code:
Message: An error has occurred.
```
### Steps I followed:
- Clone the notebook
- Created the AI search index on the "Standard" tier
- Created an Open AI service
- Created the gpt-4o deployment
- Used `text-embedding-3-large` embedding
- Added the following permissions for the user - Search Service Contributor, Search Index Data Contributor, Search Index Data Reader
- Added all the necessary keys
- Executed your notebook code
Hướng dẫn đóng góp
Hướng nghiên cứu
Start by rerunning the Quickstart-Agentic-Retrieval notebook through the agent_client.retrieve call, using the setup details listed in the issue: Search tier, OpenAI deployment, embedding model, permissions, and keys. Compare the failing request with the notebook configuration. Done means the sample completes retrieval or provides a specific, actionable error instead of the generic HttpResponseError.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- azure, jupyter-notebook, python
- Lĩnh vực
- ai, cloud, search
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100