Session
How a 4B Model Beat GPT at Agentic Retrieval (And How to Train One on a Neon Postgres Corpus)

Overview
| Experience | In Person |
|---|---|
| Track | Artificial Intelligence & Agents |
| Industry | Enterprise Technology, Consulting & Services |
| Technologies | Lakebase |
| Skill Level | Beginner |
A small RL-fine-tuned model can beat a frontier model at agentic retrieval over a specialized corpus. Our 4B model outperforms frontier models many times its size on in-domain retrieval, faster and at a fraction of the cost. The catch is you need a dataset of hard, grounded questions, so we built a synthetic data pipeline that turns a corpus into multi-hop Q&A pairs with retrieval-difficulty and grounding filters. The whole loop runs on Neon Postgres: corpus, synthetic Q&A and retrieval traces in one database, with pg_search and pgvector as the agent’s search tool. Packaged as Castform: bring a corpus, get a fine-tuned agentic RAG model you own.
Session Speakers
Ying Hang Seah
/CTO
Castform