Unable to Use vertex Ai search with Vertex AI rag engine

I have created a rag corpus us vector AI search as mentioned in the documentation.
https://cloud.google.com/vertex-ai/generative-ai/docs/rag-engine/use-vertexai-vector-search
But whenever i try to retrieve data from the Rag corpus, it Says internal error - ( Performing retrieval query…
2025-05-29 16:27:20,609 - ERROR - rag_query.py:109 - Error querying corpus: ('Failed in retrieving contexts due to: ', InternalServerError(‘Internal error encountered.’)) )

The rag corpus has no data imported, I couldn’t do it manually too, whenever i try to do it manually, i get the error saying -( This RAG corpus is configured to use Vertex AI Search, which does not allow direct file operations. To manage files, please utilize the appropriate Vertex AI Search API methods for content updates. )

Kindly let me know if i’m doing something wrong, or is there something else i need to do.

Thanks

JoelA11_0-1748539754352.png

Hi @JoelA11 ,

You can’t upload files manually to a RAG corpus backed by Vertex AI Search.

Fix: Use the Vertex AI Search documents:import API to add data:
POST https://discoveryengine.googleapis.com/v1/projects/{project}/locations/global/collections/default_collection/dataStores/{datastore}/documents:import
RAG will only work once content is ingested this way.

We are experiencing the exact same issue. Sure, we need to use the Vertex AI Search API to update the index, but that is a separate issue.

Even while following the tutorial to the best of my ability I am unable to retrieve contexts when using Vertex AI Search as the backend for RAG Engine. The provided error Internal Server Error is quite unhelpful and the fact that this occurs even with the standard usage pattern is not reassuring.