Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

ADK RAG example - problem creating RAG corpus

I'm trying to run the RAG ADK sample:

https://github.com/google/adk-samples

This is the error I'm getting:

python rag/shared_libraries/prepare_corpus_and_data.py
Created new corpus with display name 'Alphabet_10K_2024_corpus'
Updated RAG_CORPUS in D:\source\repos\adk-samples\agents\RAG\.env to projects/1067010856026/locations/us-central1/ragCorpora/4611686018427387904
Downloading PDF from https://abc.xyz/assets/77/51/9841ad5c4fbe85b4440c47a4df8d/goog-10-k-2024.pdf...
PDF downloaded successfully to C:\Users\61450\AppData\Local\Temp\tmp526ppwps\goog-10-k-2024.pdf
Uploading goog-10-k-2024.pdf to corpus...
Error uploading file goog-10-k-2024.pdf: ('Failed in indexing the RagFile due to: ', {'code': 8, 'message': 'Vertex AI embedding could not be computed with error: 429 Quota exceeded for aiplatform.googleapis.com/online_prediction_requests_per_base_model with base model: textembedding-gecko. Please submit a quota increase request. https://cloud.google.com/vertex-ai/docs/generative-ai/quotas-genai. processing gs://rag-rental-prod-cf1e0e24-us-central1-temp-bucket/af9f8646-bf29-4a65-bb33-bee601df4bc7'})
Total files in corpus: 0

First of all, I cannot increase quota, I tried and it says I'm not allowed.

I have no idea how to fix this, and when trying to investigate it seems the documentation is out of date.

When viewing the document at https://cloud.google.com/vertex-ai/generative-ai/docs/rag-engine/rag-overview

ajbarry99_0-1747687551761.png

Clicking on the Try Vertex AI Rag Engine, it directs to this page: 

https://console.cloud.google.com/vertex-ai/rag?inv=1&invt=Abx1uQ

 

Which sends me to this URL:

ajbarry99_1-1747687742033.png

 

 

 

 

0 1 238
1 REPLY 1

Hi @ajbarry99,

Welcome to Google Cloud Community!

The '429 Quota Exceeded' error usually suggests that you're hitting the rate limit within a given time period.

Here are several suggestions that may help resolve the issue:

  • Possibly, the resource for that region has been exhausted, try calling it from another region.
  • For quota and rate-limit issues, try reducing the frequency of your requests or test it with a smaller PDF.
  • As a best practice, instead of using the textembedding-gecko model, try consider using the text-embedding-005 model, as it is the supported default embedding model recommended for use with a RAG corpus. Though kindly note that this may require modifying your code.
  • Ensure you have a valid service account. For a quota request, make sure you're not on a free trial, as you cannot request a quota increase using the free trial credits. 
  • While clicking on the ‘Try Vertex AI Rag Engine’ from the public documentation, I don't have any problem accessing the same link at my end, which possibly suggests that this issue might be specific to your project or machine and might be due to several factors. You can check this documentation to troubleshoot Google Cloud console page loading issues.
  • Try Cloud Logging to further analyze your issue or for deeper diagnostics. You can examine and review logs related to 429 error.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.