Try it: live demo · public proof, no login · code

Inspiration

AI contract review is fast, but it leaves no proof. Months later, an auditor or a counterparty asks which model flagged this clause, whether a person signed off, and whether the record changed since. With a closed, hosted model there's no good answer: the model behind the API changes silently, and the audit log lives inside the vendor's own database. We wanted contract AI whose output can be checked by someone who doesn't trust us, and that needs an open model whose exact identity can be sealed into the record.

What it does

  • Upload a contract. NVIDIA Nemotron 3 Ultra, served by Nebius Token Factory, returns risk and compliance scores and findings as strict, schema-validated JSON. Each finding includes the exact clause quote, the reasoning, a severity and any regulatory citations.
  • A person reviews it. Nothing in a contract changes until a different person approves the redline (separation of duties).
  • LexProof seals a Legal Passport: SHA-256 fingerprints of the document, the review policy, the AI analysis and the evidence. The exact open-weight model ID is part of the analysis hash.
  • Fingerprints are anchored on Ethereum Sepolia. Only 32-byte hashes go on chain, never contract text.
  • Anyone can verify without a login. The public verifier recomputes the hash in the browser and reads the anchor directly from the chain, showing "Analyzed by NVIDIA Nemotron 3 Ultra · Nebius Token Factory" with the model ID. The Tamper Test shows that changing a single character breaks the proof.
  • Ask Lexi answers portfolio questions on Nemotron 3 Super, citing evidence for every claim. Findings translation also runs on Super.

Workflow

How we built it

  • Nemotron on Token Factory. An OpenAI-compatible endpoint behind one provider class written in plain httpx. There are two tiers:
    • Analysis: nvidia/Nemotron-3-Ultra-550b-a55b (analysis, redlines, payment-obligation extraction, executive summary).
    • Fast: nvidia/nemotron-3-super-120b-a12b (Q&A and translation).
  • Strict structured output. response_format: json_schema with strict: true, plus jsonschema validation on our side. If validation fails, we retry once with the validator error, and only then fall back to json_object.
  • Reasoning off (chat_template_kwargs.enable_thinking=false and /no_think). This cut output tokens 2–7× and removed truncation.
  • Truncation handling. finish_reason=length triggers one retry with double the budget. reasoning_content is never parsed as the answer.
  • Provenance. The model that actually answered goes into the passport hash. An optional Gemini fallback is labelled as such, so the record never claims Nemotron when Gemini answered.
  • Stack: Next.js on Vercel · FastAPI on Google Cloud Run (a separate lexproof-api-nebius service) · Firestore and Cloud Storage · Solidity registries on Ethereum Sepolia · a Chainlink CRE workflow that re-checks anchors.
  • Testing: 1,206 backend and 248 frontend tests. Before writing app code, a spike script ran our production prompt through all four Nemotron models on Token Factory and validated every reply against the production schema.

Architecture

Same high-risk SaaS contract Valid Findings Risk Latency
Nemotron 3 Ultra, reasoning off yes 13 CRITICAL 92 18.3 s
Nemotron 3 Super, reasoning off yes 5 CRITICAL 85 9.0 s
Gemini 3.1 Flash-Lite (previous provider) yes 4 CRITICAL 95 5.6 s

Challenges we ran into

  • Reasoning ate the output budget. With reasoning on and an 8k token limit, models spent most tokens thinking, and the JSON was cut off mid-string (finish_reason: length). One model wrote its "thinking process" into the content field. Turning reasoning off fixed it and made Ultra both faster and better calibrated: it rated a clean NDA LOW instead of MEDIUM.
  • Making provenance honest. Adding the model ID to the hash had to leave every passport already anchored on Sepolia verifiable. Legacy records hash with an empty model value, exactly as before, and new records hash with the real Nemotron ID.
  • Judges need to see Nemotron live without being able to spend our gas or edit others' data. We added a judge mode, scoped to the Nebius service only: a judge can upload, analyze, ask and translate on their own contracts (10 analyses per day), and every other write stays blocked.

Accomplishments that we're proud of

  • On the same high-risk contract, Nemotron 3 Ultra found 12–13 issues where our previous Gemini Flash-Lite setup found 4, with the same CRITICAL call, in about 16–18 s.
  • Open-model provenance on chain: a public verifier anyone can open shows which open-weight model produced an analysis, and that claim is covered by the Ethereum anchor.
  • We swapped the AI provider across six features with one provider class, kept the full test suite green, and changed nothing on the verification side.

What we learned

  • For evidence-grade output, strict JSON schema plus local validation matters more than raw model size, and open models on Token Factory handle it well.
  • Reasoning models need an explicit choice. For extraction against a schema, reasoning off was both faster and more accurate for us.
  • A model ID in a hash is only useful if it's the model that actually answered. That's why fallback provenance is recorded per call.

What's next for LexProof

  • Benchmark Nemotron against reviewed ground truth across the full sample portfolio and publish the numbers.
  • Citation check: verify each regulatory citation against live sources and hash the source snapshot into the evidence.
  • Nebius Serverless Endpoints for a dedicated Nemotron deployment, for customers who want a pinned model version.
  • Passkey-signed approvals; mainnet or an L2 with a gas-sponsoring relayer.

Not legal advice. Anchors are on the Sepolia testnet.

Built With

Share this project:

Updates

Submission history