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

Choosing a vector database

I am building a RAG architecture for an AI Agent and want to store my data in the form of vectors in a relational database. I am confused with which database should I opt for (BigQuery, CloudSQL or AlloyDB). I see that most of the tutorials in the Google gen-AI repo use BigQuery to connect Gen-AI models like Gemini to BigQuery. 

I would want to know which database I should choose for seamless connection of the database with Vertex-AI and Gemini models and  deploying it in a production environment.

Solved Solved
2 4 6,811
1 ACCEPTED SOLUTION

Hello,
Thank You for contacting us!
You're right, BigQuery is a popular choice for storing vector embeddings in a RAG architecture using Vertex AI and Gemini models.
Since most tutorials use BigQuery, it's a safe starting point if data size and real-time needs aren't critical factors. However, you can explore Cloud SQL or AlloyDB if data management expertise, schema flexibility, or lower latency is a priority.

I hope I have answered your question.

View solution in original post

4 REPLIES 4

Hello,
Thank You for contacting us!
You're right, BigQuery is a popular choice for storing vector embeddings in a RAG architecture using Vertex AI and Gemini models.
Since most tutorials use BigQuery, it's a safe starting point if data size and real-time needs aren't critical factors. However, you can explore Cloud SQL or AlloyDB if data management expertise, schema flexibility, or lower latency is a priority.

I hope I have answered your question.

Thank you very much for response. Just wanted to know if BigQuery would be suitable to use in the production environment as well.

Hello,

Absolutely, BigQuery is very suitable for use in a production environment. In fact, it's a popular choice for large-scale data storage and analytics in production.

Well I'm sure if this is the only best choice for vector database and making vector search. Like few of the tutorial I've seen use AlloyDB for this purpose instead of BigQuery. Stating the ease of scalable, transactional and cost effective solution of loads and production environment.

A link to google architecture also use AlloyDB for RAG,
https://cloud.google.com/architecture/rag-capable-gen-ai-app-using-vertex-ai