System Architecture | Getting Started | Environments | Model and Data | Optimization Progress | Citation
TruthReader is a trustworthy document assistant chatbot that incorporates incline citation and attribution chunks, to facilitate the verification of the factual consistency in the generated text. We also provide our adapted conversational embedding retriever and LLMs to quickly develop this system.
The architecture and workflow of our document assistant chatbot TruthReader. It consists of three components: Document Preprocessor, Conversational Document Retriever, and Retrieval-augmented Generator. The first module is only used for preliminary preprocessing, while the latter two together constitute the workflow of real-time conversation.
Prepare vllm docker on your LLM server. We refer to the official document Deploying with Docker.
Dowload the adapted models below and change the parameter base_model of DocHelper/scripts/vllm/run_vllm_Mixtral.sh with your local path. The you can directly run this script to deploy the model:
bash DocHelper/scripts/vllm/run_vllm_Mixtral.sh
bash DocHelper/scripts/vllm/run_vllm_Qwen.shRun the script to deploy the framework:
bash DocHelper/scripts/run.shYou should also replace the parameter with your local path. Note that the chat_model_path might include both Qwen and Mixtral tokenizer path (no model parameters needed), and please split different path with ";".
conda env create -f environment.yaml| Name | Base Model | Type |
|---|---|---|
| HIT-TMG/bge-m3_RAG-conversational-IR | BAAI/bge-m3 | retriever |
| HIT-TMG/Mixtral_13B_Chat_RAG-Reader | cloudyu/Mixtral_13B_Chat | generator |
| HIT-TMG/Qwen1.5-14B-Chat_RAG-Reader | Qwen/Qwen1.5-14B-Chat | generator |
| pszemraj/nougat-small-onnx | facebook/nougat-small | OCR model |
We also release our training dataset on the huggingface hub: HIT-TMG/TruthReader_RAG_train
To be released soon.
Please cite the repo if you use the model or code in this repo.
@misc{truthreader,
author = {Dongfang Li and Xinshuo Hu and Zetian Sun and Baotian Hu and Shaolin Ye and Zifei Shan and Qian Chen and Min Zhang},
title = {TruthReader: Towards Trustworthy Document Assistant Chatbot with Reliable Attribution},
year = {2024},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/HITsz-TMG/TruthReader-document-assistant}},
}
This repository respects to MIT license.