Legal Information Assistant
Taking the Regulation Inquiry Assistant as an example, in the past, public sector agencies and businesses were limited to using keyword searches to query data due to technical constraints. However, keyword searches have the following disadvantages:
Poor semantic understanding, leading to imprecise results.
Inability to ask multiple questions at once.
Affected by spelling errors.
Inability to provide a consolidated answer to multiple questions.
The shortcomings mentioned above lead to a poor user experience. However, with the advent of Large Language Models and RAG, this has all changed. Below is a comparison table between traditional keyword search and RAG search.
Query Understanding
Limited to exact matches and basic synonyms
Understands context, intent, and nuanced meanings
Information Retrieval
Based on keyword frequency and basic relevance algorithms
Uses semantic similarity and context-aware retrieval
Result Format
A list of potentially relevant documents
A list of potentially relevant documents Synthesized answers with citations to source documents
Handling Complex Queries
Often requires multiple searches and manual integration
Can handle multifaceted, complex questions directly
Adaptability to Domain-Specific Terminology
Limited unless heavily customized
Can learn and adapt to organization-specific terminology
Ability to Use Unstructured Data
Very limited
High, can extract insights from various document types
Continuous Learning
Typically static unless manually updated
Can improve over time through usage and feedback
Taking the "Public Sector Regulation Inquiry Assistant" as an example, consider the regulation announcements from the National Land Management Agency, Ministry of the Interior, shown below. In the past, keyword searches were used. Now, the goal is to enhance user convenience through generative AI technology. This can be achieved on MaiAgent.
https://www.nlma.gov.tw/最新消息/法規公告.html

Creating the "Regulation Inquiry Assistant" on the MaiAgent Platform
The structure for creating the "Regulation Inquiry Assistant" is as follows:
Because generative AI can pose risks for the public sector, the design aims to provide different response methods for internal staff and the general public.
Access Points and Architecture
For the question Are there age restrictions for financial subsidies?, the desired responses for internal staff and the general public are as follows:
Response received by internal staff:

Response received by the general public:

We only need to provide different Role Prompts when creating the "AI Assistant" in MaiAgent to achieve this effect. The AI assistant role prompts for the general public and internal staff are provided below.
Role Prompt (General Public Version)
# Role
You are the Regulation Inquiry Assistant for the National Land Management Agency, Ministry of the Interior.
# Output Format
Please use the format in the example below to reply with the three most relevant regulations.
<example>
The question you mentioned is related to the following regulations:
1. <Date> <Category> <Regulation Type> [Title](URL)
2. <Date> <Category> <Regulation Type> [Title](URL)
3. <Date> <Category> <Regulation Type> [Title](URL)
</example>
# Output Constraints
- Please reply in Traditional Chinese.
- Prioritize using the most recent data as reference.
- Do not answer questions outside the scope of the knowledge base.
- Answer based on the knowledge base data. If you cannot answer, reply with the text in the <example> below.
<example>
I'm sorry, the knowledge base does not currently contain the regulation information you are asking about. Please contact us during our service hours.
Service Hours: Monday to Friday, 8:00 AM to 5:30 PM
Contact numbers for various business units: Please refer to this [link](<https://www.nlma.gov.tw/%E6%9C%AC%E7%BD%B2%E6%9C%8D%E5%8B%99%E8%B3%87%E8%A8%8A.html>)
</example>Role Prompt (Internal Staff Version)
# Role
You are the Regulation Inquiry Assistant for the National Land Management Agency, Ministry of the Interior.
# Background
The current year is 2024 AD, which is the 113th year of the Republic of China.
# Output Format
Please use the format in the example below to reply with the three most relevant regulations.
<example>
{Response based on the question and reference materials}
Related Regulations:
1. <Date> <Category> <Regulation Type> [Title](URL)
2. <Date> <Category> <Regulation Type> [Title](URL)
3. <Date> <Category> <Regulation Type> [Title](URL)
</example>
# Output Constraints
- Please reply in Traditional Chinese.
- Prioritize using the most recent data as reference.
- Do not answer questions outside the scope of the knowledge base.
- Answer based on the knowledge base data. If you cannot answer, reply with the text in the <example> below.
<example>
The knowledge base does not currently contain the regulation information you are asking about. Please supplement the regulation data.
</example>Knowledge Base
Download past regulation documents from the National Land Management Agency Regulation Search.
Regulations_Search.xlsx
Regulations for Rewarding the Reporting of Illegal Use of Land in National Plans
National Planning Division
Regulatory Order
2024-10-31
Regulation Content...
Regulations for the Installation of Parent-Child Restrooms in Public Places
Building Administration Division
Regulatory Order
2024-10-30
Regulation Content...
Advance Notice of Amendment to the "Regulations on the Rental of Social Housing Sponsored by the Ministry of the Interior".
Housing Development Division
Draft Regulation
2024-10-22
Regulation Content...
Last updated
Was this helpful?
