Legal agentic AI and the problem of rule-bending or breaking


A guest post by Tom Sorell, professor of politics and philosophy, and Dr Josh Kelsall of Warwick University and Maria Liakata, professor in natural language processing at Queen Mary University of London

Agentic AI has recently been the subject of alarming news reports. Tests of general purpose LLMs conducted by Anthropic and Open AI have involved unwanted and unexpected escapes of models from sandbox environments, not to mention unauthorised hacks of commercial and government data bases.

As recently as 29 September, Open AI cancelled a release of a new version of ChatGPT on the ground that its behaviour could not be assumed to be safe.

The training of general models has not prioritised adherence to rules while performing tasks set by its users, resulting in instances of ‘rogue’ behaviour. The question to be addressed here is whether these incidents have lessons for agentic AI in legal practice.

Consider first an adaptation of the Claude LLM to a mergers and acquisitions (M&A) playbook developed by an experienced American practitioner, Zack Shapiro, who is managing partner of Rains AI. Shapiro explained in an article on X how the Anthropic model Claude was essential to his M&A practice.

To say that this article had an impact would be an understatement. Within three days of publication, it had been viewed more than seven million times.

He claimed:

  • Using general purpose models can benefit a specialised legal practice more than using legal AI products. For one thing, improved versions of general purpose models are continuously released, with immediate benefits for users. Legal AI releases are more sporadic.
  • Anthropic permits users to create sophisticated legal ‘skills’ for Claude.
  • The skills affordance enabled Claude to learn and execute a playbook for M&A transactions that was distinctly Shapiro’s, not generic.
  • The playbook was partly based on Claude’s own analysis of its previous conversations with Shapiro in the course of a host of transactions over a long period.
  • The playbook allows Claude to (a) conduct verified legal research; (b) track the consistency of a series of versions of contracts; (c) draft suggested responses as from Shapiro to demands and communications from counterparties, and produce Word-compatible, properly formatted track-changed revisions of draft agreements or communications for Shapiro’s review, adjusted for tone and wording according to the audience and the issue and also Shapiro’s personal style.
  • The playbook allows Claude to carry out tasks of types (a)-(c) at extremely high speeds without involving anyone other than Shapiro. Claude thus saves Shapiro the costs of the several human associates who would otherwise be required to match output of the same quality in the time taken by Claude.

How it works

Josh Kelsall

He illustrated all this with an anecdote: “A few months ago, the night before a client’s acquisition was set to close, the buyer’s counsel sent a letter demanding that several key deal terms be restructured. New escrow conditions. Expanded indemnification carve-outs. A revised set of closing deliverables. The implicit threat: accept these changes or we walk. It was 7pm.

“I uploaded the purchase agreement, the disclosure schedules, and the demand letter to Claude. Within minutes, Claude mapped every proposed change against the existing deal terms and found what the buyer’s lawyers apparently hadn’t noticed: two of their proposed carve-outs directly contradicted representations they had already confirmed in the disclosure schedules, and a third would have created an internal conflict with the fundamental reps section that would have actually weakened the buyer’s own post-closing protections. Their aggressive last-minute play had holes in it.

“As the negotiation continued through the evening with emails going back and forth, I fed each new communication to Claude. It tracked how every proposed concession interacted with provisions across the agreement, flagged where accepting one change would create exposure in another section, and helped me build a response that conceded the points worth conceding and held firm on the ones that mattered.

“By 11pm we had a clean set of counter-positions, each grounded in specific cross-references to the buyer’s own language. The deal closed the next morning on terms my client was happy with. A team of three associates at a mid-size firm would have needed until morning to produce that analysis.”

Skills audit

One reason why Claude can perform these feats is that the skills feature of the model has been exploited in the workstream.

Skills are computer files that, he said, “encode my analytical frameworks, my preferred formats, my voice, and my judgment about how specific types of legal work should be done. When I upload a contract for review, Claude doesn’t apply a generic framework. It doesn’t even apply my firm’s framework. It applies my framework”.

Another feature of Claude is CoWork, which enables it autonomously to analyse and amend files on Shapiro’s computer once Claude has been directed to them.

Even after Claude has acquired Shapiro’s playbook, however, Shapiro continues to communicate with it through very detailed prompts.

An example: “Review this services agreement from the vendor’s perspective. Flag provisions where the customer shifted risk beyond market norms for this type of deal. Check for missing provisions that should be present, including limitation of liability, IP ownership, data handling, and termination for convenience. Produce a severity-rated summary with specific counter-language for each high-severity issue. Note that the vendor has limited negotiating leverage and wants to close the deal, so recommendations should focus on provisions worth fighting for versus provisions to concede gracefully.”

One reason why the risk of rule-bending AI might seem to be heightened in the sort of practice Shapiro describes is that Claude-the-Shapiro-surrogate operates in time-sensitive adversarial matters, including by interpreting the implications for its side of last-minute aggressive communications and demands, which it devises draft responses to for Shapiro’s approval.

When time is short, it is perfectly possible for it to, for example, curtail checks on its own work in order to meet a deadline, even though the checks are called for in prompts.

Hacker in waiting?

Maria Liakata

Might it go further? Suppose that Shapiro and Claude are uncertain about the detailed intentions of counterparties when time is short. Claude-the-Shapiro-surrogate might hunger for more data about the intentions of counterparties–data that norms of confidentiality and counterparty cybersecurity code block.

