Inspiration

You run a family office/investment fund.

You missed Anthropic's private rounds, and now it has filed its S-1. Did it make money?

The filing gives three true answers for the six months to 30 June 2026: a net loss of $80,748m, an operating loss of $693m, and adjusted operating income of +$1,618m. An AI that picks one of them has quietly made your investment call. We wanted a system where which number goes into the memo is never the model's call.

Finrail's design is inspired by DeepSeek Harness.

What it does

Finrail is a finance-first agent harness. Every figure is decided by code, checked against its source filing, and released by a person. The model fetches. Code verifies. You decide.

  • Ask. Chat on the left, the harness trace on the right. "Did Anthropic make money?" returns all three lines, each with its table and row. "Under our method?" applies the fund's rule M-1 (stock compensation is a cost) to the same cells and gives -$567m, with the $2,185m gap explained in a workpaper.
  • Web claims, checked. Tavily finds press sentences about the filing. Each one is labelled by line and period, and code gives the verdict: matches, loosely rounded, wrong line, or another period. The web is treated as claims to check, never as evidence.
  • Designed refusals. "Add back stock compensation" is refused by M-1. "Swap in a figure from another column" is refused by the checker. Booking NVIDIA's $24,077m operating cash flow as free cash flow is refused, and the refusal names the line it came from. The real Q2 FY2027 FCF is reconstructed as 24,077 - 2,677 - 59 = $21,341m and reconciled to the published figure.
  • Quoted answers. Nemotron picks sentence IDs. Code pastes the exact filing text, so a quote can never be paraphrased or invented.
  • Proof, Ledger, Rules, Approvals. A workpaper for every answer, a ledger of every model call, rules rendered from the live registry, and an approvals queue. The browser cannot approve. Only a person at their own terminal can release a memo for Investment Committee.
  • Corpus (ingested on Vertex AI RAG) Seven real filings (NVIDIA, Nebius and ASML quarterlies, plus Anthropic's S-1), public-risk screening behind an evidence gate, a data-room claim check, deterministic compute from cited cells, and a hash-bound IC memo release.

How we built it

  • NVIDIA Nemotron on Nebius Token Factory powers every judged model call, through one engine seam (finrail/core/llm.py). The live demo runs Nemotron 3.5 Super VL with a 32,768-token reply cap. Nemotron picks filing row IDs and sentence IDs. It never types a number or a quote.

  • Code does the checking. It verifies the file SHA-256, row text, period column and units, computes in Decimal, and reconciles to the issuer's own figure.

  • Tavily search for live web claims.

  • Google Vertex AI RAG Engine retrieves from the selected filing; filings are archived in Cloud Storage.

  • Jev (TypeSafe) makes typed routing choices with a 75% confidence bar.

  • Everything is a plugin or a command, including the UI. One dispatcher, three doors: finrail get/do/ask on the CLI, the web console, and no privileged browser path.

  • Python 3.12 with a stdlib-only runtime and no vendor SDKs; FastAPI and uvicorn for the console; Docker on Cloud Run, Cloud Build, Secret Manager.

  • Every model call is logged. There is no silent fallback: failures carry named codes such as PROVIDER_UNAVAILABLE, SCHEMA_INVALID, EMPTY_RESPONSE and TIMEOUT.

  • 200+ offline tests.

Challenges we ran into

  • Models misread dense financial tables: wrong row, wrong column, wrong period. That is why code checks every pick.
  • Review passes found real approval-bypass bugs (the browser route trusted the server process; a background job could run unapproved work). All fixed.
  • The claim parser dropped signs and currency, reading -$ and EUR as positive USD.
  • Nemotron 3.5's reasoning counts toward the reply cap. At 8,192 tokens, 4 of 70 replies came back empty; at 32,768, all 70 passed.
  • Live web results change between runs, so verdicts on press claims are recomputed every time.

Accomplishments that we're proud of

  • No wrong figure shipped on any model we tested.
  • Nemotron 3.5 Super VL, our default, passed 70 of 70 on 7 tasks at $4.43 per 1,000 checked answers, about 1/5.5 of what Claude Opus 5.5 costs ($24.54, 35 of 35).
  • Nemotron 3 Super passed 67 of 70 at $1.45, about 1/17 of the Opus cost.
  • A real Anthropic's S-1 ingested, with its stock-compensation reconciliation holding to the dollar.

What we learned

When code verifies every pick, a small open model is enough for this job. A weaker model shows up as refusals, latency and cost, never as wrong numbers. The method belongs in code, not in prompts.

Finance teams deserve a harness that lets them work AI-native and trust every number. Their own methods are written in code, and that code runs the system underneath.

What's next for Finrail

  • We have interests from 5 funds/family office for the testing. I'd love to build this into end-to-end product.

Built With

  • docker
  • fastapi
  • google-cloud
  • google-cloud-build
  • google-cloud-run
  • google-secret-manager
  • google-vertex-ai
  • jev
  • nebius-token-factory
  • nvidia-nemotron
  • pytest
  • python
  • tavily
  • uvicorn
Share this project:

Updates

Submission history