DEV Community

Cover image for πŸš€ pgai Vectorizer: Automate AI Embeddings With One SQL Command in PostgreSQL

πŸš€ pgai Vectorizer: Automate AI Embeddings With One SQL Command in PostgreSQL

Avthar Sewrathan on October 29, 2024

Learn how to automate AI embedding creation using the PostgreSQL you know and love. Managing embedding workflows for AI systems like RAG, search a...
Collapse
 
ben profile image
Ben Halpern

Really excited about this challenge tomorrow

Collapse
 
avthars profile image
Avthar Sewrathan

Thanks Ben, excited to see what you build in the OSS AI challenge!

Collapse
 
robbenzo24 profile image
Rob Benzo

exciting!!!!

Collapse
 
avthars profile image
Avthar Sewrathan

Thanks Rob!

Collapse
 
devnenyasha profile image
Melody Mbewe

Really exciting

Collapse
 
avthars profile image
Avthar Sewrathan

Thanks Melody!

Collapse
 
vasamkul profile image
Sameer Kulkarni

Very interesting and timely...
We are building a RAG based app and this article certainly is going to help us

Collapse
 
avthars profile image
Avthar Sewrathan

Great to know Sameer -- excited to hear what you think!

Collapse
 
fahminlb33 profile image
Fahmi Noor Fiqri • Edited

Does the image pgai-vectorizer-worker support Ollama? The documentation do not provide an example config using Ollama

Collapse
 
avthars profile image
Avthar Sewrathan

The pgai-vectorizer-worker does not support Ollama at this time, only OpenAI. But you can still use Ollama for generation models and OpenAi as the embedding model. Our team will add Ollama support very soon!

Collapse
 
fahminlb33 profile image
Fahmi Noor Fiqri

Follow up question:

I have a vectorizer and timescale-ha in a docker compose but I'm always getting rate limit error from Open AI. I have set the concurrency to 1 but it still happens.

I tried to embed just a single PDF file (Attention is All You Need paper) for a RAG project but no matter how I configure the vectorizer, it just seems to always be hitting Open AI rate limit (I'm on Tier 1 account).

Is there a way to slow down the vectorizer? This is a bit of dilemma, I can't use Ollama in vectorizer and when I use Open AI, I always get rate limit error.

Collapse
 
fahminlb33 profile image
Fahmi Noor Fiqri

Thanks for the info!

Collapse
 
restless_coder profile image
Restless Coder

anyhow, it uses paid openAI key?
then why do we use it?