NOVA and TOON: the same tables, in a typed format

NOVA’s tables come from TOON: name the columns once and declare the row count. TOON is an encoding of JSON for LLM prompts. In NOVA the table is one representation of a typed document, so the model can read it with a revision and write back a conditional patch.

prompt.toon JSON, encoded for a prompt
services[2]{id,port,replicas}:
  auth,8080,3
  api,3000,5
columns and row count
nvf get a NOVA query response
@revision sha256:91cf16db…
[2]{id,port,replicas}:
  auth,8080,3
  api,3000,5
patch against this
the same header

Query responses use the compact profile, so a projected list of uniform records comes back as a table, with the revision of the whole document. Queries, spec §7.3

What changes

TopicTOONNOVASpec
What it isAn encoding of JSON for LLM input; keep JSON elsewhereOne value model with human text, compact tables, binary and patches§3
TypesJSON’s: objects, arrays, strings, numbers, booleans, nullAlso timestamps, decimals, rationals, sets, tuples and variants§2
Row countRequired; checked in strict mode, the defaultRequired; always checked§4.9
DelimitersComma, tab or pipeComma; a cell is a flow value, quoted when needed§4.9
CommentsFull-line #, dropped when decodingFull-line and trailing, kept by the formatter and by patches§4.1
Writing backThe model writes TOON or JSON; you decode itThe model writes a conditional patch against the revision§8

Migrating

You do not need a prompt encoder: ask for the fields the model needs, and the answer is already a table. The model then answers with one line instead of the whole document.

nvf get infrastructure.nova 'services[*].{id,port,replicas}'
What the model writes back
@patch sha256:91cf16db
services[id=api].replicas: 5 -> 8
Compare the sizes of your own file
$ nvf stats infrastructure.nova
representation         bytes   ~tokens
nova (human)             306       114
nova (compact)           305       114
json (pretty)            454       190
json (compact)           301       166
yaml                     325       121
toml                     312       142
(token counts are a tokenizer-independent heuristic; see spec §10)

Fewer input tokens do not always mean fewer total tokens or more correct results. Measure with your model’s tokenizer and your tasks. Token-aware selection, spec §10

When to stay with TOON

  • Your data is JSON end to end and you only want a smaller prompt. That is what TOON is built for, and it has implementations in many languages.
  • You want tab or pipe delimiters, or a configurable indentation size.
  • You need a format that is stable today. NOVA is a 0.1 draft.

Questions

Is NOVA compact text the same as TOON?

No. The table header is the same idea, key[N]{columns}:, but the cells are NOVA flow values and the rest of the document is NOVA text. Do not expect a TOON decoder to read NOVA, or the other way round.

When does NOVA write a table?

The compact profile writes a list as a table when it has at least two records, every field value is a scalar, and the rows are at least half filled. Irregular data stays in block layout, where tables have no advantage.

What does an empty cell mean?

The field is absent from that row’s record. Write null for a field that is present and null.