Performance
Lightweight pages, fast static content, LLM answers gated by upstream model latency Last measured 2026-07-17.
Bundle sizes
| Route | First-load JS |
|---|---|
| /ask | 122 kB |
| /browse | 110 kB |
| /evaluation | 106 kB |
| /policy/[id] | 106 kB |
| /about | 106 kB |
First-load JS per route (gzipped, production build). The shared 102 kB is the React/Next runtime; page-specific code is small because Browse and Reports render from static JSON.
Page-load metrics
Measurement conditions. Measured on the Reports page via the Navigation Timing API (local dev server). Production is smaller (minified) and served from Vercel's edge CDN, so real-world loads are typically faster.
RAG answer latency
Pipeline. embed query (OpenRouter Qwen) → source-balanced hybrid retrieval (Postgres) → Jina rerank → deepseek-v4-flash generation (streamed token-by-token)
End-to-end answer latency over the 150-question evaluation set. The answer streams as it is generated, so first text appears well before the p50. Latency is dominated by the third-party generation model, not the app.
Architecture
- Browse and Reports read pre-generated static JSON (no per-request database round-trip).
- Server retrieval and logging use a direct Postgres connection over the transaction pooler (correct for serverless), not a heavier REST layer.
- Deployed on Vercel's serverless edge network; static assets and the corpus JSON are CDN-cached.
- In-memory sliding-window rate limiting protects the paid embedding/rerank/generation APIs without an external store.
Reproducibility. Bundle figures come from the production next build output; page-load timings from the Navigation Timing API; RAG latency from the 150-question evaluation set. Hover any underlined term for a plain-language definition.