← All work
Retrieval · pgvector
Document RAG Pipeline
A retrieval-augmented generation pipeline that answers questions from a document collection using vector search in PostgreSQL.
query → nearest chunks → answer
IllustrationChunksVector spaceAnswer
The problem
Language models don't know your documents. Answers need to be grounded in the right passages, retrieved quickly and reliably.
The approach
- 01Documents are split into chunks suited to retrieval.
- 02Each chunk is embedded and stored with pgvector in PostgreSQL.
- 03A query retrieves the most similar chunks.
- 04An LLM writes the answer from the retrieved context.
Architecture
How Document RAG Pipeline fits together.
Each step, in order. Select a node to see what it is responsible for.
The source collection the system answers from.
Stack
- PostgreSQL
- pgvector
- Embeddings
- LLMs
Next project
Clinical Training Simulator
A clinical training application where students work through cases, guided by a state machine and evaluated with AI feedback and scoring.