International Journal of Technology and Emerging Research
DOI: 10.64823/ijter.2604032
People are still facing difficulty in understanding and ac- cessing legal information in India because legal content usually contains complex language and technical terms which are not easy for people who have not studied law [1], [2]. Also, legal information is distributed across different websites, portals and databases [3], [4]. Most of these platforms mainly depend on keyword-based searching, which requires some knowledge of legal terms [3], [5]. Because of this, users find it difficult to identify the correct law related to their situation. This creates a gap between the legal system and common people [1], [2].
To solve this problem, the proposed system AI Legal Buddy is developed as an intelligent legal information assistant which mainly focuses on the Indian legal framework. The system allows users to ask questions in natural language or through voice input. Instead of depending only on keywords, the sys- tem tries to understand the context of the query and provides relevant legal information using Retrieval-Augmented Gener- ation (RAG) [6], [7]. In this approach, the system retrieves useful legal data from stored database and then generates the response based on that information, which helps in improving the accuracy of the answers.
The system is developed using React for frontend and Supabase for backend services, where the user queries are processed and managed efficiently. The legal documents are stored in a database which supports retrieval based on meaning of the query rather than exact keyword matching [6], [7]. This makes the system more effective in understanding user intent. After retrieving the relevant legal content, the system gener- ates responses in a simplified format so that even users without legal background can understand it easily [8]. The aim is not only to provide information but also to make it clear and useful
for the user.
AI Legal Buddy also includes a basic safety and validation mechanism to promote responsible usage [9]. The system clearly mentions that the information provided is only for awareness and should not be considered as professional legal advice. By combining contextual understanding, intelligent retrieval using RAG, and simplified explanations, the system tries to reduce the gap between complex legal systems and common people [1], [2].
The main contributions of this work are listed below:
The remainder of this paper is organized as follows: Section II presents related work, Section III explains the motivation and problem statement, Section IV describes preliminaries, Section V explains the proposed methodology, Section VI discusses results, and Section VII concludes the paper.
Recent progress in Artificial Intelligence has played an important role in developing legal assistance systems [8], [10]. Many researchers have proposed AI-based legal assis- tants which can provide legal guidance automatically using natural language processing and machine learning techniques [8], [11]. These systems try to understand user queries and
generate suitable legal responses, which helps in faster access to legal information and also supports some legal processes.
Improving accessibility and inclusiveness is also an impor- tant area in this field. Some works introduced bilingual and multilingual legal assistants to reduce language barriers and allow users to interact in different languages [12]. Other stud- ies explain how AI can make legal services more affordable and reachable for common people [1], [12]. There are also some domain-specific chatbots developed for handling par- ticular legal issues, including sensitive cases, while machine learning based systems focus more on improving interaction and retrieval of relevant information [11].
Several researchers also focused on system design and information retrieval techniques. Legal chatbots using NLP, semantic search, and machine learning methods are devel- oped to improve the accuracy of retrieving legal data [6], [11]. Some systems focus on constitutional awareness, while others are designed for specific legal domains in different countries. Recent works show the use of Retrieval-Augmented Generation (RAG) and advanced models to provide better and more reliable legal information [6]. These approaches help in combining retrieval and generation, which improves the quality of responses [6], [7].
Ethical and regulatory aspects are also discussed in many research works [9], [13], [14]. Some researchers studied ethical chatbot design for handling socio-legal problems and also discussed risks related to generative AI tools [14]. Many papers highlight the importance of responsible AI usage, transparency, and need of human supervision in legal systems. Also, comparisons between generative chatbots and intent- based systems show that both have advantages and limitations in providing legal support [11].
Even though many improvements are seen in AI-based legal assistants, most of the existing systems still depend on intent-based methods, limited domain knowledge, or direct generative responses without strong verification [11]. This shows there is still need for systems which can give more accurate and reliable legal information.
The primary motivation behind developing Law Buddy is the difficulty faced by ordinary people in understanding and accessing legal information. In India, laws are usually written in complex and technical language, which makes them difficult for people without legal education to interpret. Although many legal resources are available online through different portals and databases, most of these platforms are intended for legal professionals. Because of this, common citizens often find it confusing to identify which laws apply to their specific situations and may feel stressed or discouraged when dealing with legal issues. This creates a noticeable gap between the legal system and public awareness.
Another important reason for this project is the need to in- crease legal literacy among citizens. Many people are not fully aware of their fundamental rights, legal remedies, or available
support services. By applying Artificial Intelligence techniques such as natural language processing and Retrieval-Augmented Generation, Law Buddy aims to convert complicated legal text into simple and easy-to-understand language.
Understanding and accessing legal information in India is difficult for common people because legal terms are com- plicated, resources are spread across many places, and laws are written in highly technical formats. Most existing legal platforms are mainly designed for lawyers and legal experts, and they depend on keyword-based searching. This type of search usually requires some prior legal knowledge. Because of this, many users cannot easily identify which laws are related to their real-life problems and often face difficulty in understanding legal documents.
Hence, there is a need for an intelligent system which can take questions in simple natural language, understand the context, retrieve correct legal information using RAG (Retrieval-Augmented Generation), and present it in an easy and understandable format. By using RAG, the system can fetch relevant legal data from stored database and generate more accurate responses instead of giving general answers.
The system should also support responsible use of AI by providing reliable information along with proper disclaimers, and it should clearly mention that it is not a replacement for professional legal advice.
Accessing legal information in India is still difficult for many people because legal content is usually written in complex language and contains many technical terms. Most of the laws are not easy to understand for users who do not have legal background [1], [2]. Because of this, people often feel confused while trying to find information related to their problems.
Another issue is that legal information is available in differ- ent places like websites, government portals and documents, which makes it difficult to collect everything in one place [3], [4]. Users need to search across multiple sources, and sometimes they may not even know where to start. This increases the time and effort required to get correct legal details.
Most existing systems depend on keyword-based search, which requires some knowledge about legal terms [3], [5]. If the user enters a query in normal language, the system may not return accurate results. Because of this, users are not able to clearly identify which laws or sections are related to their situation.
These challenges create a gap between legal systems and common people. So there is a need for a system which can simplify legal information and make it more accessible in an easy and understandable way.
In legal information systems, users usually describe their problems in normal everyday language instead of using formal legal terms. These queries may be incomplete, unclear, or written in a simple way, which makes it difficult for traditional systems to understand them properly [5], [8]. Because of this, it is important for the system to understand the actual meaning and intention behind the user query.
In this project, the system processes user input given in text or voice format. If the input is voice, it is first converted into text form. After that, the query is analyzed to understand the context and identify important information such as legal issue, keywords, and possible related areas. Instead of depending only on exact words, the system tries to understand what the user is actually asking.
This type of understanding helps in handling different ways of asking the same question. For example, two users may ask the same legal problem in different sentences, but the system should still be able to interpret both correctly. By focusing on meaning rather than exact words, the system improves the quality of retrieval and gives better responses to users.
In many AI-based systems, answers are generated directly based on the model, which may sometimes lead to incorrect or general responses. This becomes a serious issue in legal applications because accuracy is very important. To overcome this problem, this project uses Retrieval-Augmented Genera- tion (RAG) [6], [7].
In RAG approach, the system does not generate answers directly. First, it retrieves relevant legal information from the stored database. In this project, legal textbooks and related data are stored in Astra DB. When a user gives a query, the system searches for the most relevant data based on the meaning of the query and retrieves it.
After retrieving the required information, the system gen- erates a response based on that retrieved data. Because the answer is supported by actual stored content, it becomes more accurate and meaningful. This also reduces the chances of generating incorrect or unrelated information.
By combining retrieval and generation, RAG helps the system to provide better quality responses and makes it more reliable for legal information assistance.
In this project, legal information such as textbooks, acts, and related documents are stored in Astra DB. Since legal data is large and contains complex information, it is important to store it in a structured and efficient way so that it can be accessed easily when required.
Astra DB is used as a cloud-based database which allows storing and managing large amounts of data. The legal content is stored in such a way that it can be quickly retrieved based on the user query. Instead of simply storing text, the data is prepared in a form that supports efficient searching and retrieval.
When a user submits a query, the system interacts with Astra DB to fetch relevant legal data. This retrieval is done based on the meaning of the query rather than exact keyword matching, which improves the accuracy of results. The retrieved data is then used in the RAG process to generate the final response. Using Astra DB helps in handling large-scale legal data efficiently and supports faster retrieval, which is important for
providing quick and useful responses to the users.
The system provides a simple and user-friendly interface through which users can interact easily. The frontend is developed using React, which helps in creating a responsive and interactive web application. Users can enter their legal queries either through text input or voice input, making the system more accessible.
The interface is designed in such a way that users do not need any technical or legal knowledge to use it. After submitting the query, the system processes it and displays the response in a clear and structured format. The answers are presented in simple language so that users can understand them without difficulty.
The system also supports multiple languages, which helps users from different regions to interact comfortably. This improves accessibility and makes the application more useful for a wider range of users.
Overall, the interface plays an important role in making the system easy to use and ensures smooth communication between the user and the backend processes.
Most existing systems mainly depend on keyword-based searching or simple chatbot responses, which may not fully understand the user’s situation. In this project, the proposed approach focuses on understanding the user query in con- text, retrieving relevant legal information using Retrieval- Augmented Generation (RAG), and presenting it in a simple and understandable way. The system also provides a basic validation step to ensure that the response is meaningful and suitable for the user.
The workflow of AI Legal Buddy as shown in Fig. 1 starts when the user submits a legal query in text or voice format. If the input is given as speech, it is first converted into text form. The system then analyzes the query to understand the context and user intention.
After this, the query is processed and sent to the retrieval stage. In this step, the system uses RAG approach to fetch rel- evant legal information from Astra DB, where legal textbooks and related data are stored. The retrieval is done based on the meaning of the query instead of exact keyword matching, which helps in getting more relevant results.
Once the required information is retrieved, the system generates a response based on that data. The generated output
Figure 1: System Architecture of AI Legal Buddy
is then presented in a simplified format so that users can easily understand the legal information without confusion.
Finally, the system provides the response along with a dis- claimer stating that the information is only for awareness and not a substitute for professional legal advice. This workflow ensures that the responses are relevant, understandable, and more reliable for the users.
The query processing workflow as shown in Fig. 2 explains how each legal question given by the user is handled step by step. When a user describes a legal problem in natural language, the system first processes the input by cleaning and organizing the text. This helps in making the query more clear for further steps.
After that, the system analyzes the query to understand the user’s intention and identify the related legal area. Instead of depending only on exact words, the system focuses on the meaning of the query.
Then the query is used to retrieve relevant legal information from Astra DB using Retrieval-Augmented Generation (RAG). The system searches the stored legal data based on similarity of meaning and selects the most relevant information such as acts or sections.
The retrieved information is then used to generate the final response. The output is presented in a simplified way so that users without legal background can understand it easily. A disclaimer is also added to inform users that the response is only for informational purposes and not a professional legal advice.
This workflow helps in providing more accurate and mean- ingful responses while reducing chances of incorrect or unre- lated information.
Figure 2: Query Processing Architecture of AI Legal Buddy
The AI Legal Buddy system is implemented using mod- ern web technologies to provide a simple and efficient user experience. The frontend of the system is developed using React along with TypeScript, which helps in building an interactive and responsive user interface. Tailwind CSS is used for designing the layout and improving the overall look of the application.
For backend services, Supabase is used to handle user requests, manage data, and support communication between different components of the system. It provides features such as database management and server-side processing, which makes the system more efficient and easy to maintain.
In this project, Astra DB is used to store legal data such as textbooks, acts, and related information. This data is used during the retrieval process to provide relevant legal content based on user queries.
The system follows Retrieval-Augmented Generation (RAG) approach, where the user query is first used to retrieve relevant information from Astra DB, and then a response is generated based on that data. This helps in improving
the accuracy and relevance of the answers instead of giving general responses.
By combining these technologies, the system provides a simple, scalable, and effective solution for delivering legal information to users.
Since AI Legal Buddy works in the legal domain, ensuring responsible use of Artificial Intelligence is very important. The system is designed in such a way that the responses are generated based on the legal information retrieved using RAG, instead of giving completely generated answers. This helps in reducing the chances of incorrect or misleading information. AI Legal Buddy is developed mainly for legal awareness and informational support. Every response provided by the system includes a disclaimer which clearly mentions that it is not a substitute for professional legal advice. This helps users to understand the limitation of the system.
The system also handles user queries carefully to avoid generating sensitive or inappropriate content. By using re- trieved legal data and adding clear warnings, the system tries to maintain reliability and promote responsible use of AI.
The experimental setup for AI Legal Buddy is designed to evaluate how effectively the system retrieves relevant legal information and provides understandable responses to users. The system is developed as a web-based application using React for the frontend and Supabase for backend services. Legal data such as textbooks and acts are stored in Astra DB, which is used during the retrieval process.
The system follows the Retrieval-Augmented Generation (RAG) approach, where user queries are first used to retrieve relevant legal content from Astra DB and then responses are generated based on that information. This setup helps in improving the accuracy and relevance of the output.
The main system configuration used for development and testing includes an Intel i7 processor, 32 GB RAM, and Ubuntu 20.04 operating system. This configuration supports smooth execution of the application and efficient handling of user queries.
Testing was performed in a controlled development envi- ronment using different real-life legal queries from domains such as criminal law, civil law, labor law, and constitutional law. The evaluation considered factors like retrieval accuracy, clarity of responses, contextual relevance, and response time.
Instead of using attack-based testing, the AI Legal Buddy system is evaluated using legal query simulation. A set of sample legal questions is created to test how the system performs in real-world situations. These queries are based on common problems such as workplace issues, property disputes, complaint procedures, and basic legal rights.
Each query is designed in a way to check how well the system understands the user input, retrieves correct legal infor- mation using RAG, and provides a clear response. The queries are written in different styles, including simple sentences and slightly complex questions, to make the testing more realistic. The dataset contains queries from different legal areas to ensure that the system is tested across multiple scenarios. This helps in checking whether the system can handle different
types of questions and provide meaningful answers.
Figure 3: Legal Query Dataset Distribution
The Fig. 3 shows how the queries are distributed across dif- ferent legal categories. This evaluation helps in understanding the overall performance of the system in terms of accuracy, relevance, and clarity of responses.
Figure 4: Legal Domain Classification and Retrieval Results
This section explains how the system identifies the correct legal area from the user query and retrieves relevant infor- mation. When a user submits a query, the system analyzes the context of the question to understand which legal domain it belongs to, such as criminal law, civil law, labor law, or constitutional law.
Based on this understanding, the system uses the RAG approach to retrieve related legal data from Astra DB. Instead
of depending on exact keywords, the system focuses on the meaning of the query, which helps in selecting more relevant legal information.
The results shown in Fig. 7 indicate that understanding the context of the query improves the quality of retrieval. When the correct legal area is identified, the system is able to fetch appropriate laws, sections, or related information more accurately.
Overall, this process helps in improving both the relevance and usefulness of the responses provided to the user.
System performance is evaluated based on response accu- racy, contextual understanding, clarity of answers, and re- sponse time. The use of Retrieval-Augmented Generation (RAG) helps the system to generate responses based on actual legal data stored in Astra DB, which reduces the chances of incorrect or unrelated information.
The system shows good performance in understanding user queries and providing relevant legal information. Since the responses are generated based on retrieved data, the answers are more meaningful and aligned with the user’s query.
Figure 5: System Response Time Analysis
The response time is maintained at a reasonable level, which makes the system suitable for real-time usage. The output is also presented in a simplified form, which improves readability and helps users understand legal information easily.
Overall, the system performs effectively in providing accu- rate, clear, and useful responses within acceptable response time.
Evaluation of Law Buddy was conducted using several indicators, including retrieval accuracy, response relevance, clarity of explanation, and system reliability. Retrieval accu- racy measures how correctly the system fetches relevant legal documents. Response relevance checks whether the generated
Figure 6: Overall Evaluation Metrics
explanation matches the retrieved information. Clarity evalu- ates how easily the output can be understood by non-experts. Reliability assesses consistency across different queries.
To demonstrate system effectiveness, several representative legal scenarios were tested. For example, when a user asked about unfair job termination, the system correctly classified it under labor law, retrieved relevant provisions, and provided a simplified explanation about employee rights and possible actions.
In another case, a query about filing a police complaint was categorized under criminal law. The system retrieved appropriate procedural details and presented a clear step- by-step explanation. These examples show that the system can handle different legal topics while maintaining accuracy, clarity, and proper contextual understanding.
Most existing legal chatbots mainly rely on keyword-based searching or responses generated directly by language models. While such systems can provide basic guidance, they often fail to fully understand the user’s query and may generate answers that are not always supported by proper legal sources.
In contrast, AI Legal Buddy uses Retrieval-Augmented Generation (RAG) to retrieve relevant legal data from Astra DB and generate responses based on that information. This approach ensures that the answers are more accurate and supported by actual legal content instead of being purely generated.
The system also provides simplified explanations and in- cludes a disclaimer to promote responsible use. Compared to existing systems, this approach improves response accuracy, relevance, and user understanding.
The experimental results show that AI Legal Buddy helps in reducing the gap between complex legal systems and common
Table 1: Comparison of Existing Legal Chatbots with the Proposed AI Legal Buddy System
Reference | Core Technique | Domain Focus | Summarization |
[1] Bettercall (2024) | AI-based legal assistant using NLP | General Legal As- sistance | Limited |
(2024) | Machine learning-based legal chatbot | Indian Legal Queries | Limited |
[12] Legal Solutions (2023) | NLP + ML chatbot framework | General Legal Solu- tions | Basic |
[19] RAG Judicial Bot (2025) | RAG-based legal chat- bot | Judicial Insights | Moderate |
[20] Legal BERT + GPT-2 (2025) | Legal BERT + GPT-2 with RAG | Indian Legal Knowledge Access | Moderate |
Proposed – AI Legal Buddy | RAG-based legal infor- mation system with As- tra DB | Indian Legal Infor- mation | Improved |
Figure 7: Output of LawBuddy Legal Query Analysis
people. The use of Retrieval-Augmented Generation (RAG) improves the correctness of responses by generating answers based on legal data stored in Astra DB. This makes the output more reliable compared to general AI responses.
The system also provides information in a simplified man- ner, which makes it easier for users to understand legal concepts without confusion. The overall workflow helps in handling user queries in a clear and structured way.
However, the system requires regular updates to ensure that the legal data remains up to date with new laws and amend- ments. In future, the system can be improved by adding sup- port for more languages, including additional legal resources, and improving performance for handling large number of users.
Even with these limitations, AI Legal Buddy shows good potential in making legal information more accessible, under- standable, and useful for common people.
This paper presented AI Legal Buddy, an AI-based legal information assistant designed to improve access to Indian legal resources for common people. The system uses Retrieval- Augmented Generation (RAG) along with stored legal data in Astra DB to provide accurate and easy-to-understand responses based on user queries. The experimental results show that understanding user queries in context and retrieving relevant legal information improves the overall quality of re- sponses when compared to traditional keyword-based systems. Since the responses are generated based on retrieved legal data, the chances of incorrect or misleading information are reduced. The system provides answers in a simplified format, which helps users without legal background to understand legal concepts more easily. It also includes a disclaimer to ensure responsible use, clearly stating that the system is meant only for informational purposes and not as a replacement for professional legal advice. AI Legal Buddy helps in reducing the gap between complex legal systems and common people by making legal information more accessible and understand- able. The system provides a simple and scalable solution for delivering AI-based legal assistance.