Retrieval Augmented Generation (RAG) adds targeted context to LLM calls beyond training data. This example demonstrates a simple RAG workflow using pgvector.
Why PGVector?
- Simple Setup: Uses your existing PostgreSQL database - no additional infrastructure
- Production Ready: Battle-tested approach used across all Datalumina projects
- Cost Effective: No separate vector database costs or complexity
Quick Setup
1
Checkout Example Branch
2
Install Dependencies
The pgvector extension is included in the Docker setup
3
Insert Your Data
Use the vector insertion example to add your documents:
4
Test the Workflow
Components
RAG Service Core
Core RAG implementation- Document chunking and embedding
- Vector similarity search
- Context retrieval and ranking
Vector Management
Insert vectors example- Document processing and embedding
- Batch insertion into pgvector
- Metadata and indexing setup
Workflow Integration
Workflow playground- Complete RAG workflow testing
- Query processing and response generation
- End-to-end validation
Modular Design
Flexible architecture- Swap embedding models easily — Customize retrieval strategies
- Integrate any RAG approach
Key Features
Modular Integration
The Launchpad’s modular design lets you integrate virtually any RAG workflow you engineer into the system.PostgreSQL Native
Leverages your existing database infrastructure with pgvector for vector operations.Production Validated
Based on patterns used successfully across multiple production deployments.Resources
- PGVector RAG Service: Complete service with embedding, retrieval, and context management
- Insert Vectors Example: Shows how to process documents and insert vector embeddings
- Workflow Playground: Test the complete RAG workflow with your own queries
This example gives you the foundation to understand how RAG integrates with workflows. The Launchpad’s flexibility means you can adapt this approach to your specific requirements and data sources.