googleapis / googleapis/python-aiplatform
vertexai.preview.rag.retrieval_query() raises error
- Ngôn ngữ chính
- Python
- Star
- 905
- Fork
- 465
- Merge trung bình
- 1 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 44
Mô tả
Hello,
I'm encountering an issue with my Vertex AI RAG retrieval query. It was functioning correctly previously, but now I'm receiving an "InternalServerError: 500 Failed to search for project xxxx" error.
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/gemini/lib/python3.12/site-packages/google/api_core/grpc_helpers.py", line 76, in error_remapped_callable
return callable_(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/gemini/lib/python3.12/site-packages/grpc/_channel.py", line 1181, in __call__
return _end_unary_response_blocking(state, call, False, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/gemini/lib/python3.12/site-packages/grpc/_channel.py", line 1006, in _end_unary_response_blocking
raise _InactiveRpcError(state) # pytype: disable=not-instantiable
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.INTERNAL
details = "Failed to search for project xxxx"
debug_error_string = "UNKNOWN:Error received from peer ipv6:%5B2a00:1450:400e:805::200a%5D:443 {created_time:"2025-03-04T15:22:45.964149653+01:00", grpc_status:13, grpc_message:"Failed to search for project xxxx"}"
>
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/user/.pyenv/versions/gemini/lib/python3.12/site-packages/vertexai/preview/rag/rag_retrieval.py", line 133, in retrieval_query
response = client.retrieve_contexts(request=request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/gemini/lib/python3.12/site-packages/google/cloud/aiplatform_v1beta1/services/vertex_rag_service/client.py", line 833, in retrieve_contexts
response = rpc(
^^^^
File "/home/user/.pyenv/versions/gemini/lib/python3.12/site-packages/google/api_core/gapic_v1/method.py", line 131, in __call__
return wrapped_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/gemini/lib/python3.12/site-packages/google/api_core/grpc_helpers.py", line 78, in error_remapped_callable
raise exceptions.from_grpc_error(exc) from exc
google.api_core.exceptions.InternalServerError: 500 Failed to search for project xxxx
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/user/gitlab/datascience-chatbot/vertex/gemini_only_query.py", line 11, in
response = rag.retrieval_query(
^^^^^^^^^^^^^^^^^^^^
File "/home/user/.pyenv/versions/gemini/lib/python3.12/site-packages/vertexai/preview/rag/rag_retrieval.py", line 135, in retrieval_query
raise RuntimeError("Failed in retrieving contexts due to: ", e) from e
RuntimeError: ('Failed in retrieving contexts due to: ', InternalServerError('Failed to search for project xxxx'))
```
I have not made any changes to the code, RAG configuration, or IAM permissions.
Could you please provide guidance on troubleshooting this error? I need to identify the root cause of the retrieval failure.
Specifically, I would like to know:
How to access detailed logs for the RAG retrieval process.
Where to check the status of my RAG corpus.
Any known recent issues with Vertex AI RAG that may be causing this.
Thank you for your assistance.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với entry point được báo cáo trong vertexai/preview/rag/rag_retrieval.py, đặc biệt là retrieval_query, và tái hiện InternalServerError bằng các chi tiết trong traceback. Kiểm tra trạng thái của RAG corpus và các retrieval log hiện có; issue được hoàn tất khi nguyên nhân gốc rễ của lỗi đã được xác nhận và có troubleshooting path được ghi lại hoặc đã xác định được một thay đổi trong SDK.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- gcp, python
- Lĩnh vực
- cloud, machine-learning
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 22/100