In today's legal industry, there seems to be a significant disconnect between the 19th century and the 21st century. There is an enormous amount of legacy legislation sitting around collecting dust while robots are expected to perform approximately 50 percent of all lawyer tasks by the year 2027. Creating an artificial intelligence (AI)-based legal assistant in our country is no longer simply a novelty item to demonstrate capabilities to investors; it has become a legitimate tool that is transforming how legal work is done, achieving this through the regular automation of everyday tasks by using robots instead of humans.
«In my eight years of working with automation, I have personally witnessed companies spend millions of dollars on information technology staff to complete tasks that I knew, as far back as 12 years ago, could easily be done with only a couple of text queries (prompts). When a person is looking to make technology available to everyone, my answer is to stop thinking of technology as programming and to start thinking about it as a process.»
Introduction to AI for Lawyers
Why provide a lengthy introduction? An AI lawyer is a large language model (LLM) trained on large sets of legal data and therefore is able to provide meaningful information related to legal concepts. The reason for this is to make sure that legal terms and concepts will be understandable by the LLM. The LLM will be able to analyze statutes, court decisions, case law, and other legal instruments.

Chatbots in the legal field perform three essential functions:
- Information requests. A bot can provide a response with references within 10 to 15 seconds for any statutes or regulations requested. This eliminates the frustration of having to comb through various databases for hours searching for information. The chatbot accomplishes this task painlessly and quickly.
- Preliminary document review. A 50-page contract can be analyzed in one minute. Risky and potentially problematic clauses will be identified and highlighted quickly; sections that are not in compliance with applicable laws will be automatically detected as well.
- Text generation. Documents such as claims, responses or contracts can be generated according to a template based upon the specifics of each case. For example, the time it takes a lawyer to complete an hour’s worth of work could be condensed into five minutes through the use of chatbots.
The main advantage of AI in providing legal assistance is that it synthesizes answers based on legal reasoning as opposed to simply searching for words within a database. For example, if you ask the chatbot what the difference is between Russian labor law and migration law for Kazakhstan, the bot will know.
Legal Consultation Market and Automation’s Role
In 2024 LegalTech in Russia will total around 12 billion rubles. This represents a CAGR (Compound Annual Growth Rate) of 34%. These figures provide insight into the current state of the market. The reason is clear: there is a national shortage of attorneys (especially in rural areas) resulting in extremely high hourly rates (over 8,500 rubles/hour) for services provided by attorneys in Moscow and because public sector services continue to migrate to digital platforms. Lastly, people are expected to prefer resolving their issues quickly and affordably.
Automation will eliminate common pain points in legal consultation by providing:
- First-response legal assistance. Standard inquiries, which represent roughly 70% of the total number of inquiries received by legal service professionals consist mainly of: termination of contracts; labor disputes; and inheritance matters. An AI bot can perform these functions independently — without a qualified attorney. This frees up lawyer time to concentrate on more complicated matters.
- Due diligence for M&A transactions. It can take up to two weeks to conduct document review and analysis; with AI technology, this period can be shortened to only three days by automatically identifying inconsistencies and contradictions in the documents.
- Monitoring of legislation changes. This can be done automatically for different subject matter areas (such as taxes, export and import regulations, and licensing) with notification sent to the proper agencies when changes are made.
- Preparing procedural documents. It is easier, as you can generate lawsuits, complaints, and motions for specific circumstances using AI. Use of AI in law firms has lowered the cost of the legal department by up to 28% and increased the overall productivity of the company by up to 60%.
Example: A law firm in Novosibirsk, Russia, launched a chatbot to provide labor law consultation. As a result, they received 1,840 total inquiries in the first three months and were able to close approximately 90% of those without the involvement of any staff attorneys! In addition, the staff lawyers saved approximately 310 hours of their time on these inquiries, while adding new corporate clients to their law firm.
Key Technologies for Creating an AI Lawyer
Natural language processing is the backbone of all AI legal processes. Without NLP, an AI system would not be able to process legal terms, understand the organisation of legal documents, or identify rules/parties in a legal environment.
The following are the most important NLP technologies:
- Named entity recognition to identify the key entities in a given document (for instance — our party to an agreement, the date, article number, etc.). Accuracy rates while working with legal materials have been shown to consistently range from 94% to 97%.
- Dependency parsing to syntactically identify the relationships among words and phrases in order to properly understand a legal document.
- Semantic search technology enabling users to search documents by the searched term's meaning (rather than keyword). Results of searches will be more relevant to users using this technology.
- Classification of text/document types by subject/theme (91%-96% accuracy).
Methods Used (Machine Learning):
- Supervised Learning (SML) — train on labeled datasets; for example: 82%-89% accuracy for judge prediction of case outcome after training on all 50 states successor case examples only (judge's past cases).
- Transfer Learning (TL) — fine-tunes the single model to narrow/specific tasks; reduces the number of examples required for training by 80%.
- Few-Shot Learning (FSL) — train on as few examples as possible; critical for infrequent category types (i.e., rare cases).
- Active Learning (AL) — selects (for expert labeling) examples that are difficult to label; reduces the number of examples needed to label/prep for 4-7 times previously needed.
Use of Transformers and GPT in LegalTech
Transformers represent a paradigm shift in the way that language is interpreted — instead of reading words as they are encountered one at a time, these models can review the whole context simultaneously. Therefore GPT models are able to create new text through the generation of the next word with memory (of up to 128,000 tokens) allowing processing of long documents while maintaining the relationship between the different sections.
Benefits of utilizing GPT in the Legal Industry:
- Zero-shot and few-shot capabilities. The model has the ability to generate responses to new tasks based purely on the prompt given with no additional training.
- The ability to create structured documents. Creating legal documents that meet a defined format with an average quality rating between 7.8 and 8.4 out of 10.
Ways to adapt GPT for Legal Work to Enhance Accuracy:
- Fine-tune the model. To maximize the accuracy of extracting information from legal documents, increase from 64% to 89%-93% through further training on additional data sets within the legal domain.
- Implement Retrieval Augmented Generation (RAG). Utilizing knowledge bases and text generation to combine the two; significantly decreasing errors from 12%-18% to 2%-4%.
- Utilize Prompt Engineering. This consists of carefully formatted templates and guidelines for making legal-related requests and solving inaccurate responses by providing the appropriate instructions to create a legal document.
- Constitutional AI (CAI). In this approach, the model is trained using ethical rules to avoid operating outside its defined area of expertise.
Example: A legal firm utilized GPT-4 and custom methods to enhance the reviewing of lease agreements by cutting back review time from 45 minutes to three and increasing accuracy of risk detection to 94%.
Steps to Creating an AI Legal Assistant
AI Quality = Data Quality; there are no exceptions. Collection of a wide range of data: laws and court decisions, legal doctrine, scholarly articles, and contracts in an anonymized format — the more volume and more variety the better.
The major steps a person must go through to clean, structure, annotate, index and validate their collected data are as follows:
- Cleaning — remove duplicates/junk.
- Structuring — create labels for headings, clauses, and other notes.
- Annotating — designate entities (name/date/amount).
- Indexing — create vectors (data point representation) of data for quick searches.
- Expert validation — verify that the integrity of the collected data is of sufficient quality.
At each stage of this activity, we find that various legal requirements play a huge role, i.e. anonymization of individual data (152-FZ), adherence to copyright requirements and protecting trade secrets.
Training the Model on Legal Semantics and Nuances
First, training the model on the semantics and nuances of legal lingo forms the basis for this method. Legal terminology has its own specific vocabulary and the structure along with many nuances. Training a model to recognize these terminologies along with specific examples of cases that could be classified using those terminologies will normally occur in three sub-stages:
- First, on a pre-training basis work with a general (universal corpus) dataset and then develop the specialized (narrow) vocabulary/language aspect of those terms including but not limited to "subrogation", "assignment", etc.
- Second, develop an understanding of how terms are used to form legal rationale by combining research documentation from the practice of law, i.e. various firms will either have their own public record or be a part of a larger company because there is a significant difference in how they apply and refer to terminology.
- Third, final level of training will create a combination of the model’s knowledge of the terminology and its ability to demonstrate how the terminology has been applied.
Measuring the performance of the system produces metrics such as answer accuracy (85 to 92%), citation quality (greater than 95%), legal correctness, lack of any harmful advice, etc.
Example: Fine-tuning GPT-3 with real estate closing documents, which improved the ability to accurately identify conditions under which the transfer of ownership occurs from 77% to 96% as well as increasing the response speed.
Setting Up Chatbot Functionality for Consultations
The components of the chatbot system include:
- Frontend: The user interface that allows for the comfortable uploading of documents.
- Dialog Manager: Allows for the management of context in addition to clarifying questions.
- NLU: Responsible for determining the user's intent and identifying any relevant details regarding their request.
- AI Reasoning Engine: An engine that processes user input into an AI reasoning model and generates an answer, using prompts and data from the knowledge base.
- Response Validator: After the AI produces an answer, it must validate that the answer is accurate. If the answer is inaccurate, it will typically refer the requestor to a legal professional for a complete and accurate response.
- Logging and Analytics: The logging and analytics will allow for the continual collection of data that can be used to help improve the overall performance of the chatbot.
Common Scenarios:
- Users can ask simple questions and receive an answer with links to regulations.
- Users may pose a question that does not have a specific answer and requires clarification dialogue steps that request the necessary information required to process their request.
- Users may upload a document and ask for an analysis of the document to identify any risks associated with the document.
- Users may request the creation of documents using various templates.
- Users may pose questions to the chatbot that require a live attorney to assist.
It generally takes 15 to 45 minutes to set up a chatbot, with a starting monthly subscription fee from $29 per month, excluding the fee for OpenAI API tokens.
Ensuring Legal Accuracy and Regulatory Compliance
Legal accuracy and compliance with applicable regulations is non-negotiable; companies must consider themselves to be legally compliant. The following recommendations can help organizations solve the legal compliance problem:
- Follow the RAG methodology, which can help eliminate inaccuracies by ensuring that the regulatory environment is reviewed before responding to the user's inquiry.
- Use the chain-of-thought prompting method to explain why an answer was provided in a specific way.
- Using multiple models to verify answers concurrently involves multi-model verification.
- A human-in-the-loop approach incorporates the knowledge and understanding of human specialists.
- The database will have version control to maintain history regarding the effect of changes in laws over time.
Compliance Areas:
- The areas of compliance consist of GDPR and 152-FZ, which include anonymization, encryption, and limiting the amount of time data can be retained.
- Attorney-client privilege requires protecting client information from third parties through various means of protection at the AI level.
- It must be made clear that the AI's assistance is provided for informational purposes only.
Example: An automatic anonymization of an individual's private information may be used to comply with 152-FZ and prevent any information from being stolen.
Integration of the Full Range of Legal Consultations and Their Automation
Using AI as an attorney, a specialist can automate the repetitive tasks completed by the specialist for the purpose of relieving the specialist of these tasks:
- Providing the first line of client support – providing answers to typical questions and filtering out complex requests.
- Providing support to junior lawyers in the preparation of required documentation.
- Analysing contracts by researching the risks and deviations from the example.
- Monitoring legislative changes through notifications of the change.
- Identifying the relevant case law to prepare for litigation.
Integration with CRM software (Bitrix24, amoCRM) and electronic document management systems, along with corporate knowledge portals through an API, allow for the transfer of data through an API in any required amount while maintaining integrity of the original data.
Using APIs and Platforms for Automation
Examples of APIs or platforms that will be used in LegalTech:
- OpenAI API (GPT-4, etc.) will provide services for the generation and analysis of text. The cost associated with the OpenAI API will vary based on the model used for the generated text and the volume of text being generated.
- Anthropic Claude API will provide the same level of service as OpenAI but will have a larger contextual scope.
- Google Gemini API will provide the same level of service as OpenAI with a greater contextual scope and will enable the analysis of the contents of very large files at once.
- API Consultplus, a subscription-based legal database, allows you to quickly access commercial and legal database resources (for a fee).
- Legal practice APIs provide a programmatic connection to rulings (sud.ru, arbitr.ru).
No-code platforms (such as ASCN.AI, n8n, and Make) make it possible to create automations without knowledge of programming languages using visual builders and API connections.
Examples of Successful Cases and Existing Solutions
- DoNotPay (USA): An AI-powered chatbot that helps users fight parking tickets and obtain refunds from parking violations and tickets. DoNotPay has facilitated millions of inquiries for users, helping them save an average of $400 each on their fees.
- LawGeex (Israel): An AI-powered application that has analysed contracts with an accuracy rate of 94% to decrease review periods from 92 minutes to 26 seconds on average.
- Pravoved.ru automated 40% of all initial consultations, while Zakon.ru is a comprehensive website for legal searching (using semantic search technology) of judicial decisions.
- ASCN.AI Case: Falcon Finance leveraged AI-influenced litigation to identify arbitrage opportunities for making money through known gaps in the crypto economy. Falcon Finance generated $1,000 in only two hours after using an AI agent to obtain information, demonstrating the speed of obtaining information and the time savings provided by an AI solution.
Ethical and Legal Aspects of Applying an AI Lawyer
AI does not have a standing in law itself; rather, liability for AI errors falls to the developer, operator, or end user of an AI system or service.
In addition to this:
- Separate duties and responsibilities should be clarified.
- The user should be informed that they are receiving response to their request from an AI-powered service.
- AI provides traceability via logging, and a human must have the right to review, edit, and rewrite AI output, and switch from using the AI system to traditional research methods.
Information Protection, Security and Confidentiality
Security requirements include minimizing the quantity and encrypting all personal information collected on users in the use of the AI service.
How to protect data related to legal activity (AI lawyer) aid:
- Anonymization/Pseudonymization of information.
- Storage limits (right of erasure).
- Prohibiting the use of client information to train models unless you have consent of the client.
- Mandatory attorney/client/trade secret security — on-premise solutions/strictly enforced non-disclosure agreements (NDAs).
Example: Automated anonymization of data gave compliance with 152-FZ by removing risk of leakage.
Frequently Asked Questions (FAQ)
How to choose the right platform for an AI lawyer?
Selecting your platform can be based on what you want to achieve using this technology and how much you want to spend on it along with technical attributes of the platform.
| Criterion |
No Code (ASCN.AI) |
SaaS |
Custom Development |
| Implementation/Launching Time |
1-2 Days |
1 Day |
2-6 Months |
| Starting Cost |
$50-$200 |
$500-$5,000 |
$20,000-$100,000 |
| Flexibility of Functionality |
Medium |
Low |
Most |
| Team Requirements |
N/A |
N/A |
Need Python and DevOps skills |
| Data Control |
Partial (By API) |
No (SaaS) |
Full (On-Premise) |
What data is required to train your AI?
Minimum 500,000 to 1 million tokens in your profile category. Freshness, diversity and extensive expert labeling are critical. Databases must be updated periodically.
What are the limitations of legal automation?
- Legal automation is most limited by legal rules and LLM stumbles (hallucinations).
- RAG or expert control is required.
- Inability to creatively apply legal rules.
- Limitations on model context size.
- Can’t perfectly represent you as a court assistant.
- Legally responsible for errors.
- Can’t transmit confidential client data via public API without depersonalization.
- Must meet ethical standards (equal access, transparency).
- Can’t 100% replace the attorney for complex matters and negotiations.
Conclusions and Recommendations for Further Development
An AI lawyer is a tool that will profoundly change the legal industry by reducing your cost and time on the robotic aspects of your work while increasing accuracy and speed.
Start by creating a minimal prototype using a no-code platform and add safety/testing requirements using RAG. Always keep users informed of advisory nature of suggestions made to them and always maintain your logging system, thoroughly test the system and provide a legal disclaimer. Make improvements continuously.
The LegalTech marketplace will witness the widespread use of specialized artificial intelligence within 3-5 years, and legal rationale is evolving with it.
Disclaimer
The content of this article reflects the opinions of the authors only and does not replace legal or investment advice. When using an AI assistant, it is important to be mindful of intent and understand the application specific to each platform.