Semantic Search and RAG on Government News
Keyword search fails on government news. Users ask 'What did the EU announce about digital markets this week?' — not `category:policy AND region:eu`.
Newsfork's semantic search pipeline embeds every article at ingestion time using Workers AI, stores vectors in Cloudflare Vectorize, and serves queries through `/v1/rag/query`.
The retrieval pipeline has three stages:
Embed — The query is converted to a vector using the same model as ingestion embeddings.
Retrieve — Vectorize returns the top-k candidates with faceted filters (country, category, date range, News-V score floor).
Re-rank — A cross-encoder re-ranks candidates and generates a cited answer with confidence scores.
Every RAG response includes source citations with document IDs, so you can fetch full articles via `/v1/news/{docId}` or display attribution in your UI.
Semantic search is available on Pro and Enterprise plans. The Free tier includes keyword search across 10 countries with 24-hour freshness.
Latency target: sub-200ms for retrieval, sub-500ms end-to-end including generation — all at the edge, no round-trip to a central GPU cluster.