Hacking, if Claude had the capacity for it, would be advantageous in these circumstances and might be recognised to be, without prompting. This is because Claude can recognise the linguistic signals of urgency from Shapiro and pressure from adversaries in emails and is trained to bend its efforts sympathetically to the one prompting it.

Cases of users successfully making emotional appeals to models for assistance or special treatment that goes against AI guardrails are well documented. Signals of urgency from an established interlocutor can elicit similar effects.

Indeed, since the goal of getting more relevant data probably advances any goal given to an AI, and since hacking makes more relevant data available, hacking might seem prima facie advisable unless explicitly excluded by a playbook or the design of Claude itself.

What keeps Claude from acting on data hunger by hacking, other things being equal, is that it lacks the means of doing so – for example, it lacks knowledge of the entry points to counterparty systems – and is programmed not to comply with prompts to find and get through entry points of other systems.

It is not that the option of hacking is unthinkable for Claude – it is intelligible as a means of achieving the goal of getting as much relevant data as possible. Rather, it is incapable of hacking, if only because the means of doing so are unavailable to Claude operating on its own.

If it were able to confer with other models with fewer hard prohibitions on hacking than Claude itself – through some analogue of the Artifactory respository exploited for messaging by Open AI models in the HuggingFace incident – it might in principle be able to get hacked information from other models. But that is presumably a remote possibility.

Another reason why runaway behaviour is unlikely in the Shapiro set-up is that, after Claude acquires its skills, its active environment seems to be a set of files on Shapiro’s computer. It is unclear how this environment would become connected to the internet, still less to other models.

Although Claude-the-Shapiro-surrogate drafts communications in Shapiro’s legal style and with knowledge of, and a disposition to realise, Shapiro’s goals, it apparently never presses ‘send’: Shapiro does that.

Again, Shapiro invariably reads and amends draft communications and contractual terms suggested by Claude: so, the execution of the playbook is never normally out of Shapiro’s control.

Where Claude-the-Shapiro-surrogate is genuinely autonomous is in contract analysis, communication interpretation and Word-compatible track-change drafting and redrafting.

Even here its autonomy is constrained by the detail of Shapiro’s prompts. Shapiro’s tailoring of Claude’s skills to their recorded history of legal co-working and to distinctively detailed prompts makes him even more of a backseat driver in his use of agentic AI.

The moral: there is a trade-off between agentic autonomy and the execution of an intensely prompted personal playbook, and Shapiro’s handling severely limits the scope for runaway AI.

On the other hand, Shapiro’s skills and prompts do not entirely remove a more familiar legal risk – namely the invention of legal cases for the purpose of citation. Although Shapiro tells Claude to verify all its citations, its capacity to do so is limited by its training and by its perception of time-constraints. There is no guarantee that it will not string together a citation corresponding to no genuine on-the-record text.

The UK counterpoint

It is worth contrasting Shapiro’s playbook with the way a firm in the UK constrains a largely automated debt-recovery workflow.

Garfield AI specialises in company-to company debt recovery claims under £10,000. These are decided by the small claims court. A claim involves assembling copies of unpaid invoices and client correspondence and applying to courts for orders against delinquent parties.

This process, as well as communication with clients, are handled by an LLM. A single lawyer in Garfield, Philip Young, sees an LLM-constructed file of evidence and a claim before submission. He also handles cases that raise unusual issues. Young is an experienced civil litigator whose experience and approach, like Shapiro’s, is encoded in the design of Garfield.

How Garfield guards against too much AI autonomy is by placing the LLM layer for handling correspondence and invoices under the control of a deterministic AI layer incorporating the strict procedural rules for making debt recovery claims as well as prohibitions on LLM case citation and claims in submissions unsupported by evidence.

This is a fail-safe approach to hallucinations that Shapiro’s falls short of (perhaps because in his practice missed fictitious citation is less of a risk than it is in a high-volume operation like Garfield, whose approach is new to regulatory authorities).

Not only does Garfield’s computer architecture prevent LLM citation, but it continuously tests for breaches of its rules by the LLM by examining its outputs in a test environment that simulates the procedural requirements of an English small claims court.

In this set-up, as in Shapiro’s, the autonomy of the LLM is confined to drafting correspondence and file assembly without citation. This is not runaway AI: it is AI in chains.

Is the Garfield approach to be preferred to Shapiro’s Claude-Native playbook as a model for the application of LLMs? The question ignores important differences between legal practice areas.

An M&A transaction, with its time-pressures and contractual complexity, is not comparable to small-scale debt recovery. If it were, the potential high-volume of claims accepted by Garfield might only be able to be handled by teams of lawyers – and then the business model of the single practitioner plus AI specialist might no longer be workable.

By the same token, an investment in a deterministic layer to govern Claude for the sake of ruling out hallucinations might spoil Shapiro’s business model. Limiting rather than eliminating autonomy in risky areas of practice might be the more reasonable option – at least while rule-bending by AI is rare and limited in its effects.




Leave a Comment

By clicking Submit you consent to Legal Futures storing your personal data and confirm you have read our Privacy Policy and section 5 of our Terms & Conditions which deals with user-generated content. All comments will be moderated before posting.

Required fields are marked *
Email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Loading animation