Back to articles

RevGuard Puts Version-Bound Contracts Around LLM Edits

3 min read

LLM agents can edit shared documents, but a natural-language request does not specify exactly what they are allowed to write. The workspace may change after an agent reads it, and a seemingly reasonable patch can overwrite another contributor’s work or exceed the requested scope. RevGuard, introduced in this paper, addresses that gap with a transactional editing process: compile an instruction into a contract tied to a particular document version, preview the proposed change, and commit only the exact state that was previewed.

How the protocol works

An LLM compiler proposes an edit contract, a separate LLM verifier reviews it, and a deterministic projection step enforces least privilege. The contract is immutable and version-bound. As a result, the system cannot silently apply the same authorization to a different document state; if the workspace no longer matches the contract’s version assumptions, the commit can be refused. The evaluation separately measures setup reliability, commit safety, and task utility, rather than treating a prevented fault as proof that the task was completed well.

What the experiments show

The authors ran 144 episodes on licensed LaTeX repositories that could be compiled. Every episode terminated, and no injected fault was committed. In 7 of 48 paired contracts, verification improved normalized authorization, with no observed loss of protection. Yet both verified and compiler-only contracts succeeded in 46 of 48 episodes. The study therefore did not establish a task-utility benefit from verification, and strict non-inferiority remained unresolved.

A descriptive cross-model stress test covered 900 cells. Contract protocols committed no faults, while unmanaged patching baselines each committed more than one hundred. Safe whole-file replacement completed fewer than five percent of tasks. In another comparison, Git three-way merging produced 176 clean merges in 180 episodes but still committed 123 controlled faults. A clean merge, the results suggest, is not the same as a safe edit. The stress-test finding also has caveats: one fail-closed setup left the test inconclusive, and a versioned repair passed only targeted compatibility tests.

Why it matters—and what it does not prove

RevGuard’s contribution is not a way to determine whether edited text is true or semantically sound. It makes write scope and commit conditions explicit and enforceable. That could offer a clearer safety boundary than relying on prompts or merge behavior alone when agents make localized changes to collaborative documents or repositories. But the evidence covers controlled faults in a specific LaTeX setting. It does not show that RevGuard prevents every kind of error, improves editing quality, or guarantees factual accuracy.

Hugging Face Daily Papers

Comments

Checking sign-in status...

Loading comments...

Related articles