Regulation query assistant

UsingLegal Inquiry AssistantFor example, with the Legal Inquiry Assistant, in the past public agencies and enterprises were limited by technology and could only query information using keyword search, but keyword search has the following drawbacks:

  1. Poor semantic understanding, imprecise results

  2. Cannot ask multiple questions at once

  3. Affected by spelling errors

  4. Cannot consolidate answers to multiple questions

The above drawbacks lead to Poor user experienceHowever, with the emergence of large language models and RAG, this has all changed. Below is a comparison table between traditional keyword search and RAG search

Traditional Keyword Search
RAG Search

Query Understanding

Limited to exact matches and basic synonyms

Understands context, intent, and subtle meanings

Information Retrieval

Based on keyword frequency and basic relevance algorithms

Uses semantic similarity and context-aware retrieval

Result Format

List of potentially relevant documents

List of potentially relevant documents Synthesized answer with cited source documents

Handling Complex Queries

Usually requires multiple searches and manual consolidationUsually requires multiple searches and manual consolidation

Can directly handle multi-faceted complex questions

Ability to Adapt to Domain-Specific Terminology

Limited unless extensively customized

Can learn and adapt to organization-specific terminology

Ability to Use Unstructured Data

Very limited

High, can extract insights from various document types

Continual Learning

Typically static unless manually updated

Can improve over time through use and feedback

Using the “Public Sector Legal Inquiry Assistant” as an example, below is the regulatory announcement from the Ministry of the Interior’s Land Administration Agency; previously keyword search was used. Now we wish to improve user convenience through generative AI technology, which can be done on MaiAgent as follows.

https://www.nlma.gov.tw/%E6%9C%80%E6%96%B0%E6%B6%88%E6%81%AF/%E6%B3%95%E8%A6%8F%E5%85%AC%E5%91%8A.html

The structure for creating the “Legal Inquiry Assistant” is as follows:

Because generative technology may pose risks for the public sector, the design intends to provide different reply styles for internal personnel and the public

Entry Points and Architecture

For Are there age restrictions for subsidy funding? questions, the desired reply effects for internal personnel and the general public are as follows

Reply received by internal personnel:

Reply received by the general public:

We only need to provide different Role instructionsto the MaiAgent when creating the “AI” assistant to achieve this effect. Below are provided respectively General Publicand Internal Personnel AI assistant role instructions.

Role Instruction (General Public Version)

# Role
You are the legal inquiry assistant of the Ministry of the Interior’s Land Administration Agency

# Output format
Please use the example format below and reply with the three most relevant regulations.

<example>
The regulation(s) related to your question are:

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 references with more recent dates
- Do not answer with information that is outside the scope of the knowledge base
- Answer based on the knowledge base; if you cannot answer, please respond with the text inside the <example> below

<example>
We apologize, the current knowledge base does not contain the regulation you inquired about. Please contact us during our service hours

Service hours: Monday to Friday, 8:00–17:30
Contact numbers for each business unit: please refer to [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 Instruction (Internal Personnel Version)

# Role
You are the legal inquiry assistant of the Ministry of the Interior’s Land Administration Agency

# Background
This year is 2024 (Minguo year 113)

# Output format
Please use the example format below and reply with the three most relevant regulations.

<example>
{Reply based on the question and reference materials}

Relevant 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 references with more recent dates
- Do not answer with information that is outside the scope of the knowledge base
- Answer based on the knowledge base; if you cannot answer, please respond with the text inside the <example> below

<example>
The current knowledge base does not contain the regulation you inquired about. Please supplement the regulation materials
</example>

Knowledge

FromMinistry of the Interior Land Administration Agency Regulation InquiryDownload past regulation documents

Regulation_Inquiry.xlsx

Regulations for Reporting and Rewarding Illegal Land Use under National Land Planning

National Land Planning Section

Regulatory Order

2024-10-31

Regulation content…

Regulations for the Installation of Parent-Child Restrooms/Washrooms in Public Places

Building Management Section

Regulatory Order

2024-10-30

Regulation content…

Announcement of Proposed Amendments to the “Ministry of the Interior’s Regulations for the Rental of Public Housing Initiated by the Ministry of the Interior.”

Housing Development Section

Regulatory Draft

2024-10-22

Regulation content…

Last updated

Was this helpful?