Skip to main content

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:
The embedding server runs on http://localhost:8001 and exposes a simple POST endpoint that returns float arrays.

What gets embedded


When the AI needs context, it uses a hybrid search combining:
  1. Vector similarity — semantic matching via pgvector cosine distance
  2. Full-text search — keyword matching via PostgreSQL ilike
The hybrid_search() RPC function in Supabase combines both scores with a weighted average.

Manual ingestion

To ingest your data without waiting for the cron:
Check results in Supabase → user_embeddings table.

Storage

Embeddings are stored in the user_embeddings table with an HNSW index for fast approximate nearest-neighbour search: