# che.sh

> Anonymous decision trees you can curl. Draw one in the browser, send it text or a photo, and get an answer, a confidence, and the path the tree took. Nothing you send to your own trees is kept (runs on che.sh's demo checks are logged for the public benchmarks at https://che.sh/models). Decisions run on [rvbbit](https://rvbbit.ai) decision trees in Postgres/SQL, using Jev models via OpenRouter.

che.sh is a front door to rvbbit. The web canvas at https://che.sh is a nearly blank black stage: double-click to ask a question, wire ways out to answers, type below, and watch a sample flow through the tree with live scores. The same trees are plain HTTP from a terminal.

Quick start:

    curl che.sh/demo -d "you charged me twice, fix it"
    curl che.sh/5gs8g -F image=@lunch.jpg
    curl che.sh/<tree> -H 'Accept: application/json' -d "..."
    curl che.sh/<tree>                                      # what the tree asks
    curl che.sh/<tree> --data-binary @dog.jpg -H 'Content-Type: image/jpeg'
    curl che.sh/<tree> -F image=@dog.jpg -F text="a caption"

A POST body can be raw text, `application/json` with a `text`, `input`, or `q` string, or a form field of the same names. Images: jpeg, png, webp or gif, up to 2 MB. Optional caption via `-F text=`. Browsers and link previews get the HTML canvas; curl and similar tools get plain text; add `Accept: application/json` for JSON.

A successful answer looks like:

    → refund review   0.98
      What does the customer need help with?                    billing 1.00
      Does the customer believe they were charged incorrectly?  yes 0.98

JSON includes `ok`, `label`, `confidence`, `path` (each step's question, route, score and threshold), `model`, `steps`, `ms`, and `cost_usd`. Demo trees may also set `cached: true` (remembered by fingerprint, never the input). Photo calls add `image: {w, h, bytes}` — the pixels are not kept.

Create or edit trees in the browser, or POST JSON to `/api/trees` (`{doc, title}`) to claim a URL and receive an `edit_key`. Send that key as `X-Edit-Key` to `PUT /api/trees/{slug}` to update, or to `GET /api/usage/{slug}` for call counts (counts and cost only, never inputs). To fork someone else's tree, `GET` its doc and `POST /api/trees` with a copy: you get a new slug and your own key. The `doc` is a small JSON tree: `{v: 1, root, nodes}`. Nodes are `ask` (a question with 2–8 ways out and a threshold), `extract` (fields to find, then found/missing), or `answer`. Limits: 40 nodes, 8 questions deep, questions up to 400 characters, answers 120, input 4000 characters, images 2 MB. Full schema and examples: [llms-full.txt](https://che.sh/llms-full.txt).

Extract steps are public (no key or URL switch): hover an answer and choose `⌗ find`, then list what to find in plain words, e.g. `the business name, loan amount, ?collateral`. The editor normalizes names/types; add `: number`, `: text`, `: date`, or `: list` to override the guessed type. Found values go in per-run `variables`; later questions and answers can use `{loan_amount}`. Any required field that's missing or unsure takes the **missing** branch (its names are `{missing}`); `?` makes a field optional. Clairic reads text/pasted HTML only (4000 characters, raw markup included). At most 12 fields/step, 4 extract steps/tree, within the existing 40 nodes/8 levels. Dates have no assumed reference date. Bool isn't supported yet. Extract responses include ephemeral `variables`, `extractions` (values, missing names, time, cost), and `extract_cost_usd` in addition to decision cost. Found values are never persisted in caches/logs. Compare reads a shared extraction prefix once, then compares decision models on those same fields. The SQL button turns extract steps into plain rvbbit SQL too: one `rvbbit.clover_extract_fields` CTE per step, a `CASE` for found/missing, and `replace()` for `{placeholders}`, feeding `rvbbit.decision_tree`. Full schema below.

Demo checks (the trees in the sitemap) are the exception: their runs are logged for the public benchmarks: model, each step's route, confidence, time and cost, and the answer; text typed into a demo on che.sh is kept 90 days; files, captured pages, photos, curl and extension runs on demo checks keep numbers only; demo checks answer fresh (no repeat cache). For every other tree: documents and found values are never kept (images neither; OCR'd page images are read in memory and discarded). We count calls per URL, not words. Ordinary demo trees may remember a static answer by a hash of the request so repeats are free. Extract trees never persist run outputs. Shares omit found values and filled-in questions by default; sharing the text input explicitly also permits filled-in results, never photos. Field-value maps are never shared.

Be gentle. Too many calls too fast returns 429. Ordinary trees will look at about 10 pictures a minute and 100 a day; demo trees allow about 40 a minute and 200 a day. A popular tree may say it has answered enough for today. If the site's treat budget is spent, the cat naps (503) until tomorrow or the 1st of the month. Words still work when images are paused. You can claim a modest number of new URLs; if the shop is busy, come back tomorrow.

In the browser, a quiet compare toggle (off by default) runs several decision models on the same input. Cards show each result, time and cost; a gold "best" is the Pareto pick on time vs cost among models that agree with the majority, or, when the input has a known answer, among the models that got it right. Click a card to see that model's path. This is a web UI feature — curl always uses the latest Jev (currently `typesafe/jev-1.14`). You can share a compare as a short read-only link `https://che.sh/c/<id>` (the input is not saved unless you tick the box; photos are never saved). Viewing a share never calls a model; `curl che.sh/c/<id>` prints a summary.

Known answers: a tree's owner can mark the right answer for one exact input (hover the result, `mark right`). che.sh keeps only a keyed fingerprint of the input, a hash of the tree's routing and the answer node, never the text or photo; editing a question, threshold or way stops old marks from matching. When a run matches, the browser shows a quiet ✓ or ✗, compare picks its best among the correct models, and JSON responses carry `known_answer: {correct, expected}`. Every demo sample has one, marked by us, and [che.sh/models](https://che.sh/models) scores the decision models on them (`curl che.sh/models`, JSON at `/api/scoreboard`).

The SQL button on the canvas shows the equivalent rvbbit SQL (`rvbbit.branch`, `rvbbit.choice_branch`, `rvbbit.leaf`, and `rvbbit.decision_tree`) so you can run the same tree over your own rows in Postgres. See [rvbbit.ai](https://rvbbit.ai). Judgments are model guesses, not facts. che.sh is free.

Whole pages: send a saved web page as HTML and che.sh turns it into compact markdown before the tree reads it, keeping what an extract step needs: title, URL, meta/Open Graph tags, JSON-LD and microdata (e.g. a product's price and rating), prices seen on the page, headings, lists, tables (two-column tables become `key: value` lines) and the main text, with navigation, footers, scripts and styles dropped. `curl che.sh/<tree> -H 'Content-Type: text/html' --data-binary @page.html` (up to 2.4 MB of HTML, converted to at most 16,000 characters). `POST /api/page` returns just the markdown so you can see what a tree would read. The converter is deterministic (no model), runs in memory, never fetches URLs, and never keeps the page. The che.sh browser extension's "Send page to che.sh" and "use page" use the same converter.

Which tree? `POST /api/suggest` with `{input, trees: [up to 10 ids]}` scores each tree's fit (0-1) with one cheap Jev call and runs nothing; the che.sh extension (v0.3) reads the page you are on while its side panel is open and lists the top ones as checks to click. `POST /api/suggest/feedback` with `{kind: page|text|image, trees: [{id, p}], picked: id|null}` records which suggestion was clicked (ids and scores only, no content or URL; kept 90 days) so detection can be measured. Trees have an optional one-line public description (`description` on `POST`/`PUT /api/trees`), which the scorer reads.

Chaining: an answer that names a tree (`→ 8fzct`, `che.sh/8fzct`) runs that tree next on the same input, up to 3 more trees and no repeats; JSON shows each hop under `follow` with total cost and time. `?follow=0` stops at the first tree.

## Docs

- [Full reference](https://che.sh/llms-full.txt): tree JSON schema, every public endpoint, curl examples, and real responses
- [Docs](https://che.sh/docs): same as the full reference
- [OpenAPI](https://che.sh/openapi.json): machine-readable description of the public HTTP API
- [Model scores](https://che.sh/models): decision models scored on the demo samples' known answers
- [Learn](https://che.sh/learn): short notes on decision models, classifying text in SQL, and extract-then-decide
- [Decision models vs. chat models](https://che.sh/learn/decision-models-vs-chat)
- [Classify a million rows in Postgres](https://che.sh/learn/classify-a-million-rows)
- [Extract, then decide, then route](https://che.sh/learn/extract-then-decide)
- [Learn feed](https://che.sh/learn/feed.xml): Atom feed of the notes
- [Status](https://che.sh/api/status): whether the cat is awake, size limits, and the current demo slugs
- [Briefing](https://che.sh/): `curl che.sh` (plain text) or open the canvas in a browser

## Demo trees

- [Refund triage](https://che.sh/demo): a billing / scheduling / human split. Try `curl che.sh/demo -d "you charged me twice, fix it"`
- [Is it a hot dog?](https://che.sh/5gs8g): one lonely dog, or a whole tray. Send a photo. Also at `/hotdog`
- [Inbound lead router](https://che.sh/hha7a): who gets a call today, who gets a kind no
- [The White Rabbit's calendar](https://che.sh/5b9n7): should this meeting have been an email?
- [Expense receipt check](https://che.sh/gxgzg): snap a receipt, the cat reads the policy (photo)
- [SBA loan intake](https://che.sh/8fzct): paste an application email; an extract step reads the fields, then 4-6 levels route it: ineligible decline, missing docs, microloan / SBA Express / 7(a) / 504 fit, risk queues. Illustrative screening, not lending advice. Also at `/sba`
- [SBA intake: files](https://che.sh/4thve): drop a loan packet (PDF, spreadsheet, CSV, Word, or a scan or phone photo read by OCR); one extract step cross-checks the documents, then the same program routing. Fictional documents. Also at `/sba-files`
- [Which demo? (router)](https://che.sh/82vg9): one question routes any input to the right demo above, then runs it (answers like `→ 8fzct`). Also at `/router`
- [Product page check](https://che.sh/p4dw9): send a shop product page (Amazon or any store) from the extension, or curl a saved page as `text/html`; an extract step reads name, price, rating and review count, then says whether it's well reviewed. Also at `/product`
- [Is this email or text a scam?](https://che.sh/kek4b): paste an email or text; an extract step reads who it claims to be from, the sender, links, what it asks for, payment and pressure, then one question sorts the kind (account alert, delivery/toll, prize, urgent favor, bill, code/receipt, newsletter) and one check per kind says looks fine, be careful or scam, with the reason. Made-up samples; illustrative, not security advice. Also at `/scam`
- [Example compare](https://che.sh/c/e5ba6983): five decision models vs one hot dog

## About

- [rvbbit](https://rvbbit.ai): the Postgres/SQL decision-tree engine behind che.sh
- [Datarabbit](https://datarabbit.com): the studio that makes che.sh
- [@ryrobes](https://x.com/ryrobes): Ryan Robitaille

Files (browser editor): drop or attach documents on a tree with an extract step, e.g. [SBA intake: files](https://che.sh/sba-files). Text-layer PDF, DOCX, XLSX/XLS/ODS/CSV and plain-text formats are read in your tab; only the extracted text is sent (up to 16,000 characters). Scanned PDF pages and photos of documents (jpeg, png, webp) are read with OCR: the browser renders each page to an image and sends it to `POST /api/ocr` on che.sh, where a small CPU OCR model (RapidOCR, PP-OCR English) reads it in memory and the image is discarded after reading. Nothing is written to disk or logged; the text comes back to your tab, marked "read by OCR" with a confidence, and joins the packet. Limits: 5 OCR pages per packet, 12 a minute and 60 a day per visitor, a site-wide daily page cap, 2.5 MB / 20 megapixels per page, 20 s per page.

Browser extension (Chrome, v0): select text on any page, right-click "Send to che.sh", and a side panel runs it through a tree (default: the SBA loan intake demo), shows answer, confidence, path, found fields and cost, and keeps a local table you can export as CSV. It calls the same public POST endpoint, sends text only when you press run, and keeps rows in the browser. Install: https://che.sh/extension. Privacy: https://che.sh/extension/privacy.

## Benchmarks
https://che.sh/models ranks decision models on the demo checks' canon samples (inputs with a hand-marked right answer): share right with a Wilson 95% lower bound, p50 time and cost per run, cost per right answer, checks x models, and per-question reach, disagreement and misses. Only canon samples on each check's current routing count, tallied per sample (adding samples never resets a check; a changed sample restarts only that sample; a routing edit restarts the check); cache hits are excluded. JSON: `curl che.sh/api/scoreboard`; text: `curl che.sh/models`.
