Keshav Soni & Sriram Adithya

In this episode, Keshav Soni (Editor, LSPR) and Sriram Adithya (Volunteer, LSPR) sit down with Mr Matthew Waddington, Legislative Drafter who leads the Computer-Readable Legislation Project at the Legislative Drafting Office in Jersey to discuss the concept of ‘Rules as Code’ and its implications. Mr Waddington addresses the key challenges in balancing precision with flexibility in coding the law and emphasizes an incremental approach to implementing rules as code to address the complexities of automating legal interpretation.
LISTEN TO THE PODCAST
Keshav
Hello, my name is Keshav Soni.
I am with my friend Sriram and you are listening to the Law School Policy Review podcast and we have with us today Mr. Matthew Waddington. He has been a legislative drafter since 2004 and an English solicitor since 1990, now non-practicing. He leads the Computer-Readable Legislation Project at the Legislative Drafting Office in Jersey, which is working with the team at the Centre for Digital Law at Singapore Management University.
Yeah, so my first question would be could you please tell us more about the work you do in the Legislative Drafting Office in Jersey and the Computer-Readable Legislation Project that you lead?
Matthew Waddington
Yep. At the Legislative Drafting Office in Jersey, we draft all the legislation for the jurisdiction of Jersey, which is not independent. It’s not a state, it comes under the umbrella of the UK, but it’s not a devolved administration, and it’s a territory associated with the UK. We have the full range of primary legislation and secondary legislation, and our office drafts all of it. It’s a professional drafting office in the tradition of the Commonwealth of Nations. So we have the prime ministerial system (as opposed to the presidential system) where the government and the parliament exist but the things that go through the parliament are the things that are controlled by the government by and large. We form a part of the parliament’s administration rather than the government as such. But we spend most of our time working on government drafts.
And then the Computer-Readable Legislation Project is a project we started a couple of years ago. But we’ve been interested in the global “rules as code” movement from before that. And what we’re doing – I hope that the name we picked for the project is self-explanatory – computer-readable legislation. It’s not necessarily looking for computers to understand everything about legislation or to replace humans. When we talk about it in more detail we start talking about the logical structure that legislative drafters are putting into the legislation. So we just want a computer to be able to follow that. And we want that to be able to be achieved in a way that’s easy enough for legislative drafters to do without having to become programmers.
Sriram
So, if I just may ask a small question, this space between the programmers and the legislative drafters, do you think that over the years, in your experience in running this program, how is it changing and do you feel that legislators will slowly start adapting to programming in the rules as code movement in general?
Matthew Waddington
I hope they will. I do try to be very realistic about legislative drafters. There is one strand of rules as code that says
“Oh well, it’s all right. Every legislative drafting office will just hire a bunch of technicians, a bunch of experienced programmers who understand this very specialist area of programming.”
I’m not sure that’s realistic, with government budgets the way they are these days. So it does seem to me that it has to be something that is user-friendly for legislative drafters. People who go into the law often go into the law because they didn’t like maths at school and algebra frightens them, and that can be a problem.
So we would like to see what we can use. We’ve worked on things like an integrated legislative development environment, borrowing from the computer programmers the idea that there should be a system in which you’re writing legislation (which for most of us is Word, but for some offices is a specialist XML Markup system), but the system that you’re using should help you. So if you’re a coder writing a program, computer code, then you’ve got a program that helps you not make mistakes in your code, by showing you what you’re doing as you go along, showing you where you’re going wrong. We could do with something like that.
We have it in the sense of the formatting these days – so for a subparagraph, or a subparagraph of a subparagraph, there is indentation and formatting that belongs to those. And most offices in the Commonwealth these days would have, either through Word or through something fancier, automatic software that automatically and reliably formats a subparagraph correctly. We just want to take that further. The legislative drafters don’t need to understand how Word works, what styles are and how formatting works. They just press enter and they get the next thing properly lined up for them.
So we’d like to see an equivalent of that in rules as code, that makes it as easy to say
“Oh yes I am about to write a new draft provision, and that provision will have a logical if-then structure”.
The system says
“What’s the effect going to be? Do you want to type that now? OK, you’re typing the effect – right, the system is marking it up as the effect behind the scenes, without you having to know how that works. OK, how many conditions have you got for this effect to apply and what’s the relationship between them? Is it ‘and’, so that they’ve all got to be met, or is it ‘or’ so that only one of them has got to be met?”
You’re just clicking something in a pop-up to say
“Yeah, I’m thinking I’ll have 3 conditions, and they’ll be joined by ‘and’.”
And then you’re typing that, but it knows then what you’re typing, and it’s marking that up as you do it. That’s how we envisage it. As a legislative drafter, you are doing the job as you’ve done it before, but with something that helps you to add a layer to what you’re doing, that helps the computer afterwards follow what you’ve done.
Keshav
Right. So I think the point about law-making and rules brings me to the second point which I actually wanted to discuss today, since you also teach part-time in a law school. One of the most well-known legal philosophers, HLA Hart, gives this argument that, if you make laws through natural language, there would be the “open texture” of law, which would lead to indeterminacy. Now a point to note here is that he uses the term “natural language” in his text. Do you think that if we use such symbolic languages, or if we code the law, would that help us solve the issue of vagueness in the whole process of law-making, and bring the aim of the lawmakers closer to the actual effect law has.
Matthew Waddington
Yes I think that’s a very good way of framing the issue, and particularly bringing in Hart. And obviously that has been a live issue for a long time in legal philosophy. Hart’s example is of “no vehicles in the park”, where then people come back and say
“So what if someone wants to bring a tank into the park to be a memorial to do with a particular war? What about a child’s tricycle?”
and so on. And he talks about the penumbra, the sort of fuzzy edges of a concept.
To us, coming from a legislative drafter’s perspective, we’re very happy to recognise all of that. As legislative drafters, we regularly use the word “reasonable”. There is no vaguer word than “reasonable”. We also use “fair”. We use lots of words that are as vague as you like, and they are perfectly respectable words to put in a statute. There’s nothing at all wrong with them.
What you need from a statute is to know “reasonable” in whose opinion? Are you saying this is “reasonable”, and ultimately it’s in the court’s opinion? Fine, we know where we are. Or are you saying reasonable in the assessment of some expert enforcement officer? As in what is reasonable in terms of the weight that a load-bearing wall might take. Sure, that’s probably going to be some technical expert assessing what’s reasonable there. But as long as the legislation is clear about who decides whether it’s reasonable, we know how to handle it and we can deal with it. So we don’t have a problem with vagueness.
We do worry about some parts of the rules as code movement, where there are some technical people who really hate vagueness and really want to automate the life out of everything. We don’t want to do that. What we want to do, what we want to capture, is just the logical structure and just some of the drafting conventions, some of the statutory interpretation conventions, that we’re relying on when we draft. So we do fairly faithfully follow the principle that the same word should have the same meaning, and if you use a different word it should have a different meaning. And that’s a basic element of how we write legislation. Even if that word has not been defined, that’s still a marker set around that word. So if we say “farmer” at one point in an Act, and at a later point we say “farmer” again, we should be meaning the same thing each time, even if we haven’t told you exactly what we mean. If you speak English then “farmer” is a word that you use, and you know what you mean by it.
So we do see vagueness as a spectrum – “reasonable” is the far end, but let’s say “farmer” is the other end. It’s a natural English word. Or “vehicle” – in “no vehicles in the park”, “vehicle” would be another one. There is no point trying to nail every last meaning down beyond any scrap of vagueness. The only things that are not vague are mathematical concepts. [ 14:53] If you say “two”, that is definitely different from “three”. Two is definitely two, and three is definitely three. But we’re not legislating about maths. We’re legislating about humans, who are very complicated, and do all sorts of funny things, and where there are all sorts of grey areas. So we are very relaxed, if you like, about the meaning of words. But it’s the fact that we put these words together in logical structures.
When a provision says “a farmer must feed their animals”, if you say that this person you are thinking about counts as a “farmer”, and if you also accept that that thing over there counts as an “animal”, and if you accept that this activity counts as “feeding”, then you are going to have to accept that this provision says that this person must feed that thing. That’s what we’re capturing. That sounds silly at that level because it’s so simple, but obviously real legislation has much more complicated legislative structures because we’re dealing with human life. There are always exceptions, and then unfortunately there are exceptions to the exceptions, and then often there are exceptions to the exceptions to the exceptions. [ 16:25] People can get lost trying to follow through that. Even legislative drafters, reading other people’s drafts, can get lost trying to follow where this was all meant to lead.
If we were able to set it out in a way the computer could follow, it would mean that we stopped being vague about “if” and “or” and “and”. And we shouldn’t be vague about “means” and “includes”. But we are fairly disciplined in modern drafting about how we use those words.
We were fairly undisciplined back in the last couple of 100 years or so, and obviously each country’s statute book has legislation going back hundreds of years, and has legislation of all ages across all of that time. So it’s a patchwork quilt of very modern legislation, not so old legislation, and very old legislation. But, as drafters, we’re interested in working with the new legislation and in trying to get the new legislation to work well. Dealing with the old legislation is another story, a much more difficult story.
Sriram
So one thing that I noticed is, essentially there seems to be a conflict. Like you said, the more programming-oriented people are hard-core, focused on the logic. They want a strict understanding of the logic here. And then we are seeing another conflict where we have to, of course, take into account the human factor. So what is the balance that will come about since, in a programmers perspective, those who want to automate every task, they have to ensure that the logic is foolproof and flawless? There will be bugs that arise but there are mechanisms to catch those.
So how would the draftsman look at this? Because in law we see this every day. Every time a judge sits in a court and views the statute he’s going to see an exception pop up every time. Like you said, there’s an exception to the exception to the exception. So how will the rules as code movement capture this and try to provide a solution to it.
Matthew Waddington
Right, I think the important thing there is that very often what the judge is doing is looking at a word, like “vehicle” from our previous example, and saying
“Well, yes, ‘no vehicles in the park’ – we can see what they meant by that, what they were actually thinking of. But here we have this peculiar edge case about a child’s tricycle or a memorial tank. Is that really how this is meant to apply here?”
They might couch that in terms of an exception, but they can equally couch it in terms of the meaning of “vehicle” in this provision.
So from our perspective, we are optimistic about being able to capture the logic. We are equally saying “no, there’s very little that you can completely automate in fact”. Or I might even say there’s nothing you can completely automate. In one of my articles, I give the example of if you had a law that somebody with a dog in their house must post a notice, that is readable from the street, to say there’s a dog. How do you know there’s a dog there? How do you know it’s a dog – the thing they’ve got there? How do you know it’s at that house? How do you know there’s a notice? How do you know it’s readable? These things are inevitably human inputs into whatever computer program you’ve got. At the extreme, you could legislate to say
“Well we’re not really interested in whether there’s a real dog there. We’re only interested in whether this property appears on the register of dogs, a register of dog licences, as having a dog there. If that property is registered on that computerized register, so if that computerized register returns ‘yes: dog registered: that address’, then that is enough.”
But that’s a peculiar thing to legislate.
But you might do it. Then, OK, so that’s decided whether there’s a dog there. We haven’t had to ask for any human input. We’ve had a computer input that there is a dog there. How do we now assess, without any human input, whether there is a notice that’s legible from the street? Well, perhaps we can use Google Maps, if they weren’t blurring it. Sure, someone has driven by with a camera and that camera has picked up the notice (if they haven’t blurred it). A computer program might be able to use OCR to recognize the text on it and check that the text is the text that the statute says must be there. But in theory then you could have fully automated, with no human input, the whole thing. The whole test, for whether that particular provision has been complied with, could be assessed by computers with no human input. But no one is going to make that piece of legislation because that would be mad. That would be effectively saying to the homeowner
“Sorry about this, but we don’t care whether the dog license register is out of date, or wrong, or the computer malfunctioned. And we don’t care whether Google Maps has correctly photographed your notice. It might have been that, when the Google Maps car was going by, someone was walking past and obscured the lovely notice that you’ve got. We don’t care. Hard luck. We are going to prosecute you for a strict liability offence of not having a notice that appears on Google Maps and is readable by a computer.”
The whole idea of doing that is just obviously ludicrous, yeah? So in 99% of legislation, 99% of things that governments legislate because they want to happen, there’s going to have to be some human input.
“Is this a real dog – or is it a cat, or a wolf, or a dead dog, or a stuffed dog, or a toy dog?”
“Yes.”
“Is this dog kept at this property?”
Well, is it a divorced couple, and the dog (like the children) goes from one to the other in opposite weeks? I don’t know. Someone’s got to decide. Does this dog live at this property? Is there a sign? Is that thing a sign? Is it readable? Is it readable from the street? All of that’s going to be human input.
But still it’s worth capturing the logic that if a dog is kept at the house, then the person responsible for the house must do this act, which is displaying a notice, and that notice must comply with these conditions, so it’s readable from the street. You have to decide – “is it a dog?”, “is it a notice?”, all of that. But, once you have decided those things, you can’t wriggle out of the fact that it says that if you say “yes” to these then you have to accept that it’s “yes” to those. That’s the logical structure.
Keshav
Right. So, one of your points, about the conflict which could happen when we take such a strict approach, makes me think of some conflict that could happen while deciding. Let’s say there is a law that requires an application of reasonable man standard, and there’s some conflict on what should be the right application. To give a slightly contrary view, why can’t we say that an automated decision-making system can think of many outcomes and then it can give the option to the judge to take the call, take the final call, on which is the right reasoning. Won’t that be a sort of a middle ground where you are using a bit of automation but also leaving it finally to the judge to make sure there are no absurd outcomes?
Matthew Waddington
Yeah. I can’t help thinking about this like a drafter. So I can’t help thinking of you saying that as being like many civil servants that I’ve dealt with who say
“We want a law. We want it to be automatable. But we still want to be able to tweak it when it would produce absurd results.”
That is absolutely business as usual. And I have to say to you
“OK, why? It doesn’t sound sensible for me to draft some English language that people think means something, but behind the scenes, you’re saying we’re going to have this automated result, that automated result and that one, but a judge able to overrule them. Why don’t I just say that? Surely I should say that expressly if that is what I’m doing. Fine, so I’ll draft it like that instead of drafting it as I might have done otherwise.”
Those kinds of decisions are being made every day in every legislative drafting office across the Commonwealth, because we’re putting to our civil servant colleagues, our politician colleagues –
“Where do you want to pitch this provision on this spectrum from fully automatable to entirely human discretion?”
So we could have everything pitched at “reasonable”, so a judge will have to decide. We could have everything pitched at “no, it’s all got to be automatable”.
The Danish government has particularly pressed its policymakers to try to make everything automatable as far as possible. That’s a route you can go down, but it’s not necessarily a route that’s going to appeal to all civil servants and all politicians in all subject matters. So I don’t see that as a problem at all. But I would want us to be being explicit about it, and I would want the text of the legislation to match what it is that you’re doing with the code.
Where I see a problem is where the text says something and then a coder has said
“Oh, I don’t know about that. I’m going to represent that with something which is an approximation and, yeah, we’ll get a judge in if we need to at the end of it, to fix the fact that my approximation isn’t quite necessarily right.”
We’re legislating for things that are rule of thumb all the time. Even in the field of welfare benefits, Social Security benefits, which is where rules as code has done a lot of work because it is easily computable, when you create a Social Security benefit you’re saying
“A family with 4 children, in a house of this size, should be given this amount of money a week.”
Well the fact is every family with 4 children in a house of that size is different. Some of them are able to live off very little money. Some of them are only able to live off a lot more money. You could have said
“Oh, every family must be visited and assessed for exactly how much that individual family needs, to be absolutely fair to that individual family.”
No, it’s too complicated. Nobody’s going to do that. So you say
“We’re going to say people need this much money a week. Everyone in those circumstances, we say, needs that much money a week. Because otherwise we’ll never get anything done.”
So it’s always a question of pitching how individually tailored you want it versus how much you want one-size-fits-all. The more you have one-size-fits-all, the more you’re going to have edge cases that are not really fair. But if you go the other way, individually tailor every single one, then (a) you’re never going to finish, and (b) you’re going to get unfairness because you’re going to get different people assessing it in different ways. And even if you bring in AI, AI is not going to cure inconsistency. AI necessarily produces inconsistent results that you cannot explain. You have no idea how it came up with it. So I don’t see that as anything to give pause to rules as code, as long as people are being realistic about what it is that we’re trying to do with rules as code.
Sriram
So you just mentioned that you had to approach politicians to show what statutes have been drafted. So the thing with statutes is that the common man reads them. And evidently, the common person’s also going to go through them. So does adopting rules as code as a methodology mean that we’re going to leave behind transparency? Is it only going to be meant for a certain section of draftsmen or lawyers to look at it? Or can the common person be able to easily understand it and maybe even in a better format?
Matthew Waddington
Yeah. I do think we publish legislation because we should, because we should be transparent and people should be able to read the legislation.
Whether a layperson can necessarily, guaranteeably know exactly what their legal rights are just by reading legislation is another story. So, I don’t see that necessarily as something wrong with rules as code. I see rules as code as helping you, but what it’s helping you to do is understand what this legislation says on its face. And in most jurisdictions in the Commonwealth, a court’s going to be able to come along and say,
“Yes, OK, that legislation says that this person is not entitled to do that. Yes, that’s what it says on its face. And that’s got to be our starting point. But actually, because of the Constitution, because of human rights, because of the powers under which this was made, we’re going to interpret that as not meaning what it says on its face.”
And there’s nothing in our systems, there is nothing that can or should be done to stop that.
But we still publish legislation. It is still useful for us to publish it. It’s a starting point. In some cases it’s a starting point that is very close to the finishing point. Once I’ve read that because I’ve got three children, I’m entitled to so much a week in such and such a benefit, then probably I’ve got as much as I need. But it’s never necessarily the end of the story. If I’m not happy with it, I can go and see a lawyer and they can start checking and finding some way in which a court could be persuaded that that isn’t right for my circumstances, or that piece of legislation isn’t compliant.
So I don’t think that’s an argument for worrying about whether rules as code is transparent. I think the point with rules as code is, yes, people can’t read code. People can read their own language, natural language, but most people can’t read code. I have had coders say to me, “No, it’s much easier to read code than it is legislation”. Well, maybe that’s being quite optimistic as a coder. But although people can’t read code, if you have captured the logical structure then you can get a computer to guide somebody through, to ask them the right questions and give them the right answer. And in that sense, that’s an aid to the person understanding the text. So although they can’t read the code as such, they can run the code and that will help their understanding of the text.
So I don’t see a problem in loss of transparency that way, necessarily. I do see the text, in our systems, still needs to be the supreme thing over the code, but the court is then supreme over the text if you like. So as long as the code is seen as an explanatory tool, or, if you are automating something, the best implementation that we’ve been able to achieve, not the final ultimate answer which belongs to the courts, then I don’t see a transparency problem in that way. I hope that answers that.
Keshav
Right. So, you mentioned the whole process of law-making and the whole point about law and statutes made me think that if we see all the sorts of examples we have taken so far, let’s say Hart’s rule of “no vehicles in a park”, it’s a very simple rule. It’s a simple rule on the face of it – yeah, sure, there is much vagueness inside it, but it is a simple one-line rule. But that is not how our laws look right now. We have a lot of complex rules that run into page after page.
So I see two sorts of views here. One – we could say that since it’s so long, it’s so complex, it is not possible or it’s hard to make it into code. Or I see a sort of counterview also that a lot of Acts we see right now in some way resemble the if-then format. If X happens then Y. I think that sort of fits neatly into the whole structure of coding the law. So what do you think about this?
Matthew Waddington
Yeah, definitely. To take the “no vehicles in the park” example. No legislative drafter in a Commonwealth country would write that, full stop, and move on and say they are done. For starters, we would ask
“So what is the consequence if someone breaches that? Is it a criminal offence?”
That would be the obvious thing, but it might have all sorts of other consequences instead. OK, so we say
“1. A person must not bring a vehicle into a park.”
Full stop. Lovely. Next provision.
“2. A person who contravenes Provision 1 commits an offence and is liable to this penalty.”
Lovely.
The drafter is going to say to the person who’s asking for this rule
“OK, ‘vehicle’ – do we need to be a bit clearer about that? Can we ourselves think of some edge cases?”
And I like the way, over time, that the Hart example has been used. I suspect that a drafter, who was asked that, would think of the child’s tricycle and would think of bicycles
“Do you only mean motor vehicles?”
Let’s assume that the policy person says
“No, no, it’s not just motor vehicles. We’re banning vehicles.”
Then the drafter says
“OK. What do you mean by a vehicle here? Do you include a child’s toy? Do you include a pram? Should we define it to include and exclude some of the things that we can already think about as edge cases?”
Then there are the edge cases that nobody is going to think about. So for the one about bringing a tank in, to be a memorial, probably neither the drafter nor the policy officer is going to have thought of that edge case. It’s not that it’s something novel technologically. But obviously now it’s also more likely that there’s going to be tech that changes, that produces effects that we couldn’t have thought of. So there will always be edge cases that you can’t predict. But that is a fact of life. There’s no problem with that. It’s just that legislation is our best attempt at dealing with that. There is no real way of future-proofing everything perfectly. There’s no way of guaranteeing that you’ve thought of every possible edge case.
So in Commonwealth countries we do try and deal with the edge cases. And that’s why the legislation is then much more complicated, because it’ll start going into the different examples. And perhaps they would think about the memorial case. Perhaps there is already a memorial in one of the parks and the drafter thinks “Hang on a minute. What about that?” So there’ll be a lot of that, and that’s where a lot of the complication comes from
“Oh yes, in order to tackle the edge cases, we need these exceptions. We need these further definitions. We need these complications.”
It isn’t the basic “no vehicles in the park” rule. That is not what we need rules are code for. Everyone who reads that understands it. I can’t drive my car into the park. Fine – there we are – I know where I am. It’s the edge cases, in a sense, that we need it for. Or it’s trying to look at the legislation that has covered all these edge cases. Can I drive my car into the park? On the face of it, looking at “no vehicles in the park”, I think I can’t. But there are 20 pages of detail here about what counts and doesn’t count as a vehicle in what circumstances. I’m going to have to read all that to check that my car is actually covered the way I suspect it is.
That’s where rules as code, some encoding, would help. To guide you through that without you straying and getting lost and making a mistake in how you think all those provisions about the edge cases add up. So, yes, as long as your car is an ordinary car, it’s not a toy, it’s got an engine, it’s not being put in there for a memorial, it doesn’t hit any of these other exceptions, then yes what you first thought is right, you can’t drive your vehicle into that park.
[ 42:39]
So I see it as helping, as a guide to the logical structure, not necessarily as helping with “Yes, but does my strange vehicle actually count as a vehicle?”. We’re not necessarily going to be able to help you there beyond what is in the text. And we are not wanting to go beyond what’s in the text. We’re wanting some legitimacy to the code, at least that drafting offices publish, so that this only reflects what’s in the text.
If someone else is going to produce an automated system or some fancier system then good for them, they can build it off what we’ve published. But they will then have to be upfront about the assumptions they’ve made, and the things that they’ve added to the text to produce something that is more automatable. And there should be some way of challenging those assumptions in a particular case. But that isn’t our job as a legislative drafting office, I think. That’s for whoever else, whatever government department’s dealing with it. Or the example that is often given is banks, where there’s legislation about taking on new clients, and how you check whether they might be drug dealers or whatever, their money’s legitimate, their identity is genuine, they’re not money laundering. So those banks are all producing software to automate that, because they can’t be doing it just in the old-fashioned way, they need to be doing it online. Fine. They’re having to produce approximations. They should be clear about what they’re doing. They could build that off the basic structure we’ve given them. They will have to produce something more sophisticated. They should then be clear where they’ve departed from the basic structure we’ve given them. And be ready to change that if they need to, if a court later says “No, you have been taking on these clients and you definitely shouldn’t have been”.
Sriram
So coming to this point of essential accessibility. In a country like India we have multiple ministries and departments that can give their internal circulars that act as law, and there are various different state legislatures that have their own internal departments. Essentially there’s this Kafkaesque situation where we have multiple orders which have been consistently coming out. And we do have repositories, so we have something known as India code, then we have state gazettes, where these notifications are published.
So one of the questions that I have is – if we have a rules as code framework, can accessibility be improved? And if it is improved, can we have automated systems to oversee these updates? Essentially a sort of grand repository that can track each individual update so the common citizen is more aware of these things.
Matthew Waddington
I think so. And again, you say the common citizen, I think of the person writing the rules. We need to help the person writing the rules not to write a contradictory rule in the first place. So if we can have the logic of the rules captured in an automated way, that can then have them all related to each other, then that can detect inconsistencies –
“You’ve said this sort of people have to do this. But over here you’ve said they mustn’t do it. Is that an exception? If so how does that exception work? Make that clear – fine. Or is it that, no, you have got a genuine conflict here and something needs to be done about it?”
So I do come at it from the end of creating the rules but, yes, that should then mean that the person reading the rules can also see it. The rules are then not inconsistent, or the exceptions are clearly marked, and the person reading the rules can then see where they stand more easily.
Keshav
So, since we are talking of building such massive, massive code pieces, massive digital infrastructure,
what role do you think large language models can play here? Do you think they can sort of act as a tool to scale up these things and ensure this happens in a much larger scale with much less resources expended? Since we see news of these tools being used for coding, why can’t it be used in rules as code systems where we use them to help scale things up?
Matthew Waddington
Yep, yep. I think, to me, the important thing to keep in mind is – do you want reliability? Do you want 100% reliability or not? You can always use an LLM, supervised by a human, to help that human do their task much, much quicker – that always makes sense. If you say
“Actually, we’re not going to bother with the human, we’re just going to get the LLM to do it”,
you have to accept that you will have no way of being sure whether it has done it right. So I don’t see it as an answer to say
“Yeah, just hand it all over to an LLM. It’ll be fine. Don’t worry”,
because that inevitably will lead to trouble. But I do see LLMs as a way to deal with the problem of scaling up, that you haven’t got the human resources to do the whole thing manually, but you might be able to use an LLM to do it.
Going back to what I was saying about already existing legislation and new legislation, we do also think part of the answer is “No, let’s do it right with new legislation”. Eventually, as time goes by, the new legislation occupies more and more of a field, more and more of the old legislation is repealed. Perhaps you consolidate some of the old to make something that does now work. But you take an incremental approach, not a revolutionary approach. In the meantime if somebody wants to check the existing legislation, sure, at the moment they can set an LLM on it. As an ordinary citizen I can put it into an LLM and say “What does this mean?”, and it will give me an answer. Whether that answer is correct … well.
I might say
“Oh no, look, I want to operate across India. There are all of these states with all of these different rules, whether they are internal or whether they are legislative. I’m never going to be able to read all that. Oh, I’ll drop it in an LLM, and I’ll see what the LLM says.”
I can do that today without any further development on any side. But I need to be aware that I may get prosecuted because I can’t rely on the LLM’s answer being 100% correct. But, you know, it might be the best way. I’m equally not going to be able to pay a lawyer in every one of the Indian states to give me a definitive, reliable answer, covered by insurance, about whether I can do my trade in all the Indian states. So, yeah, from a business point of view, shoving it to an LLM is as good as I’m going to get.
But when it comes to setting up systems for the future, we see it in incremental terms and focus on the new stuff. The trouble with the old stuff is, if you do apply computerised or formal logic to old legislation, you’ll find a logical error somewhere. If you find a logical error in draft legislation, and the computer tells you there’s a logical problem there, I can now fix it before that draft becomes final and gets enacted. If I find a logical error in already enacted legislation, I can’t fix it. The tech people often assume
“Oh, it’s a bug. You’ll fix a bug. Obviously. Won’t you?”
No, I can’t. There’s a democratic process. You would have to persuade the politicians to resurrect this Act that’s been sitting there for 50 years and start amending it to correct these logical problems in it. Yes, that might be feasible in some cases, but in most cases, no.
And you can’t use a tech solution to fix it. You can only say “We think it might mean this”, or “We think it might mean that”. It’s “This is ambiguous”. There is the difference between vagueness and ambiguity – ambiguity is a bad thing, vagueness isn’t.
“This is ambiguous. You could read it this way or that way. Sorry”
So, even when you want to scale up to cover all your existing statute book, or every statute book of every state in India plus the national statute book, you can never do it. You can’t do it in a way that produces a perfect system.
Sriram
If I may say, if a programmer makes a mistake, it’s just another update. If a draftsman makes a mistake, it may cost a government.
Matthew Waddington
Yeah, yep, yep.
Sriram
This leads to my next question also. You know the biggest challenge that we have, in implementing rules as code, is the kind of infrastructure that’s required. For the normal programmer, or for any organization, it’s a few computers, set up a website, and that’s ready to go. That’s the particular kind of infrastructure that they have. But for a country, or for an entire continent, something like the European Union, there’s a sort of infrastructural and logistical issue that would arise. So how would the rules as code movement go about this?
Matthew Waddington
Again, I think I can only answer from our perspective and we’re not typical of the rest of the rules as code movement, I would have to say. But from our perspective, that’s why we’re keen on legislative drafting offices just producing a basic “if-then”, “and”, “or”, “not” rendering of the logical structure of the legislation, not a fully working program.
Once you’ve got the “if-then”, “and”, “or”, “not” structure, then you don’t need fancy tech. Microsoft Excel will do it, and we produce Microsoft Excel spreadsheets in which we put the legislation. We break it up – we have the sentence, but we break that sentence up into different cells. And we make the questions “yes”, “no” or “unanswered”. And then we use Microsoft Excel’s formulas for its “IF” function and it’s “AND” function and “OR” function and “NOT” function, to check what the user has answered, “yes”, “no”, or “unanswered” for each of these questions, and then to give the appropriate result. And that’s not difficult tech – it’s horrible writing Excel “IF” formulas. They are horrible things to have to do. So it’s not scalable in that sense. But it is clear evidence that you don’t necessarily need fancy tech just to be able to do the basic job.
Yes, you will need fancy tech to do the job easily, scalably and so on. But that’s beyond my expertise. Our concern is more to make sure that people are pointing in the right direction and that the tech people are working on the right problems. So that is the right problem. Trying to nail down the meaning of “vehicle”, in a provision that says “no vehicles in the park”, is the wrong problem. Please don’t be working on that. Work on scaling up. From this “if-then”, “and”, “or”, “not” version I can produce a Microsoft Excel formula, but it’s a pain in the neck for me. Please make that easier, and scalable.
Keshav
So, throughout our talk, one thing that was going through my mind was how can we use rules as codes for welfare users. If I’m not wrong in France they have built these tax simulators to help citizens understand how tax laws would apply to them. I was thinking maybe one more use of coding the law could be that maybe you could translate it to some other natural language, because since it is a code it might be possible to translate French into German and vice versa. Do you think that is possible? So, first, what type of users do you think we can use the rules as code system for, for welfare? And, second, do you think my whole thing of using the code to translate into a second natural language is possible?
Matthew Waddington
Let me take the second one first, I think, because it’s a focused one.
Keshav
Sure.
Matthew Waddington
We’re working with Singapore Management University with their team. That (translation between natural languages) is one of the things that they want. Their language is L4, it’s a domain-specific language for law. And they want to be able to generate, obviously in the Singapore context, it’s English, Chinese and Malay and possibly some of the Indian languages. And they see that as part of what they can offer. What we want to bring to them is an understanding of how Commonwealth drafting works, though.
Because let’s say “farmer” is a word that pops up throughout this piece of legislation. “Agriculturalist” is another word that means pretty much the same thing. In French, or whatever other language, there may also be two words. It’s important that your automated translation system goes beyond what most natural language processing systems are doing at the moment. And goes beyond what a normal interpreter, a human interpreter, is trying to do. A human interpreter is trying to translate it into the idiom of the other language to make it work in that language.
For legislation, it would be important that, if we’ve used “farmer” consistently throughout the English text, then the French text should use whatever French word and only that word. And where we’ve used something else, “fish farmer”, or where we’ve said “an agriculturalist dealing with fish” and we’ve used “agriculturalist”, it would be important that your translation uses the same word if we’ve used the same one. So that across all the languages you’ve got this systematic following of that rule. So that seems to me workable. I can’t see it being perfect because there are many ways we could have written the English version of this text. We’ve written it in the way that we think is most concise and most easily readable by a human being and particularly by a speaker of English. The way that it is most concise and easily readable in another language is going to be different. So if you’re just doing that kind of literal translation, the result is not going to be good for comprehension in the other language. It’s going to read oddly. It’s going to be stilted.
I did work in Cyprus before Jersey, and we were trying to match legislation written in Greek in the Republic of Cyprus. People were saying
“I need a word-for-word exact translation of the Greek original”.
Well, you can’t have a word-for-word translation from Greek to English because there are words in Greek that don’t have words in English, and there are words in English that don’t appear in Greek. And particularly that’s troublesome when it comes to definite and indefinite articles. In English we use “a” “farmer” and “the” “farmer”, and we have particular ways in which those are used. In French the use of the definite article is different. You use a definite article in front of the name of a country. We would never think of doing that in English. Well, we do with “the” Netherlands, but we’re not going to talk about “the” India or “the” England. So you can’t actually easily match how that works. And our use of “a” and “the” in our drafting is very specific. If we say “a” we mean “every”. If we say “the” we mean the one we just referred to. And our use of those is very specific. If you’re translating into a language that does not have the same system of definite and indefinite articles, that won’t work. And in many languages the word for “a” is the same as the word for “one”, just not in English for whatever weird reason. That’s very significant. So part of our engagement with the team in Singapore will be looking through these sorts of issues. Is it realistic to be able to translate things automatically? Given that legislation and law are necessarily about language and about text, is it possible to say “We’ve got it”?
Now obviously the fact is that in Wales and Canada, there are 2 languages and legislation is passed in both. And in the EU legislation is passed in more than 20 languages. And they are meant to have the same meaning. But in those cases, they will have drafted it so that it works in the other language, and they’ll have drafted it for the same effect. And you can consult the versions in different languages to try and compare – if one of them is a bit obscure, the other one might be clearer.
But that, to me, is a huge background that people haven’t necessarily looked at in terms of translation of law.
To go back to the first point. Can you remind me of it again sorry?
Keshav
Sure so my first point was about – what sort of welfare uses do you see of this rules as code movement?
Matthew Waddington
Right, right. And I think that touches back on what we’ve talked about already, about the citizen lay user and the lawyer user, and what legislation does – whether the legislation gives full answers about your legal position or not. And welfare benefits, and the payment of Social Security payments, certainly is one area where there is precisely this many pounds to be paid in these circumstances.
What the French have produced, to me, is not particularly revolutionary. What’s revolutionary is being public about it. In any Social Security office or tax office in any country, they will be using some software. Once upon a time, it was a bunch of humans inside that office with quill pens going
“Oh yes, that’s a person with four children. That’s 4 times 23 equals …”.
They were working it out by hand, then came calculators, then came software. So governments are already using software, it’s just not published.
But it should be able to be published. And in a sense rules as code is about doing it openly from the start. But not necessarily having all of the implementation features. So I should be able to check, and we as a society should be able to check, whether the government department’s software is working and is right, and has correctly worked out and represented what the law is, or whether they’ve cut corners. As an individual claimant, I should be able to run a simpler version of that software to check – is it worth me applying for this benefit, am I going to get it, how much would I get? And also to check against, when I make the claim and I get a cheque for so much, or a bank transfer for so much, that that is what I was expecting. So certainly there will be those cases. If I then find that I’m not getting what I expected, then I will need to take it up with the Government Department. If I’m not satisfied then, I still need to go and see a lawyer and say,
“Are they right? If they’re not right, can you do something for me about it?”
In the UK, we have Citizens Advice Bureaux. I don’t know whether it is an equivalent in India, but you can get advice about what it is that you’re entitled to as a citizen. They should be able to be running off something which is shared between them and the government. The government has then, fair enough, added to that to make something implementable. But there is a shared understanding of what the logical structure of the legislation was. So that if you answer the questions that the legislation contains in the same way, you should get the same result. You as a citizen should be able to see
“What would this do? Am I entitled to this? Am I not entitled to that? Am I entitled to more of this or less of this?”,
pretty much the same as the government does. So I would see that as certainly a clear benefit.
Obviously that could be done tomorrow, in a sense, if governments were willing to publish the software they use in their Tax Offices and the software they use in their Social Security offices. Or at least not quite tomorrow, but within not too long if they were prepared to take out some of the implementation stuff and some of the checking stuff – I don’t need to see that, I just need how you’ve worked out how much I’m entitled to. But to me that isn’t magic. That isn’t what rules as code is really there to achieve, in itself.
Keshav
Right. So this sort of brings me to my last questions. I have gone to your bio and your LinkedIn page and one thing I see is you have had a very interesting life. You have been a lawyer, you have worked on the Law Commission’s reports, then also worked in the legislative drafting office. And you also teach in law school. So maybe you can shed light on how this came through. This is a long journey but maybe you could tell a short story about it.
Matthew Waddington
Yep, yep. The short answer is by accident. This is not the result of a grand plan. I knew at the start of it that I wanted to work in legal aid and community law centres, making a difference for people. And then the other things have sort of fallen out of that. Some more accidentally than others.
In doing that work, I found that I enjoyed training other colleagues to do it. And then training other people, and then I got into teaching and then found I enjoyed that. I do like the fact that, having qualified as a lawyer, these various different things have been open to me. Fair enough, there are many lawyers who go into a particular line of work and love that and stick with it for their entire careers. Good luck to them. But the good thing about having a legal qualification behind you is it gives you that security that you have that, and then you can branch out into some different things. So I was a practitioner. I went into teaching. I went to the Law Commission because they approached me because I knew about housing law and they wanted to work on a project on housing law. And I went to them not because I had always wanted to work for the Law Commission, but because I wanted housing law to be put right, to be made less of a mess. But then in doing that, I found out how much I enjoyed doing that.
And then drafting came up really by accident. It was in the middle of a British winter. I was in London and my wife was in Manchester. And an e-mail came round saying “There’s an opportunity for a job in Cyprus. It’s a drafting job”. And I sent the e-mail to my wife, and she said “Yes, go for it”. So I applied, not thinking I would necessarily get it. And as luck would have it, it was originally a single vacancy, and there was somebody else better qualified than me who applied. Not everybody from the British system wanted to go to Cyprus – they wanted to advance their careers in Britain. But of those people who did apply, there was someone better qualified than me who would have got it, but for the fact that it just happened that another person in the office in Cyprus happened to leave during the recruitment process. So it turned into two vacancies. They told me, after I arrived there, that I was number 2. Fair enough. But so I got the 2nd post – really, really fluke chance. And, through the work I’d been doing the Law Commission, I’d got interested in legislation – I’d always been interested in legislation because so much of the work that I did was based on legislation. And obviously, like a lot of practitioners, I thought
“Yeah, obviously I know how to do this better than these fools who are making this terrible mess of all this legislation. I’ll be good at this”.
And then … I try the job and I find
“Oh dear, it’s a lot harder than I thought. Aah.”
And it takes many years to get good at legislative drafting. So I worked on that, I’ve carried on on that.
And then, over time I started thinking
“What is it that we’re actually doing with the legislative drafting? What is it that we’re creating?”
And memories of logic that I’d studied in the past came up. And then it happened to be that there was a course on law and logic that I could apply for. So I thought
“That would be fun. I don’t know if it’s of any use. It would just be interesting, and a bit of fun, … and it’s in nice sunny Italy. I’ll go there. I’ll do that”
So I did that myself. And then I heard about the rules as code movement. And then that blossomed into this path.
So it’s a lot of chance, but the law is a very wide field – there are many more jobs than just being a law practitioner or a judge. So I would encourage all law students to think broadly about their potential career. It’s not necessarily just about making money. You want to be interested in your job. And there are many different ways of being interested.
Sriram
Sir thank you so much for your time and thank you so much for speaking to the Law School Policy Review. It was truly an eye-opening moment and it’s great to have people who are promoting these different things and especially as we will interact with these new movements, so thank you so much.
Matthew Waddington
Thank you very much and thank you both for very interesting questions. Thank you.
Categories: Podcast
