Kanji, a New Kind of Model

Kanji reads a conversation, a document or a broadcast's transcript once, as it arrives, and keeps a table of what matters in it up to date: who and what is in it, and every value as it changes. It writes no text of its own.

Engraving of the characters 漢字 drawn as islands of rock and bonsai, with waterfalls, a pagoda and a still lake below.

Demos

Watch it read bring your own schema

Kanji reading as it happens, each time with a schema written for the stream: the types and fields it should keep. The incident channel, the org chart, the cabin weekend and the tabletop game are conversations written for these demos; the others are public material, credited under each video.

Use cases

Where it fits the same model, a different schema each time

Wherever a stream says what changes, Kanji can keep the table. A few of the places it fits, with the demos that show them.

  • Agent memory

    A long agent session, kept as a table that never grows.

    Watch

  • Support and sales calls

    A customer’s record that fills itself as the call goes: the issue, what was promised, the next step.

  • Service assistants

    What the customer wants, kept through every change of mind.

    See the dialogue benchmarks

  • Incident channels

    Services, owners and status, kept current as people type.

    Watch

  • Team and group chats

    Plans, tasks, costs, and who is doing what.

    Watch  ·

  • Reports, filings and papers

    Companies, figures and events, each with the sentence it came from.

    Watch  ·  ·

  • Live broadcasts

    Scores, plays and market moves, as they are called.

    Watch  ·

  • Games

    Characters, hit points, loot and clues, as the table plays.

    Watch  ·

  • An NLP suite

    Entity extraction, slot filling, intent detection, relations and classification.

    See the benchmarks

A new kind of model

A System 1 State Model state from a stream

Psychologists call the fast, automatic way of thinking System 1: reading a face, a sentence or a scoreboard at a glance. Language models today work the slow way: they write out every answer a token at a time, and the usual way to keep track of something with one is to have it write it all out again. Kanji is a System 1 model. It reads each line once and its table follows: new people, things and events are added, values change, and what has ended is retired. Each change comes with a probability and points back to the words it came from.

  • 0tokens generated: every value is read from the text or chosen among your schema's options, never written
  • 157 msto read a line and update the table, on the mean, on an M4 Max; 72 ms the median
  • 1M tokensread with memory flat: it carries the table, not the transcript
  • Yourschema: the types and fields you care about, given at run time

What it gives you

A table, kept current
The objects your schema names (people, tasks, orders, plays, attacks) with their fields, from a name or a number to a choice or a link between two objects. As the text goes on, Kanji adds them, changes their values and retires what has ended.
Patches, not prose
Every change arrives as a small patch: create, set, retire. Apply them in order and your table matches the text so far, with nothing to parse.
Evidence on every value
Each value points back to the words it was read from, so you can show it, check it and trust it.
A probability on every change
Act at once on the sure ones and send the rest for review.
Changes of mind
When the text later says otherwise (“actually, make it Friday”), the value changes with it, and the old one is kept in the history.

Against the generative alternative

Reading against writing

The usual way to keep a state with a language model is to have it write the state out: after each message, the whole table again. Every update then costs seconds, grows with the state, and can carry values nobody said. We gave Kanji and its own backbone, the generative model it is built on, the same 148 lines of an incident channel written for the demo, on the same machine, scored by the same count.

Field F1 against the channel's gold tablehigher is better
  1. Kanji0.582
  2. Its backbone, a sliding window0.583
  3. Its backbone, the whole conversation0.335
Time to update after each line, mean, mslower is better
  1. Kanji157
  2. Its backbone, a sliding window1,868
  3. Its backbone, the whole conversation1,692
  • Kanji
  • its generative backbone, writing the table after each line
  • 23 sfor Kanji to read all 148 lines, handed to it at once
  • 4 min 10 sfor its backbone to do the same with the whole conversation, ten times as long

The backbone writes the same table after every line: as function calls with the whole conversation in its context, or as JSON with a sliding window over the conversation. One run each, read once, on an M4 Max; the race's video shows the whole-conversation run. Field F1 counts every field of every object in the table after each line against the gold table. A development measurement, as is everything on this page.

How it compares

KanjiA generative model writing the stateMemory layersTrackers built for one task
Each updateone read of the new linethe whole state written out againthe new text indexed or summarizedone read of the new turn
Timeabout 0.1 to 0.25 s a chat line, longer for a long paragraphseconds, growing with the statea model call to summarize, a search to recallfast
Valuesread from the text or chosen among the schema's options, each with its wordswritten, so they can include what was never saidpassages or facts, found by searchread, for the slots it was trained on
Schemayours, given at run timeany, in the promptnonefixed: a new one means retraining
Long streamsa bounded table, memory flat over a million tokensa growing context, or a window that forgetsa store that grows with the streamone dialogue at a time
Confidencea probability on every changenone per valuea similarity score per passagea score per slot

Benchmarks

Where it stands, in development

Measured with the model as it stands: on development sets, and for dialogue on the standard test sets, beside a leading published tracker on each.

Long streams, field F1higher is better
  1. 59 streams of up to 32,000 tokens, each with its own schema0.755
  2. the 18 of them on schemas it never trained on0.715
  3. a held-back set, read once0.752
Documents, field F1higher is better
  1. 50 non-fiction texts0.462; its two independent gold tables agree at 0.802
  2. company filings0.540; its two independent gold tables agree at 0.837
  3. coding sessions0.450; its two independent gold tables agree at 0.883
  4. research papers0.369; its two independent gold tables agree at 0.762
Schema-Guided Dialogue, test, joint goal accuracy, %higher is better
  1. Kanji, not generative76.8
  2. SDT, a T5-XXL fine-tuned for it, generative88.8
MultiWOZ 2.4, test, joint goal accuracy, %higher is better
  1. Kanji, not generative61.4
  2. MetaASSIST, a tracker trained for MultiWOZ, not generative80.1
  • Kanji
  • a leading published tracker trained for that dataset
  • two independent gold tables of the same documents, scored against each other
  • 0.1–0.25 sto read a chat line and update the table, on an M4 Max; a long paragraph takes longer
  • +0.56 MBper 100,000 tokens read: memory flat over 1.04 million tokens

Field F1 compares every field of every object in Kanji's table with a gold table after each line. Each document has two independent gold tables: Kanji's number is the mean of its scores against the two, and the tick marks how far the two agree with each other, scored the same way. Joint goal accuracy is the share of dialogue turns in which every slot of the state is right. SDT (Gupta et al., 2022) writes the state out as text, prompted with a hand-written example dialogue per service and reading the whole dialogue again at every turn; MetaASSIST (Ye et al., 2022) picks each slot's value from a list made for MultiWOZ in advance, trains on its corrected validation set, and reports the best of three variants. Kanji reads each turn once, with the schema it is given at run time.

Early access

Kanji isn't released yet

Join the waiting list to hear when it is, and to try it on your own streams.

Click outside the video to close