Taken from the speech “Australia’s Constitutional and Judicial System” By Stephen Gageler, Chief Justice of Australia
Question from Judge YAMADA Yoko of the Yokohama District Court: In the near future, artificial intelligence might be able to provide logical judgments more cheaply and efficiently than humans. Given that possibility, what do you believe are the irreplaceable values that human judges and human courts can offer to society, and what qualities and capabilities should judges cultivate in order to deliver that value? I would be very interested in your thoughts on the role and significance of judges in the age of AI. Chief Justice Gageler’s answer: I think this is the second most difficult question to be asked. And my difficulty is that I know a lot about judging but I don’t know very much about AI, although I have really sought earnestly to understand it. I fear that there is very little that the judge does that AI cannot do better. There is a famous description of law by Sir Edward Coke, the great Lord Chief Justice of England who had to confront James the First of England, who, as King, decided that he could judge disputes between his subjects as well as could his judges. The King’s argument was that law was just reason, and that he, as King, had reason as much as any judge, and that he could do the job just as well. Lord Coke had to explain “No, Your Majesty. Law is artificial reason, and only with deep learning and long experience can the artificial reason of the law be brought to bear on disputes.” And His Majesty, said Lord Coke, “although very wise in human affairs, did not appreciate this artificial reason.” Now that always struck me as a very stylized but adequate explanation of the nature of legal reasoning as distinct from ordinary human reasoning. I think artificial intelligence is artificial reasoning on stilts. I think that it is likely to produce more predictable, equally learned, if not more learned, and fair outcomes than human judges. This is my true fear. What is it that a human can bring to the process that artificial intelligence will not be able to bring to the process either now or in two years? I don’t think there’s very much, but I think there is something that is really more important in criminal law than in civil law. My prediction is that civil law practice will probably be overtaken by artificial intelligence very soon. But I think in criminal law there is something about the vulnerability, the identification, the humanness of the subject matter, or the object or the person who is to be subjected to criminal liability. I can’t articulate it particularly well but there’s something fundamentally important about the person who is making the decision that somebody else is to be deprived of their liberty for what they have done being a person who could equally be deprived of their liberty if they did the same thing. I think there’s something fundamentally important about a human subjecting another human to punishment.
Australia’s Constitutional and Judicial System By Stephen Gageler Chief Justice of Australia
‘Document assembly’ is the process by which an operator creates an entire document from a variety of component parts and then personalizes that document to meet the needs of the intended recipient. Included within the scope of the term ‘document assembly’ are how source clauses are:
· created · neutered, and · assembled.
One of the first steps in automatically assembling legal documents is identifying terms in square brackets. This is the way that some automated document assembly systems work like Pathagoras. To create a legal document for automation and assembly begins with surrounding key terms such as party names and so on with square brackets eg [William Higgs] or [Higgs Limited]. You get the idea. The idea is that the square bracketed terms will often be repeated throughout a legal document, so it is efficient to define them.
The [Initial Unitholders] have paid the [Initial Sum] to the [Trustee] to establish a trust on the terms of the[Trust Deed].
The terms Initial Unitholders, Initial Sum, Trustee and Trust Deed are all obviously variables and they would be repeated throughout a contract. A 'variable' is a place holder for personal data. You should strategically place variables within your source clauses where you want that data to appear. Consequently, those variables will also appear in the first draft of any newly assembled document.
At some stage in the assembly we will need to prompt the user to enter those terms.
So lets start by producing a Word Macro that searches for terms in [ ] and produce them in a new Word Document. Once we have the Terms we can then prompt our assembly program to complete the legal contract with those specific terms. This is called an Interview. An Interview is a series of questions asked at the beginning of the final assembly process regarding what you want included/discarded in the final legal document. It consists of questions that are presented in a menu format.
The interview is asked in a single window, with multiple questions being asked. More about the Interview in later blogs.
Here is some code you can enter into a macro in Microsoft Word. Obviously make sure your Word Document has some [ ] terms in it.
Option Explicit
' ===========
' ENTRY POINT
' ===========
Sub ExtractBracketedText_ToTable()
Dim doc As Document: Set doc = ActiveDocument
Dim bodyRng As Range: Set bodyRng = doc.StoryRanges(wdMainTextStory) ' main text only
' Regex to capture [ ... ] (non-nested), allowing across line breaks
Dim rx As Object: Set rx = CreateObject("VBScript.RegExp")
rx.Global = True
rx.IgnoreCase = False
rx.MultiLine = True
' Group 1 captures the inner text (without the brackets)
rx.Pattern = "\[([\s\S]*?)\]"
If Not rx.Test(bodyRng.Text) Then
MsgBox "No bracketed text found in the main story.", vbInformation
Exit Sub
End If
Dim matches As Object, m As Object
Set matches = rx.Execute(bodyRng.Text)
' Prepare a simple record type via arrays
Dim n As Long: n = matches.Count
Dim arrText() As String, arrPage() As Long, arrCtx() As String, arrStart() As Long, arrLen() As Long
ReDim arrText(1 To n)
ReDim arrPage(1 To n)
ReDim arrCtx(1 To n)
ReDim arrStart(1 To n)
ReDim arrLen(1 To n)
Dim i As Long, startInDoc As Long, lengthInDoc As Long
For i = 1 To n
Set m = matches(i - 1)
' Map back to document coordinates
startInDoc = bodyRng.Start + m.FirstIndex
lengthInDoc = m.Length
arrStart(i) = startInDoc
arrLen(i) = lengthInDoc
arrText(i) = CleanOneLine(m.SubMatches(0)) ' inner text only
' Page number (guard errors just in case)
Dim hitRng As Range
Set hitRng = doc.Range(startInDoc, startInDoc + lengthInDoc)
On Error Resume Next
arrPage(i) = hitRng.Information(wdActiveEndAdjustedPageNumber)
If Err.Number <> 0 Then
Err.Clear: arrPage(i) = 0
End If
On Error GoTo 0
' Context snippet around the entire [ ... ] region
arrCtx(i) = GetContextSnippet(doc, startInDoc, lengthInDoc, 45)
Next i
RenderResultsTable arrText, arrPage, arrCtx
MsgBox "Bracketed-text report created.", vbInformation
End Sub
' =================
' RENDER TO NEW DOC
' =================
Private Sub RenderResultsTable(ByRef arrText() As String, ByRef arrPage() As Long, ByRef arrCtx() As String)
Dim outDoc As Document: Set outDoc = Documents.Add
outDoc.Activate
Selection.Style = wdStyleHeading1
Selection.TypeText "Bracketed Text Report"
Selection.TypeParagraph
Selection.Style = wdStyleNormal
Selection.TypeText "Generated: " & Format(Now, "yyyy-mm-dd hh:nn")
Selection.TypeParagraph: Selection.TypeParagraph
Dim n As Long: n = UBound(arrText) - LBound(arrText) + 1
If n <= 0 Then
Selection.TypeText "No results."
Exit Sub
End If
Dim tbl As Table
Set tbl = outDoc.Tables.Add(Selection.Range, n + 1, 4)
With tbl
.Style = "Table Grid"
.Cell(1, 1).Range.Text = "#"
.Cell(1, 2).Range.Text = "Extracted Text"
.Cell(1, 3).Range.Text = "Page"
.Cell(1, 4).Range.Text = "Context"
.Rows(1).Range.Bold = True
End With
Dim i As Long, row As Long
row = 2
For i = LBound(arrText) To UBound(arrText)
tbl.Cell(row, 1).Range.Text = CStr(i - LBound(arrText) + 1)
tbl.Cell(row, 2).Range.Text = arrText(i)
If arrPage(i) > 0 Then
tbl.Cell(row, 3).Range.Text = CStr(arrPage(i))
Else
tbl.Cell(row, 3).Range.Text = "-"
End If
tbl.Cell(row, 4).Range.Text = arrCtx(i)
row = row + 1
Next i
' Nice column widths (percent)
tbl.Columns(1).PreferredWidthType = wdPreferredWidthPercent: tbl.Columns(1).PreferredWidth = 6
tbl.Columns(2).PreferredWidthType = wdPreferredWidthPercent: tbl.Columns(2).PreferredWidth = 39
tbl.Columns(3).PreferredWidthType = wdPreferredWidthPercent: tbl.Columns(3).PreferredWidth = 8
tbl.Columns(4).PreferredWidthType = wdPreferredWidthPercent: tbl.Columns(4).PreferredWidth = 47
End Sub
' ========================
' CONTEXT & SMALL HELPERS
' ========================
Private Function GetContextSnippet(doc As Document, ByVal startInDoc As Long, ByVal lengthInDoc As Long, ByVal wing As Long) As String
Dim L As Long, R As Long
L = MaxLng(0, startInDoc - wing)
R = MinLng(doc.Content.End, startInDoc + lengthInDoc + wing)
Dim leftR As Range, rightR As Range, hitR As Range
Set hitR = doc.Range(startInDoc, startInDoc + lengthInDoc)
Set leftR = doc.Range(L, startInDoc)
Set rightR = doc.Range(startInDoc + lengthInDoc, R)
GetContextSnippet = "…" & CleanOneLine(leftR.Text) & "[" & CleanOneLine(hitR.Text) & "]" & CleanOneLine(rightR.Text) & "…"
End Function
Private Function CleanOneLine(ByVal s As String) As String
s = Replace$(s, vbCr, " ")
s = Replace$(s, vbLf, " ")
s = Replace$(s, Chr$(160), " ")
Do While InStr(s, " ") > 0
s = Replace$(s, " ", " ")
Loop
CleanOneLine = Trim$(s)
End Function
Private Function MinLng(a As Long, b As Long) As Long
If a < b Then MinLng = a Else MinLng = b
End Function
Private Function MaxLng(a As Long, b As Long) As Long
If a > b Then MaxLng = a Else MaxLng = b
End Function
I want to tell my fellow lawyer coders about this new thing called Vibe Coding.
So, what is it? Vibe coding is an AI-powered development approach where a human communicates with an AI agent in natural language to generate functional code, focusing on high-level ideas and outcomes rather than intricate coding details. Popularised by OpenAI co-founder Andrej Karpathy in early 2025, this method allows users to describe desired app functionality and rely on the AI to handle implementation, accelerating development and making it accessible to those with limited programming experience.
Vibe coding allows you as a developer to concentrate on the creative aspects of app building, like user experience and functionality, instead of getting bogged down in technical specifics. Technical specifics always slowed down my coding and left me frustrated.
You essentially prompt your way to producing beautiful code.
Here is an example. Using your favourite AI product such as ChatGPT or Claude use the prompt
"create me a VBA macro that searches through a word document to find Capitalised terms."
You will receive something like the visual basic code below, as your output from the prompt
Option Explicit
' ========================= ' CAPITALISED TERMS FINDER ' ========================= ' Scans the main body of the active document for Title-Case terms (1–5 words), ' skips first word of each sentence, deduplicates, counts, and reports: ' Term | Count | First Page | First Context. ' ' Run: FindCapitalisedTerms_Report ' -------------------------
Sub FindCapitalisedTerms_Report() Dim results As Object: Set results = CreateObject("Scripting.Dictionary") Dim stopList As Object: Set stopList = BuildStopList()
' ---- Regex setup (safe pattern) ---- Dim rx As Object: Set rx = CreateObject("VBScript.RegExp") rx.Global = True rx.IgnoreCase = False rx.Multiline = True ' 1–5 Title-Case words; allow internal hyphen or apostrophe (straight or curly) ' NOTE: hyphen is first in the char class to avoid "invalid range" errors. rx.Pattern = "\b(?:[A-Z][a-z]{2,}(?:[-’'][A-Za-z]{2,})?)(?:\s+(?:[A-Z][a-z]{2,}(?:[-’'][A-Za-z]{2,})?)){0,4}\b"
Dim doc As Document: Set doc = ActiveDocument
' Work only in the main story (avoids header/footer/textbox surprises) Dim bodyRng As Range Set bodyRng = doc.StoryRanges(wdMainTextStory)
Dim s As Range, scanRng As Range Dim m As Object, matches As Object Dim term As String Dim startInDoc As Long, lengthInDoc As Long, pg As Long Dim ctx As String
For Each s In bodyRng.Sentences If s.words.Count > 1 Then Set scanRng = s.Duplicate ' Skip the first word (most common false positive) On Error Resume Next scanRng.Start = s.words(2).Start If Err.Number <> 0 Then Err.Clear On Error GoTo 0 GoTo NextSentence End If On Error GoTo 0
' Guard Execute with Test (avoids odd range errors) If rx.Test(scanRng.Text) Then Set matches = rx.Execute(scanRng.Text) For Each m In matches term = Trim$(m.Value) If ShouldKeepTerm(term, stopList) Then startInDoc = scanRng.Start + m.FirstIndex lengthInDoc = m.Length
Dim hitRng As Range Set hitRng = doc.Range(startInDoc, startInDoc + lengthInDoc)
' Page lookup can fail in unusual views/objects; guard it. On Error Resume Next pg = hitRng.Information(wdActiveEndAdjustedPageNumber) If Err.Number <> 0 Then Err.Clear: pg = 0 End If On Error GoTo 0
If results.Exists(term) Then Dim parts() As String parts = Split(results(term), "|", 3) parts(0) = CStr(CLng(parts(0)) + 1) results(term) = Join(parts, "|") Else results.Add term, "1|" & CStr(pg) & "|" & ctx End If End If Next m End If End If NextSentence: Next s
RenderReport results MsgBox "Capitalised-terms report created.", vbInformation End Sub
' ------------------------- ' Filtering ' ------------------------- Private Function ShouldKeepTerm(ByVal term As String, ByVal stopList As Object) As Boolean Dim t As String: t = Trim$(term)
' Exclude ALL-CAPS tokens outright If t = UCase$(t) Then ShouldKeepTerm = False: Exit Function
' Single word? If InStr(t, " ") = 0 Then If Len(t) < 3 Then ShouldKeepTerm = False: Exit Function If stopList.Exists(t) Then ShouldKeepTerm = False: Exit Function Else ' For multi-word terms, keep if at least one word isn't on the stop list Dim words() As String, i As Long, ok As Boolean words = Split(t, " ") ok = False For i = LBound(words) To UBound(words) If Not stopList.Exists(words(i)) Then ok = True: Exit For Next i If Not ok Then ShouldKeepTerm = False: Exit Function End If
ShouldKeepTerm = True End Function
Private Function BuildStopList() As Object Dim d As Object: Set d = CreateObject("Scripting.Dictionary") Dim arr As Variant arr = Array( _ "The", "A", "An", "And", "Or", "Of", "For", "To", "In", "On", "At", "By", _ "I", "You", "We", "He", "She", "They", _ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday", _ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", _ "Section", "Schedule", "Figure", "Table") Dim i As Long For i = LBound(arr) To UBound(arr): d(arr(i)) = True: Next i Set BuildStopList = d End Function
' ------------------------- ' Context & utilities ' ------------------------- Private Function GetContextSnippet(doc As Document, ByVal startInDoc As Long, ByVal lengthInDoc As Long, ByVal wing As Long) As String Dim L As Long, R As Long L = MaxLng(0, startInDoc - wing) R = MinLng(doc.Content.End, startInDoc + lengthInDoc + wing)
Dim leftR As Range, rightR As Range, hitR As Range Set hitR = doc.Range(startInDoc, startInDoc + lengthInDoc) Set leftR = doc.Range(L, startInDoc) Set rightR = doc.Range(startInDoc + lengthInDoc, R)
GetContextSnippet = "…" & CleanOneLine(leftR.Text) & "[" & _ CleanOneLine(hitR.Text) & "]" & _ CleanOneLine(rightR.Text) & "…" End Function
Private Function CleanOneLine(ByVal s As String) As String s = Replace$(s, vbCr, " ") s = Replace$(s, vbLf, " ") s = Replace$(s, Chr$(160), " ") Do While InStr(s, " ") > 0 s = Replace$(s, " ", " ") Loop CleanOneLine = Trim$(s) End Function
Private Function MinLng(a As Long, b As Long) As Long If a < b Then MinLng = a Else MinLng = b End Function
Private Function MaxLng(a As Long, b As Long) As Long If a > b Then MaxLng = a Else MaxLng = b End Function
' ------------------------- ' Report rendering ' ------------------------- Private Sub RenderReport(results As Object) Dim outDoc As Document: Set outDoc = Documents.Add outDoc.Activate
Dim n As Long: n = results.Count If n = 0 Then Selection.TypeText "No capitalised terms found (given current heuristics)." Exit Sub End If
Dim tbl As Table Set tbl = outDoc.Tables.Add(Selection.Range, n + 1, 4) With tbl .Style = "Table Grid" .Cell(1, 1).Range.Text = "Term" .Cell(1, 2).Range.Text = "Count" .Cell(1, 3).Range.Text = "First Page" .Cell(1, 4).Range.Text = "First Context" .Rows(1).Range.Bold = True End With
' Alphabetical sort for a traditional, predictable report Dim keys() As String, i As Long, row As Long, k As Variant, parts() As String ReDim keys(0 To n - 1) i = 0 For Each k In results.keys: keys(i) = CStr(k): i = i + 1: Next k QuickSort keys, LBound(keys), UBound(keys)
row = 2 For i = LBound(keys) To UBound(keys) parts = Split(results(keys(i)), "|", 3) tbl.Cell(row, 1).Range.Text = keys(i) tbl.Cell(row, 2).Range.Text = parts(0) tbl.Cell(row, 3).Range.Text = parts(1) tbl.Cell(row, 4).Range.Text = parts(2) row = row + 1 Next i
' Simple case-insensitive quicksort for string arrays Private Sub QuickSort(arr() As String, ByVal first As Long, ByVal last As Long) Dim i As Long, j As Long, pivot As String, temp As String i = first: j = last pivot = arr((first + last) \ 2) Do While i <= j Do While StrComp(arr(i), pivot, vbTextCompare) < 0: i = i + 1: Loop Do While StrComp(arr(j), pivot, vbTextCompare) > 0: j = j - 1: Loop If i <= j Then temp = arr(i): arr(i) = arr(j): arr(j) = temp i = i + 1: j = j - 1 End If Loop If first < j Then QuickSort arr, first, j If i < last Then QuickSort arr, i, last End Sub
How to use
-Open your Word doc which includes the contract (which includes Defined Terms).
-Press Alt+F11 → Insert → Module → paste the code from the AI product you used.
-Close the editor and run View → Macros → FindCapitalisedTerms_Report. A new document appears with a table: Term | Count | First Page | First Context. with the
Amazing. This would have taken weeks without Vibe coding!
The control of fire and the development of artificial general intelligence (AI) are both transformative milestones in human history, expanding our capabilities while introducing significant risks. Fire allowed early humans to cook food, stay warm, and protect themselves, leading to biological and social advancements. Similarly, AI has the potential to revolutionise industries, automate cognitive tasks, and drive scientific breakthroughs.
A key similarity is the challenge of control. Fire, while beneficial, also caused destruction through wildfires and accidents. Early societies had to develop methods to contain and regulate its use. Likewise, AI presents risks such as misaligned decision-making, ethical concerns, and unintended consequences. Just as humans mastered fire through safety measures, AI must be governed carefully to prevent harm.
Another difference is pace—fire was integrated over millennia, while AI could emerge within decades, requiring immediate safeguards. If left unchecked, AI could lead to mass unemployment, security risks, or loss of human oversight.
Ultimately, both fire and AI represent dual potential—great advancement or catastrophic consequences. Learning from history, humanity must proactively manage AI through regulations and ethical frameworks, ensuring that it serves as a force for progress rather than destruction.
“Technology is exponential and exponentials are deceptive” – the rapid and often misleading nature of technological progress.
Many technologies, especially in computing and artificial intelligence, follow an exponential growth pattern. This means their capabilities double over regular intervals. We’ve all heard of Moore’s Law – the number of transistors on a chip doubles roughly every two years. However, exponentials are deceptive because humans naturally think in linear terms (steady, gradual change).
Neuroplasticity or the human brain’s ability to change, adapt, and reorganize itself throughout life in response to experiences is slow. Exponential growth starts slow and then explodes. This can be misleading because it catches people off guard.
For example, early AI chatbots were weak, so many dismissed AI as a niche technology. But in just a few years, AI tools like ChatGPT, Midjourney, and autonomous agents will have transformed industries.
Use of AI tools in Universities and Courts will be commonplace, encouraged and integrated into curriculum and substantive law and procedure. Just like how mobile phones changed how we interact with technology, AI is changing what technology can do for us humans. This concept warns us to pay attention early to exponential trends—whether in AI, biotech, healthcare or climate change—because by the time they become obvious, they might be unstoppable.
Artificial intelligence and the autonomous systems that embed it have become the brains of the modern data economy. As such, they have started to reshape human values, trust, and power around the world. Whether in law, medicine, money, or love, technologies powered by forms of artificial intelligence are playing an increasingly prominent role in our lives.
New AI technologies can help drive cars, treat damaged brains and nudge workers to be more productive, but they also can threaten, manipulate, and alienate us from others. They can pit nation against nation, but they also can help the global community tackle some of its greatest challenges from food crises to global climate change.
As we cede more decisions to thinking machines, we face new questions about staying safe, keeping a job and having a say over the direction of our lives.
How AI evolves and what role it takes in our lives for better or worse, might depend on our race, gender, age, behaviour, cognitive capacity or nationality.
This presents manifold ethical and cross-cultural dilemmas.
Artificial intelligence is set to profoundly reshape the future of law by enhancing efficiency, accuracy, and access to justice. AI tools can streamline legal research, automate document review, and predict case outcomes, reducing the time and cost of legal services. Smart contracts and AI-driven compliance systems may transform commercial transactions and regulatory oversight.
While AI cannot replace human judgment or ethical reasoning, it will augment lawyers’ capabilities, allowing them to focus on higher-order tasks.
As the law evolves to address AI’s own legal and ethical implications, practitioners must adapt, ensuring technology serves justice, not subverts it.
The product of all Gen AI generated research, even if apparently polished and convincing, should be closely and carefully scrutinised and verified for accuracy, completeness, currency and suitability before making any use of it. Gen AI research should not be used as a substitute for personal research by traditional methods.
Will artificial intelligence make the legal community more innovative? Access to artificial intelligence (AI) has the potential to make lawyers more innovative by streamlining routine tasks, enhancing legal research, and uncovering patterns in complex data. With AI handling document review, contract analysis, and predictive analytics, lawyers can redirect their time toward strategy, creative argumentation, and novel legal solutions. This shift encourages more forward-thinking approaches to litigation and advisory work. However, innovation will ultimately depend on how willing legal professionals are to embrace and integrate AI ethically and strategically into their practices, preserving the profession’s judgment and human insight while leveraging technological advancement. Tradition and innovation can thus walk hand in hand.