HN user

HannesWes

6 karma
Posts0
Comments2
View on HN
No posts found.

Really fun to see this shared here! It is one of the most famous examples of rule-based reasoning in the field of AI & Law. The other option is case-based reasoning, where the starting point is cases - see e.g. HYPO [0].

Rule-based reasoning can be very powerful, as understanding and navigating legislation can be challenging and time-consuming. One limitation is overcoming a number of ambiguities, including:

- Unclear structure - sometimes, when reading legislation, the logical components of a legal article is not always entirely clear. Language is not like code, and even straightforward articles can have multiple possible interpretations [1].

- Open-textured legal terms - the law often has so-called open-textured terms (e.g. "reasonable"), which require an assessment on a case-by-case basis. Encoding such terms into logical rules is very hard, as they require a nuanced application. In my own work, I try to overcome this limitation by providing examples of how a specific term was applied from previous cases [2].

I am very interested to see how rule-based reasoning will evolve in light of generative AI. As you can imagine, mapping rules to a logical representation can be quite tedious, but LLM seems to be able to at least give a good draft as a starting point [3]. LLMs could also help reason with open-textured terms [4].

[0] Ashley, Kevin D, “Reasoning with cases and hypotheticals in HYPO” Crossref (1991) 34:6 International Journal of Man-Machine Studies 753–796.

[1] Ashley, Kevin D, Artificial Intelligence and Legal Analytics: New Tools for Law Practice in the Digital Age, 1st ed (Cambridge University Press, 2017) p.45.

[2] Westermann, Hannes & Karim Benyekhlef, JusticeBot: A Methodology for Building Augmented Intelligence Tools for Laypeople to Increase Access to Justice (Braga Portugal: ACM, 2023). https://arxiv.org/abs/2308.02032

[3] Janatian, Samyar et al, “From Text to Structure: Using Large Language Models to Support the Development of Legal Expert Systems” arXiv.org (2023), online: <http://arxiv.org/abs/2311.04911>.

[4] Westermann, Hannes, “Dallma: Semi-Structured Legal Reasoning and Drafting with Large Language Models” (2024) 2nd Workshop on Generative AI and Law, colocated with the International Conference on Machine Learning, online: <https://blog.genlaw.org/pdfs/genlaw_icml2024/58.pdf>.

This looks very interesting. I conducted some explorations of whether LLMs can be used to extract information from hand-written forms [0][1]. Such a system could allow users to snap pictures of forms and other legal documents, automatically extract structured information, and use this information to e.g. automatically fill out new forms or determine whether the user has the right to a government benefit.

The initial results were quite promising, as GPT-4o could reliably identify the correct place in the form for the information, and moderately reliably extract the values, even if the image was blurry or the text was sloppily written. Excited to see how Gemini 2.0 would do on this task!

[0] https://arxiv.org/abs/2412.15260

[1] https://github.com/hwestermann/AI4A2J_analyzing_images_of_le... (code and data)