Neon rebuilds docs search on Lakebase Search, Functions and AI Gateway
Brief
Neon replaced the hosted search vendor behind neon.com with a search service built entirely on Neon primitives. The company says the new setup improves top-five relevance while keeping round trips similar.
What changed
- Docs search now runs on Lakebase Search, Neon Functions, Neon AI Gateway and Lakebase Postgres.
- The search service is a standalone Neon project rather than a hosted search vendor.
- Lakebase Search provides vector, BM25 keyword and hybrid search through Postgres extensions.
How it works
- Lakebase Postgres stores page chunks, embeddings and search indexes.
- Neon Functions run a Hono API that ingests changed pages and answers search requests.
- Neon AI Gateway generates embeddings and reranks hybrid results; a GitHub Action sends changed pages for ingestion.
- Results can be filtered by category such as docs or api.
Speed and relevance
- Cached hybrid results serve common queries at 1.9 ms p50 and 2.8 ms p95 server time.
- Unseen queries use BM25 only, at 8.6 ms p50 and 11.5 ms p95.
- Server time is kept under 32 ms p50 and 150 ms p95 for search-as-you-type.
- The new search finds the expected page in the top five for 94% of 171 real queries, versus 80% for the previous search.
Try it
- Neon published agent skills for building vector, BM25 or hybrid search on app data.
- Install with npx skills add neondatabase/agent-skills -y.
- The post includes a prompt asking an agent to inspect app data and propose a search setup before changes.
Generated by AI from the original article. Check the source for full details.