Overview
The RAG (Retrieval-Augmented Generation) pipeline gives the AI advisor memory across time. Without it, the AI only knows about your current transactions. With it, the AI can reference patterns from past months and previous conversations.Embeddings
Vantage uses BAAI/bge-small-en-v1.5 (384-dimensional dense embeddings) running in Docker:http://localhost:8001 and exposes a simple POST endpoint that returns float arrays.
What gets embedded
Hybrid search
When the AI needs context, it uses a hybrid search combining:- Vector similarity — semantic matching via pgvector cosine distance
- Full-text search — keyword matching via PostgreSQL
ilike
hybrid_search() RPC function in Supabase combines both scores with a weighted average.
Manual ingestion
To ingest your data without waiting for the cron:user_embeddings table.
Storage
Embeddings are stored in theuser_embeddings table with an HNSW index for fast approximate nearest-neighbour search: