Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚TruthReader

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.

truthreader_demo

📘 System Architecture

truthreader_architecture 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.

🚀 Getting Started

Step 1: Deploy the generators with vllm

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.sh

Step 2: Run the backend of this framework

Run the script to deploy the framework:

bash DocHelper/scripts/run.sh

You 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 ";".

🌈 Environments

conda env create -f environment.yaml

🗂️ Model and Data

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

💭 Optimization Progress

To be released soon.

🔗 Citation

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}},
}

📜 License

This repository respects to MIT license.

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages