All notes

AI

Aug 6, 2026

Castform on Neon Beats Frontier Retrieval Models at a Fraction of the Cost

The team at Castform demonstrates that open models running on Neon's serverless Postgres can match or exceed frontier retrieval performance while cutting inference costs by roughly two orders of magnitude.

Frontier model performance on retrieval tasks is not a locked-in advantage. The Castform team shows that a carefully tuned open-model stack on Neon's serverless Postgres infrastructure matches GPT-class retrieval quality at costs roughly 100x lower.

The result matters for two reasons. First, retrieval-augmented generation pipelines are cost-sensitive at scale. Every query hits an embedding model and a vector search layer, and those costs compound fast in production. Second, the conventional assumption has been that closing the gap with frontier models requires paying frontier prices. This work challenges that directly.

The approach leans on Neon's architecture: serverless Postgres with pgvector, scale-to-zero compute, and branch-based isolation for testing. Running open embedding and reranking models against that backend, the team benchmarks retrieval metrics head-to-head with larger closed-source alternatives. The open stack holds up.

For engineers building RAG systems, the practical takeaway is that model selection and infrastructure pairing are doing more work than raw parameter count. Smaller, well-chosen models with low-latency vector search can outperform larger models hampered by higher round-trip costs or weaker retrieval integration.

For solo founders, the cost profile shift is significant. A retrieval pipeline that previously required frontier API budgets becomes viable on startup-level spend. Neon's consumption-based pricing compounds the savings further — idle branches cost nothing.

What the team does not do is overstate generalization. The benchmark is scoped to retrieval. Classification, reasoning, and generation quality are separate concerns where frontier models still hold clear advantages.

The broader signal: open-model infrastructure is closing specific capability gaps faster than pricing for frontier APIs is dropping. Knowing which tasks fall into that closed gap, and which do not, is becoming a core engineering decision.