- Published on
Building a Custom RAG Pipeline with Gemini API and pgvector
- Authors

- Name
- Jim Fellows
- hi@jimfellows.dev
I recently came across the service about.me, an online platform that serves as a digital business card or personal landing page for professionals. It's a slick service with a basic free tier that looks great, but what really caught my eye was their paid "Pro" version, which includes a personalized AI chatbot trained on your details.
I was tempted to sign up—maybe I still will just to see how it performs—but then the engineer in me took over. Why pay for a feature when I can build a custom version myself? This seemed like the perfect opportunity to dive into a few technologies I've been meaning to explore: pgvector, RAG (Retrieval-Augmented Generation), and the Gemini API.
The Plan
My goal is to create a chatbot that can answer questions about my professional experience, skills, and projects by querying a vector database of my resume and portfolio content.
Here is the high-level architecture I'm envisioning:
- Vectorize Data: Take my resume, project descriptions, and other personal info and convert them into vector embeddings.
- Storage: Load these embeddings into a PostgreSQL database with the pgvector extension enabled. This allows for efficient vector similarity search.
- Backend Logic: Use Prisma ORM to handle database interactions. When a user asks the chatbot a question, the backend will:
- Convert the user's query into a vector embedding.
- Query pgvector to find the most relevant chunks of text from my stored data (Similarity Search).
- Construct a prompt that includes the user's question along with the retrieved context.
- Generation: Send this prompt to the Gemini API, which will generate a natural language response based on the provided context.
Why pgvector?
I've been looking for an excuse to start using pgvector. It brings vector similarity search directly into Postgres, meaning I can keep my relational data (like blog posts or project metadata) and my vector embeddings in the same place. No need for a separate vector database like Pinecone or Weaviate for a project of this scale. What's been most impressive is how well this seems to work with something like RAG and the Gemini API, and how easy it was to setup.
Winston is Live!
Sitting in bed one night trying to create a few new avatars for my chatbot, when Winston my cat jumped up on the bed.
I snapped a picture, uploaded, and created the persona for my chatbot. Go to the chat icon in the bottom right corner of this app and give him a try, and let me know what you think!
Next Steps
This project was really fun and brought a new dimension to my site. I'm currently exploring how I can implement something similar with a data access website I'm helping out with in my 9-5 job. It's a PostgreSQL-based data warehouse, and we use GCP and Gemini, so it's a perfect fit. I'll keep you posted on how that goes!