Architecture
Overview
In this project, we build a system that can search and answer questions about the code of laws in Vietnam. The system is built with Microservice Architecture to ensure the scalability and maintainability of the system. The system consists of 3 main components: Question Answering, Search Engine, and Summarization. The Question Answering component is responsible for answering questions about the code of laws in Vietnam. The Search Engine component is responsible for searching for information about the code of laws in Vietnam. The Summarization component is responsible for summarizing the content of the code of laws in Vietnam.
We use Langchain to build the Question Answering component. The Search Engine component is built with Haystack. The Data Processor component is built with Nestjs.
Components
No. | Component | Description | Technology |
---|---|---|---|
1 | Front End | Responsible for receiving user input and sending requests to the back end. | Reactjs + React Native |
2 | API Gateway | Receives requests from the front end and sends requests to the back end. | Nestjs |
3 | Auth Service | Authenticates users and generates access tokens. | Nestjs |
4 | Law Service | Provides information about the code of laws in Vietnam. | Nestjs |
5 | Search Service | Searches for information about the code of laws in Vietnam. | Python + Haystack |
6 | Chat Service | Answers questions about the code of laws in Vietnam. | Nestjs + Langchain |
Dataset and Model
We use the dataset of the code of laws in Vietnam from the Phap dien website and QPPL website. The dataset contains 1,000 articles of the code of laws in Vietnam. We use the GPT model to build the Question Answering component and the Deepset model to build the Search Engine component.