Phoster

Research and Development

Alignment and Legal Information Retrieval

Introduction

The challenge addressed here is that of ensuring that all applicable rules, laws, and regulations are loaded into artificial-intelligence agents' working memories as they encounter wide, potentially open-ended, sets of situations.

By agents being able to search for, retrieve, and load applicable rules, laws, and regulations into their working memories, they could be in alignment with these items and subsequently select actions in accordance with them.

The same components with which to enable these capabilities for artificial-intelligence agents could be of additional use for developing contextual search engines for rules, laws, and regulations.

Contextual search engines would advance the fields of legal information retrieval, legal informatics, and computational law. Combined with natural-language understanding and related technologies for comprehending stories, individuals would be able to input natural-language stories to establish those contexts with which to retrieve applicable rules, laws, and regulations.

Beyond providing search results sorted with respect to numerical measures, e.g., relevance, contextual search engines could be explainable. Explainable contextual search engines could provide one or more arguments concerning the applicability of each search result to provided stories and their elements.

There are also to consider conversational explainable contextual search engines where search engines could, through dialogue, ask questions about narrated stories to better retrieve applicable rules, laws, and regulations.

Alignment

The goal of artificial-intelligence alignment is to ensure that artificial intelligence systems are properly aligned with human values (Gabriel, 2020).

This goal can be phrased as: (1) agents doing what they are instructed to do, (2) agents doing what they are intended to do, (3) agents doing what humans' behavior reveals them to prefer, (4) agents doing what humans would, if rational and informed, want them to do, (5) agents doing what is in the best interests of humans, objectively, or (6) agents doing what they morally ought, as defined by human individuals and society.

Agents are expected to comply with rules, laws, and regulations. The number of rules, laws, and regulations is expected to be vast. For each rule, law, and regulation, for each considered action, an agent is expected to verify that that action is in compliance. Ideally, agents will be able to act in real-time while performing these computations.

Legal Information Retrieval

"In any given matter, before legal reasoning can take place, the reasoning agent must first engage in a task of 'law search' to identify the legal knowledge – cases, statutes, or regulations – that bear on the questions being addressed. This task may seem straightforward or obvious, but upon inspection, it presents difficult problems of definition and is challenging to represent in a tractable formalization that can be computationally executed" (Dadgostari, Guim, Beling, Livermore, & Rockmore, 2021).

Contextual search engines could be of use for agents to search for and retrieve those rules, laws, and regulations applicable to their internal states, world models, and working memory contents.

These search engines could be explainable, providing arguments concerning the applicability of retrieved items. These arguments might involve variable bindings, provide structured knowledge alongside natural-language content, use boilerplate natural-language generation, or use large language models.

These search engines could be conversational and, through dialogue, ask questions about narrated stories to better retrieve applicable rules, laws, and regulations.

Inspectability and Verifiability

Agents' internal states, world models, and working memory contents could be inspected to determine whether applicable rules, laws, and regulations were properly loaded and available.

Techniques for inducing agents' internal states, world models, and working memory contents include narration, simulation and the related replaying of environments, and other forms of direct or manual induction.

In addition to collecting event logs involving agents' internal states, world models, and working memories, multi-track streams and recordings of these and their dynamics could be created to be accompanied by recordings of agents' environments.

Specifying the desirabilities, or values, of artificial-intelligence agents' selections of particular actions, for particular states of worlds, is unwieldy beyond a very limited set of state-action-value tuples. The purpose of machine learning is to train on a subset of states and have the resulting agent generalize an ability to choose high-value actions in unencountered circumstances (Nay, 2022). As agents with varying architectures for internal states, world models, and working memories learn from datasets and from experiences in environments, as agents generalize over their experiences, their inspectability and verifiability will prove to be considerably useful.

In the future, these development and operations processes of inducing contexts and verifying that applicable rules, laws, and regulations are loaded into agents could be increasingly computer-aided or automated.

Related Work

Hybrid artificial-intelligence architectures include those capable of searching for, retrieving, loading, adapting, creating, and storing computational representations of rules, laws, and regulations.

Large-language-model-based agents and multi-agent systems could query legal informatics and search components in their workflows to search for and retrieve applicable rules, laws, and regulations (Wu, Bansal, Zhang, Wu, Zhang, Zhu, Li, Jiang, Zhang, & Wang, 2023).

Stateful large-language-model-based agents and multi-agent systems are recently being explored (Wu, Yue, Zhang, Wang, & Wu, 2024).

Embedding vectors could be used to represent agents' states and vector databases could be used to store and retrieve applicable rules, laws, and regulations.

Uses of multi-objective reinforcement learning with respect to artificial-intelligence alignment are recently being explored (Rodriguez-Soto, Serramia, Lopez-Sanchez, & Rodriguez-Aguilar, 2022).

Bibliography

Dadgostari, Faraz, Mauricio Guim, Peter A. Beling, Michael A. Livermore, and Daniel N. Rockmore. "Modeling law search as prediction." Artificial Intelligence and Law 29 (2021): 3-34.

Gabriel, Iason. "Artificial intelligence, values, and alignment." Minds and Machines 30, no. 3 (2020): 411-437.

Nay, John J. "Law informs code: A legal informatics approach to aligning artificial intelligence with humans." Northwestern Journal of Technology and Intellectual Property 20 (2022): 309.

Rodriguez-Soto, Manel, Marc Serramia, Maite Lopez-Sanchez, and Juan A. Rodriguez-Aguilar. "Instilling moral value alignment by means of multi-objective reinforcement learning." Ethics and Information Technology 24, no. 1 (2022): 9.

Wu, Qingyun, Gagan Bansal, Jieyu Zhang, Yiran Wu, Shaokun Zhang, Erkang Zhu, Beibin Li, Li Jiang, Xiaoyun Zhang, and Chi Wang. "AutoGen: Enabling next-gen LLM applications via multi-agent conversation framework." arXiv preprint arXiv:2308.08155 (2023).

Wu, Yiran, Tianwei Yue, Shaokun Zhang, Chi Wang, and Qingyun Wu. "StateFlow: Enhancing LLM task-solving through state-driven workflows." arXiv preprint arXiv:2403.11322 (2024).