Documentation
How the lab works, and what its records show.
Written to be checked against the code. Where a guarantee stops, this page says so.
Overview
GatsLabs evaluates AI models on challenges whose contents are committed to before any model is asked. A worker sends each task to the selected models, saves the replies with the usage and timing, and grades them with deterministic rules. The result is a report with a hash, and, once the challenge is revealed, everything needed to recompute that hash and re-run the grading.
Inference and grading run off-chain. Solana is used for one thing: a wallet can record a commitment or a report hash in a memo transaction. No model runs on Solana and no on-chain program takes part in an evaluation.
- Browse and compare published runs without an account or a wallet.
- Seal a challenge from a template or from your own items.
- Run it against configured models, or against scripted stand-ins when no provider is configured.
- Inspect every answer, export the report, and verify it in the browser or from a terminal.
- Optionally anchor the commitment and the report hash on Solana.
Methodology
One request, one outcome
A run is one request per model and item. Each request ends in exactly one of five outcomes:
- Correct or incorrect: the model replied and the grader reached a verdict. A reply that ignores the required answer format is incorrect; the format is part of the task.
- Ungradable: a reply was saved but the grader could not be applied, because it was empty or was cut off by the output cap before its final answer.
- Failed: no reply. The request timed out, was rate limited, was rejected, or the provider declined it. The category is recorded.
- Skipped: never sent, because the budget was exhausted or the run was cancelled.
Accuracy
Accuracy is correct / (correct + incorrect). Failed, skipped and ungradable requests are in neither number, so a provider outage cannot lower a model's accuracy and a truncated reply is not scored as a wrong one. They are always reported next to it, and every comparison row states how many graded answers it rests on.
Reproducible grading, not reproducible generation
Grading is a pure function of the saved reply and the rule: run it again anywhere and the verdict is the same. Generation is not reproducible. A model may answer differently on another day even with identical recorded settings, and some models accept no sampling settings at all. A report documents what one run measured; it is not a promise about the next one.
Prompt template
Template pt/1: one system line stating the required answer format for the kind of task, and the item text as the user message. Numeric and document items end with a line ANSWER: …; JSON items reply with a single object; instruction items are graded on the whole reply. The template version is recorded in every report.
Latency
Wall-clock milliseconds from sending one non-streaming request until its complete response body was received, measured in the worker process. Includes network transit and provider queueing. Only the attempt that produced the saved response is counted; waits between retries are not.
Scope
Results describe the challenge sets that were run, with the output cap and settings recorded. Sets are small. They are not a general ranking of models, and freshly generated questions are not evidence that a model has never met something similar.
Graders
Four graders, each versioned. None calls a model. An LLM judge is not used anywhere; if a subjective judge were ever added it would be a separate, labeled column, never the source of these verdicts.
numeric@1reads the last line starting withANSWER:as one decimal number (thousands commas, a leading currency sign and a trailing unit are tolerated; fractions and words are not) and accepts it within the item's absolute or relative tolerance.json@1parses the reply as JSON (one```jsonfence around the object is tolerated, prose around it is not) and checks each required field for presence, type and value. Unexpected keys fail unless the item allows them.instructions@1applies countable rules to the whole reply: line and word counts, required prefixes and suffixes, text that must or must not appear, digits, letter case. Words are runs of non-whitespace; lines are non-empty lines.accepted@1normalizes theANSWER:line (Unicode NFKC, lower case, surrounding quotes and final periods removed, spaces collapsed) and requires it to equal one of the accepted answers.
New graders implement one function, grade(rule, response, finishReason), in src/lib/graders.ts, and add their rule shape to the challenge schema. Because that file runs in the browser too, a new grader is verifiable from day one.
Templates
- Arithmetic and numeric reasoning (
numeric-ledger): The last "ANSWER:" line must hold one number within the stated tolerance of the computed reference value. - Structured JSON extraction (
json-records): The reply is parsed as JSON and checked field by field: presence, type and value. Unexpected keys fail. - Instruction following (
rule-following): Every rule is a mechanical check on the whole reply; all of them have to hold. - Document questions (
document-memo): The last "ANSWER:" line is normalized (case, quotes, spacing) and must equal one of the accepted answers. - Mixed set (
mixed-bench): Each item is graded by the grader of its own kind.
Code execution
Coding tasks that execute generated code are not available. They need an isolated sandbox, which this app does not include. Model output is never executed in the web server or the worker.
Cost and budget
Cost is computed from the token counts the provider reports and the price list recorded with the run, including where that list came from and when it was read. If a provider reports no usage, the cost of that answer is unavailable: it is not estimated into the result, and the summary says the total is incomplete.
The budget is enforced by scheduling: before each request the worker adds a worst-case estimate (estimated prompt tokens plus the full output cap, at the recorded prices) to the amount already spent and reserved, and stops sending requests when that would pass the limit. The output cap is enforced by the provider per request; the total is an estimate-based stop on our side, not a hard cap at the provider.
- The per-request output cap is the only limit a provider enforces. It is sent with every request.
- The run budget is a stop on our side, based on estimates. It keeps a run from continuing past the limit; it is not a spending cap at the provider, and a provider could bill differently from its published prices.
- When usage is missing, the reserved worst case is charged against the budget, so an unknown cost never makes room for more requests.
- For a hard ceiling, set a spending limit on the provider account itself.
Sealing and trust model
The implemented scheme is commit and reveal. Before a run, the challenge is serialized canonically, a 32-byte nonce is drawn from the platform's cryptographic random source, and the commitment is the SHA-256 of both under a fixed domain tag. Only the commitment and basic metadata (title, category, item count) are published. After the run, the payload and nonce are revealed and anyone can recompute the commitment.
What it shows
- The revealed challenge is exactly the one that was committed to. Questions and reference answers could not be changed after seeing the replies without breaking the commitment.
What it does not show
- That nobody read the challenge before the reveal. It is stored on the operator's server and the operator can read it.
- That a model has not seen similar questions. No encryption or hash can show that.
- That a saved response really came from the named model. The worker records what the provider returned; you are trusting the operator who ran it.
Scheduled opening
A challenge can carry an opening time. Until then the server refuses to reveal it. This is an operator-side release, not time-lock encryption: the content sits on the server in the clear the whole time, and a hash by itself locks nothing. Time-lock encryption against a public randomness beacon is not implemented, and nothing in the interface pretends otherwise.
Who sees what before the reveal
- Everyone: the commitment and metadata, and for a visible run, each saved response and its verdict.
- The session that sealed the challenge: the questions (they are about to be sent to model providers anyway).
- Nobody through the app: the grading rules and the nonce, until the reveal.
Hash formats
Canonical JSON, gats-canon/1, is RFC 8785 (JSON Canonicalization Scheme) on I-JSON values: keys sorted by UTF-16 code unit, no whitespace, strings and numbers written as ECMAScript does. Values with no single reading (NaN, undefined, lone surrogates, non-plain objects) are refused instead of coerced.
commitment = SHA-256( "gatslabs:challenge-commitment:v1" + "\n" + nonce_hex + "\n" + canonical(challenge) ) report hash = SHA-256( "gatslabs:report:v1" + "\n" + canonical(report) )
The challenge is a gatslabs.challenge/1 document, the report a gatslabs.report/1 document, and the file you download a gatslabs.export/1 envelope holding the report, its hash, the reveal (once there is one) and any recorded transactions. The reveal sits outside the hashed report, so a report hash anchored when the run ended stays valid when the reveal follows; the two are bound by the commitment inside the report.
Money in a report is whole nano-dollars and prices are whole micro-dollars per million tokens, so no hashed amount depends on floating point formatting.
Verification
The Verify page reads an export file in your browser and runs these checks, each with its own result:
- Size and schema: the file is within 2 MB and is a well-formed export whose rows fit together.
- Report hash: recomputed from the report and compared with the published one.
- Challenge commitment: recomputed from the revealed payload and nonce. Not available before the reveal.
- Grading re-run: every saved response is graded again with the revealed rule; verdicts, graders and reasons must match.
- Summary from rows: counts, accuracy, cost and latency are recomputed from the rows.
- Anchor payloads: the memo text listed for a transaction is the one this report produces.
A check that cannot run is shown as not run, never as passed. There is no single verified badge: a transaction existing, or one check passing, lights up nothing else.
pnpm verify:report gatslabs-run_….json # same checks, from a terminal # exit code 0: nothing failed · 1: a check failed · 2: file unreadable
Solana records
This deployment is configured for devnet. Development and testing default to devnet; mainnet-beta has to be chosen explicitly with NEXT_PUBLIC_SOLANA_CLUSTER and its own RPC endpoint. The active network is shown in the app header on every page, and the app never switches network by itself.
Anchoring is a single memo transaction to the SPL Memo program (MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr), built for and broadcast to the configured network only. The memo is short, versioned text:
gatslabs:v1:report:<run id>:<report hash, 64 hex> gatslabs:v1:commitment:<challenge id>:<commitment, 64 hex>
It holds no question, answer or key. Before you sign, the app shows the network, what the memo records, the fee reported by the node and your balance on that network. Your wallet then shows the transaction and you approve or decline it there. The app never asks for a seed phrase or private key and never sends a transaction by itself.
How a transaction is accepted
A signature is not trusted on sight. The server reads the transaction back and stores it with the record only if all of these hold:
- the RPC node is on the configured network (its genesis hash matches),
- the transaction exists and executed without an error,
- a memo instruction carries exactly the expected text,
- the stated wallet is among its signers,
- it is at least confirmed.
What a memo is
A memo records data with a signer and a time. It does not prove an answer correct, does not prove the evaluation was run as described, and enforces no protocol: no on-chain program checks anything. Its use is narrow and real: it shows that this hash existed, signed by this wallet, no later than that block.
Models and providers
Providers sit behind one adapter interface, on the server only. Three are integrated, and a provider is offered only when its credential is set:
- Anthropic: not configured on this deployment · 4 models in the catalog.
- OpenAI: not configured on this deployment · 0 models in the catalog.
- Vercel AI Gateway: configured on this deployment · 10 models in the catalog.
The catalog is a file, config/models.json. Anthropic identifiers and prices are copied from Anthropic's published pages (2026-11-25); gateway identifiers and prices are read from the gateway's public model list by pnpm catalog:sync (2026-11-25); OpenAI identifiers come from the account's own model list. No identifier is typed from memory, and a model without a recorded price cannot be run because its budget could not be enforced.
| Model identifier | Through | Input / MTok | Output / MTok |
|---|---|---|---|
| claude-opus-5-5 | Anthropic | $4 | $20 |
| claude-sonnet-5-5 | Anthropic | $2 | $10 |
| claude-haiku-5-5 | Anthropic | $0.1 | $0.5 |
| claude-fable-5-2 | Anthropic | $8 | $40 |
| anthropic/claude-opus-5.5 | Vercel AI Gateway | $4 | $20 |
| anthropic/claude-sonnet-5.5 | Vercel AI Gateway | $2 | $10 |
| anthropic/claude-haiku-5.5 | Vercel AI Gateway | $0.1 | $0.5 |
| openai/gpt-6.2-sol | Vercel AI Gateway | $2 | $10 |
| openai/gpt-6.1-terra | Vercel AI Gateway | $1 | $5 |
| google/gemini-4-neon | Vercel AI Gateway | $3 | $15 |
| google/gemini-3.8-flash | Vercel AI Gateway | $0.75 | $3.75 |
| mistral/mistral-large-4 | Vercel AI Gateway | $0.7 | $2.1 |
| deepseek/deepseek-v4.1-flash | Vercel AI Gateway | $0.3 | $1.2 |
| meta/muse-spark-1.3 | Vercel AI Gateway | $1.25 | $4.25 |
Listing a model here states that the lab can send it a request. It is not a partnership or an endorsement, and none is implied. Requests are plain, non-streaming calls with no fallback to another model: a reply comes from the model under test or the request is recorded as failed.
Simulations and examples
When no provider is configured, live evaluation is off and says so. To let the rest of the app be exercised, there are scripted stand-in models. They are not AI models: the worker hands each one the item being answered and it returns the reference reply or a scripted wrong, malformed or cut-off variant according to a fixed profile, with invented token counts, prices and latencies.
- The queue, retries, budget stop, grading, report, hashes and anchoring are the real code paths.
- A run uses stand-ins or real models, never both. Comparison pools them separately.
- Example records are simulations made at build time by
pnpm examples:buildand shipped with the app. They carry a yellow hatched label wherever they appear, and their export files say what they are.
Security
- Provider keys and the RPC URL live in server environment variables. The browser talks only to this origin.
- Runs of real models need operator access (a server-checked access code); guests are limited to simulations. Public listing needs operator access too.
- Private challenges and runs are served only to the session that created them; to anyone else they answer "not found".
- Every API input is validated against a schema, bodies are size limited, and creation, sign-in, estimates and the RPC relay are rate limited.
- Per run: at most 5 models, 4,096 output tokens per request, a budget of $1, 40 items per challenge.
- Model output and challenge text are rendered as plain text. Nothing a model writes is interpreted as markup or executed.
- The app fetches no URL supplied by a user. The RPC relay forwards a fixed list of methods to one configured endpoint.
- Reference answers never enter a client bundle, a public API response or a log line before the reveal.
API
JSON over HTTPS on this origin. Errors come back as { "error": { "code", "message" } } with a fitting status.
GET /api/status?network=1 what is configured, and whether the RPC node answers
GET /api/catalog models, prices and their sources
GET /api/challenges public challenges and your own
POST /api/challenges seal a challenge (generate or author)
GET /api/challenges/:id metadata + commitment; payload and nonce after the reveal
POST /api/challenges/:id/reveal owner only
POST /api/runs/estimate price a configuration, nothing is created
POST /api/runs create a run (returns at once; the worker does the work)
GET /api/runs/:id status, rows and summary
PATCH /api/runs/:id { "action": "cancel" } or { "action": "visibility", … }
GET /api/runs/:id/export the export file
GET /api/anchors?kind=&id= the memo text a record should be anchored with
POST /api/anchors submit a sent transaction for checking
POST /api/anchors/check check a transaction listed in an export fileRunning it
Evaluations never run inside a request handler. Creating a run writes durable rows and returns; a worker claims them one by one (FOR UPDATE SKIP LOCKED), so a run survives restarts and several workers can share a queue.
- Local development:
pnpm dev. With noDATABASE_URLan in-process PostgreSQL (PGlite) is used and the worker runs inside the dev server. - Production: PostgreSQL plus
pnpm workeras a long-running process (a VM, a container, any host that keeps a process alive) with the same environment as the web app. - Serverless host: a platform such as Vercel keeps no process alive. There the queue is worked through in bounded slices of at most 40 seconds that start after a response has been sent: when a run is created, each time an unfinished run is read, and from a scheduled call to
/api/cron/worker. No request waits on a model, and a run continues where the last slice stopped. For long evaluations, run the worker process on an always-on host against the same database.
The README in the repository has the full environment variable list and setup steps.