Articles

What did the AI change in the map? Edits item by item instead of a rewritten file

When a language model refines a map, it usually returns the whole project again, and there is no way to see what exactly it rewrote. In PlyLoom 0.10 edits arrive as a list: each one is shown on its own, you accept the ones you want, leave the rest aside, and a single Undo takes everything back.

A whole file means trust on hope

Until now, working with an AI on a finished map went like this: attach the project to the prompt, ask for changes, and get the whole project back. Opening that file replaces the map entirely. If the model lost a couple of nodes on the way, shortened a quotation or “fixed” an attribute nobody asked about, you would notice only by chance. On a large JSON this happens more often than one would like.

The problem is not the model but the shape of the answer. A full file is a snapshot, while what we need is the difference: what to add, what to change, what to remove. So PlyLoom 0.10 tells two things apart.

  • A package is a .plyloom file, a full snapshot of the project. You keep it, send it to colleagues, put it in a repository. A map made from scratch still arrives as a package.
  • An increment is a list of edits to a known version: add a node, change a field, connect, remove from a sheet. Refinements arrive like this.

Edits from others never enter the project by themselves. They pass through one and the same review screen, whether they come from an AI or from a colleague’s file.

What it looks like

In Help → Working with AI, choose “Refine the open map” and “An AI chat” — the button copies the prompt together with the project — whole, or one sheet with its neighbours — and asks the model to return a list of edits only. The model cannot lose what it did not touch, and the answer is shorter.

The Working with AI page: what is open, the switches What we do, Worked on by, The AI gets, and the exchange scheme labelled whole, a part, changes only
The exchange scheme: what is open, what goes to the chat, who works, what comes back and what you end up with. Here a part of the map — a sheet with its neighbours — goes out, and only changes come back.

The chat’s answer is pasted as it is with Project → Paste an AI answer…: text around the JSON and ``` fences do no harm. If the model returned the whole project after all, PlyLoom compares it with the current one and shows the same list.

The review screen: items grouped by sheet, a changed text shown word by word, a conflict left unticked
Edits are grouped by sheet. The first item is a conflict: the model expected different text, so it is not ticked.

Each item is one edit with a clear meaning:

  • + adds a node, a relation or a sheet, ~ changes, − removes. A changed text is shown word by word: what goes is struck through, what comes is highlighted.
  • A conflict means the edit expects one value and the project already holds another. Such an item starts unticked: you can replace the value, but only on purpose.
  • An error means the edit does not fit the project: no such sheet, an unknown type, a text that is too long. It cannot be ticked.
  • An item that needs another one — a relation to a new node, a node on a new sheet — does not apply without it, and the number of the needed item is shown.

Whatever is ticked is applied as one step, and what is unticked is rejected. To decide later, press Later: the list waits in the bar at the bottom of the screen and opens again with the same ticks.

Applied edits are not final at once — they stay marked, like tracked changes in a text editor. New nodes are outlined in green and changed ones in amber. They may be on any sheet: the ‹ › arrows in the bottom bar visit them one by one. For a selected node the properties panel says what was done to it and offers Accept and Reject. For all of them at once there are Accept all and Reject all in the same bar; rejecting brings removed items back too and leaves your own edits made since untouched.

A sheet after applying edits: the new node is outlined in green, changed ones in amber, the marks bar at the bottom
After applying you see at once where the edits went.
The bar of the edits at the bottom of the screen and the properties panel of the selected changed node with Accept and Reject
At the bottom, the bar of these edits: Accept all, Reject all, ‹ › through the changed nodes and the list of what was removed. On the right, a decision for one node.

Comparing two files

The same screen opens from Project → Compare with a file… and from the preview that opens a .plyloom, which now has a Compare with current button. The comparison goes by meaning, not by lines: nodes, texts, attributes, relations, sheets and dictionaries. Moved cards do not clutter the list; tick Bring card positions too when you need them.

Comparing with a colleague's copy: the header says both sides changed after the common version; one edit is a conflict, the other is ticked
A colleague's copy that both of you edited after the common version: only their edits are listed, and what you changed too is a conflict.

Models sometimes renumber IDs. A node with another ID but the same type and name counts as the same node, and a relation as the same relation by its ends and type. Without that, any renumbering would look like “delete everything and add it again”.

Versions without history

Every Download .plyloom writes the fingerprint of the version into the file — 12 characters computed from the content — together with the fingerprints of the versions it came from. Fingerprints only: earlier content never goes into the file, so a paragraph you deleted does not travel with the map to whoever receives it.

From the fingerprints PlyLoom tells what has arrived: a continuation of your version, an older copy, or a copy edited alongside yours. The last case needs the common version. Its content is kept only in your browser — the last eight versions you opened or downloaded. When it is there, only your colleague’s edits are listed, and whatever you changed too is marked as a conflict. When it is not, the differences mix both sides and removals start unticked, because they may be your new nodes.

How it was checked

Besides the usual tests, comparing was checked on random edits of the training maps: renames, texts, attributes, new and deleted nodes, relations, sheets, the order of tabs. For every set of edits, the list PlyLoom computes has to turn one map into the other and back with nothing left over, and in a merge conflicts may appear only where both sides touched the same thing. These checks found and closed a few subtle places — for example, keeping a node’s main sheet and the order of tabs.

What else is in 0.10

  • The application file is lighter: 2.76 MB instead of 3.18, 1.56 MB compressed. Help pictures are no longer parsed as code at startup, so the canvas appears sooner.
  • React is the only third-party code left inside the file, and the build downloads no packages.
  • Fixed: word forms in counters, an outdated line legend and the toolbar on narrow phones.

The full list is on the What’s new page.

Screenshots are from version 0.10.0 on the training map “Software: report export”; the edits in them were made up for the illustration.

Read next