MaxModel
LLM answers grounded in your own sources — with verbatim citations and hallucinations removed. One deterministic core, a whole toolkit on top: no LLM judging an LLM.
MaxModel is the developer layer of the maxmodel.com gateway. Same key, same OpenAI-compatible API, one new capability: verified output. You pass your own sources (docs, wiki pages, retrieved RAG chunks); the API returns the model’s answer with verbatim citations and a list of any claim it could not ground — stripped out before it ever reaches your users. Because that check is a string match, everything built on it — eval, extraction, a CI gate — is deterministic too.
npm i maxmodel # TypeScript
pip install maxmodel # PythonWhy it’s different
Most “citation” and faithfulness tools ask another model to grade the answer — an LLM judge, an NLI/embedding score, a fine-tuned classifier. Those are probabilistic: they can be wrong, and they give a different answer on a re-run.
MaxModel’s grounding check is deterministic code — your groundedness signal is a string match, not an opinion. Every cited quote must appear character-for-character in the source you supplied, or the claim is dropped. No quote, no claim.
This makes a specific failure structurally impossible: a model can’t “post-rationalize” a citation — attach a real-looking source to a claim the source doesn’t actually contain. (Research finds up to 57% of RAG citations are correct-but-not-faithful; verbatim matching rejects all of them.) The result is machine-verifiable — reproducible by any third party using only your source text and the output, no model weights needed.
import { MaxModel } from 'maxmodel'
const mx = new MaxModel({ apiKey: process.env.MAXMODEL_KEY! })
const out = await mx.verified.create({
model: 'gpt-5.5-pro',
messages: [{ role: 'user', content: 'What is our refund policy?' }],
sources: [
{ id: 'refunds.md', text: 'Full refunds within 30 days. No refunds after 30 days.' },
],
})
console.log(out.text)
// "Full refunds are available within 30 days [refunds.md]. ..."
out.citations // each quote is a verbatim substring of refunds.md
out.unsupported // claims that could not be grounded — caught, not shippedOne core, a whole toolkit
The same verbatim check is the floor under everything — so every piece is deterministic and re-runnable, none of it an LLM judging an LLM:
| What it does | |
|---|---|
verified.create | Grounded answers with verbatim citations + char offsets; ungrounded claims dropped. |
verified.eval ⭐ | Score groundedness over a dataset with the verbatim check — same number every run, unlike RAGAS-style LLM judges. |
verified.extract | Per-field JSON where each value is a verbatim substring of a source, or null. |
checkNumbers: 'row' | A number must sit in the table cell whose row + column the claim names — catches “right number, wrong row.” |
| CI quality gate | A GitHub Action that fails a PR when groundedness drops below a threshold. |
| Audit-grade eval | Reproducible by a third party from source text + output alone — defensible for legal / finance / healthcare. |
| Integrations | Vercel AI SDK middleware (@maxmodel/vercel-provider) + a one-line OpenAI baseURL swap. |
Start here
- Quickstart — install and make your first verified call in two minutes.
- How verification works — the deterministic moat, explained honestly.
- Migrating from OpenAI — change the import, add
sources. - Python SDK —
pip install maxmodel, same API in snake_case. - Errors — typed errors and the HTTP table.
What MaxModel is not (v1)
- It does not retrieve for you — you pass the
sources(post-retrieval chunks). /v1/verifiedis non-streaming: verification needs the full claim set before it can answer.- No GUI. It’s an SDK + API for developers.