Ask questions about an IPO S-1 filing and get answers grounded in the actual document — with a citation to the exact printed page the fact came from.
Live at asks1.com. Currently covers Anthropic's and SpaceX's S-1 filings.
- Each filing's PDF is split per-page, preserving the printed page number (not the PDF page index), including the
F-numbered financial statement pages. - Pages are chunked and embedded locally, with inline
[p.X]markers kept in the stored text. - A question is embedded and matched against the filing's collection in Qdrant.
- Claude answers only from the retrieved context and cites the single page a fact appears on.
- Citations are verified against the answer text before being shown — only pages the answer actually cites make it into the Sources list.
- Frontend/API: Next.js (App Router) on Railway
- Vector search: Qdrant Cloud, one collection per filing
- Embeddings: local, via
@xenova/transformers(no embedding API calls) - Generation: Claude Sonnet 5.5 (
@anthropic-ai/sdk) - Waitlist storage: Google Sheets
cd web
npm install
cp .env.local.example .env.local # fill in your own keys
npm run devRequired env vars (see .env.local.example):
| Var | Purpose |
|---|---|
ANTHROPIC_API_KEY |
Claude generation |
QDRANT_URL / QDRANT_API_KEY |
Vector search |
GOOGLE_CREDS_JSON |
Service-account creds for the waitlist sheet |
npm run dev/build/start— standard Next.jsscripts/ingest.ts— chunk + embed a filing PDF into Qdrantscripts/verify-citations.ts— checks every retrieved chunk's page tags against the source PDFscripts/eval-anthropic-rag.ts— runs the eval set, scores faithfulness/citation quality with an LLM judgescripts/gen-icons.mjs— regenerates favicon/app-icon assets fromapp/icon.svg
- Exact-page citations currently only cover the Anthropic collection; SpaceX still cites a coarser page range through the older path.
- Retrieval occasionally misses numeric facts buried in tables — see the eval write-up for specifics.
- Sessions are rate-limited since this is a self-funded, non-monetized project.
Adding Anthropic to AskS1: what changed, what broke, what's still unfinished