Skip to content

Legal automation: models, rules, and artificial intelligence

How to combine document assembly, rules, AI, and workflows to perform legal work.

Legal work can combine operations with different requirements. Filling in a party’s details, calculating an amount, interpreting a clause, and routing an exception for approval call for different mechanisms.

This guide explains how to combine templates, rules, artificial intelligence, and workflows. It complements the foundations of Computational Law and Expert Systems, focusing on how a solution is composed.

Mechanisms that can work together

MechanismFunctionExampleWhat needs to be defined
Field populationInsert values in defined positions.Identify the parties in a draft.Fields, formats, and data sources.
Document assemblyCompose a document using sections and conditions.Select clauses for a transaction.Templates, conditions, and approved versions.
Rules and inferenceApply explicit criteria to represented data.Check a condition and indicate a route.Required facts, rules, and exception handling.
Generative AIInterpret and produce content using context and instructions.Compare versions and prepare an analysis.Authorized materials, goal, and review criteria.
WorkflowsCoordinate steps, owners, and transitions.Request information and route a deliverable for approval.States, owners, conditions, and permitted actions.
IntegrationsQuery or update other environments.Record a deliverable in the client’s system.Identifiers, API contracts, permissions, and failure handling.

These mechanisms can be used individually or together. The choice depends on the problem, the stability of criteria, data quality, and the consequences of each operation.

Structured models and rules

A template can organize reusable content, variables, conditions, and presentation. The data model defines the meaning and format of information; rules establish how it contributes to generation or analysis.

For a rule-based operation, test cases can verify input conditions and expected results. This does not establish that the legal assumptions are correct: criteria need to be reviewed by the responsible professionals, and the data needs to reflect the situation under analysis.

An expert system adds a representation of domain knowledge and inference mechanisms. Its usefulness depends on the modeled scope and the handling of missing information, exceptions, and situations outside that scope.

In Looplex Builder, structured models and rules contribute to document generation. The documentation on legal logic objects and models explores how these elements are represented.

Artificial intelligence in the context of work

AI can support document interpretation, information organization, comparison of alternatives, and content production. Work should define its goal, available materials, and applicable guidance.

It is useful to distinguish three components: the model used, the information provided as context, and the tools the execution can call. Providing a policy as a reference does not, by itself, create an access restriction or a mandatory approval. Those controls need to be implemented in the responsible services and workflows.

In Looplex, the Assistant contributes to performing work, while Intelligence supports the assessment of information and possible next steps. Deliverables are examined against their purpose, the sources used, and the required review points.

Orchestration and human participation

A workflow coordinates transitions between operations: receiving documents, requesting additional information, conducting an analysis, preparing a deliverable, and routing it for review. Some steps follow stable rules; others depend on human assessment or interpretation of the context.

In Copilot, the professional leads the activity through interactions. In Autopilot, the platform conducts a delegated execution, including the defined steps and interventions. Workbench allows professionals to track and guide delegated work.

Continuing an execution in the background still requires defined owners, permissions, and conditions for moving forward. Implementation fundamentals are covered in Looplex Flows.

Example: reviewing a draft agreement

One possible composition includes the following steps:

  1. Preparation: identify the draft, its versions, and the purpose of the engagement.
  2. Structuring: identify parties, amounts, obligations, and other relevant information, verifying the required data.
  3. Analysis: compare terms against authorized references and criteria, using AI and rules as appropriate.
  4. Production: prepare suggestions or a new version by combining approved content with contextual drafting.
  5. Review: submit issues and changes to the responsible people, including exceptions to approval authority.
  6. Recording: preserve the approved version, decisions, and results of the integrations used.

This sequence is an example of solution design. Tools, transitions, and deliverables need to be defined for the implemented scope.

The platform organizes the experience and services

A digital experience platform, or DXP, describes a way to integrate capabilities and interactions throughout a journey. Field population, document assembly, inference, and AI describe processing mechanisms. Choosing a platform architecture and choosing these mechanisms are therefore complementary decisions.

In Looplex, the experience brings together matter management, document collections, work execution, and the tracking of results. Services and integrations allow these capabilities to be composed for the context. The Platform Engineering and Looplex Graph guides explore that architecture.

Validating the solution

Validation should reflect each component’s role. Rules and calculations require checks of inputs, conditions, and expected results. AI deliverables require assessment of fidelity to sources, adherence to instructions, and the handling of missing information. Workflows and integrations require verification of permissions, approvals, failures, and recovery.

The project should define which records allow an execution to be reconstructed, including versions, sources, decisions, and results. For more on the relationship between content and operations, see Structured documents, Ricardian contracts, and smart contracts.