Trên GitHub, InternLM/HuixiangDou đã đạt 2.5k sao, nhóm AI Tools, ngôn ngữ Python. HuixiangDou: Overcoming Group Chat Scenarios with LLM-based Technical Assistance
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
HuixiangDou2(ACL25) is a GraphRAG solution whose effectiveness has been demonstrated in the plant-science domain and that contributed to the cover paper in Cell Molecular Plant. If you work outside computer science, give the new release a try.
English | 简体中文
HuixiangDou1 is a professional knowledge assistant based on LLM.
Advantages:
Design three-stage pipelines of preprocess, rejection and response
chat_in_group copes with group chat scenario, answer user questions without message flooding, see 2401.08772, 2405.02817, Hybrid Retrieval and Precision Report
chat_with_repo for real-time streaming chat
No training required, with CPU-only, 2G, 10G configuration
Offers a complete suite of Web, Android, and pipeline source code, industrial-grade and commercially viable
Check out the scenes in which HuixiangDou are running and current public service status:
readthedocs ChatWithAI (cpu-only) is available
OpenXLab is using GPU and under continuous maintenance
WeChat bot has a cost associated with WeChat integration. All code has been verified to be functional for one year. Please deploy it on your own for either the free or commercial version.
If this helps you, please give it a star ⭐
🔆 New Features
Our Web version has been released to OpenXLab, where you can create knowledge base, update positive and negative examples, turn on web search, test chat, and integrate into Feishu/WeChat groups. See BiliBili and YouTube !
The Web version's API for Android also supports other devices. See Python sample code.
[2025/03] Simplify deployment and removing --standalone
[2025/03] Forwarding multiple wechat group message
[2024/09] Inverted indexer makes LLM prefer knowledge base🎯
[2024/09] Code retrieval
[2024/08] chat_with_readthedocs, see how to integrate 👍
[2024/07] Image and text retrieval & Removal of langchain 👍
[2024/07] Hybrid Knowledge Graph and Dense Retrieval improve 1.7% F1 score 🎯
[2024/06] Evaluation of chunksize, splitter, and text2vec model 🎯
[2024/05] SFT LLM on NLP task, F1 increased by 29% 🎯
🤗
LoRA-Qwen1.5-14B
LoRA-Qwen1.5-32B
alpaca data
arXiv
[2024/04] RAG Annotation SFT Q&A Data and Examples
[2024/04] Release Web Front and Back End Service Source Code 👍
[2024/03] New Personal WeChat Integration and Prebuilt APK !
[2024/02] [Experimental Feature] WeChat Group Integration of multimodal to achieve OCR
📖 Support Status
LLM
File Format
Retrieval Method
Integration
Preprocessing
DeepSeek
InternLM
GLM
KIMI
StepFun
vLLM
Silicon🏷️
PPIO🏷️
Xi-Api
excel
html
markdown
pdf
ppt
txt
word
Dense for Document
Sparse for Code
Knowledge Graph
Internet Search
SourceGraph
Image and Text
WeChat(android/wkteam)
Lark
OpenXLab Web
Gradio Demo
HTTP Server
Read the Docs
Coreference Resolution
📦 Hardware Requirements
The following are the GPU memory requirements for different features, the difference lies only in whether the options are turned on.
Configuration Example
GPU mem Requirements
Description
Verified on Linux
config-cpu.ini
-
Use siliconcloud API for text only
[Standard Edition]config.ini
2GB
Use openai API (such as kimi, deepseek and stepfun to search for text only
config-multimodal.ini
10GB
Use openai API for LLM, image and text retrieval
🔥 Running the Standard Edition
We take the standard edition (local running LLM, text retrieval) as an introduction example. Other versions are just different in configuration options.
I. Download and install dependencies
Click to agree to the BCE model agreement, log in huggingface
We use some novels to build knowledge base and filtering questions. If you have your own documents, just put them under repodir.
Copy and execute all the following commands (including the '#' symbol).
# Download the knowledge base, we only take the some documents as example. You can put any of your own documents under `repodir`
cd HuixiangDou
mkdir repodir
cp -rf resource/data* repodir/
# Build knowledge base, this will save the features of repodir to workdir, and update the positive and negative example thresholds into `config.ini`
mkdir workdir
python3 -m huixiangdou.services.store
# You can also build knowledge base from QA pairs (CSV or JSON format)
# CSV: First column is key (question), second column is value (answer)
# JSON: {"question1": "answer1", "question2": "answer2", ...}
# python3 -m huixiangdou.services.store --qa-pair resource/data/qa_pair.csv
III. Setup LLM API and test
Set the model and api-key in config.ini. If running LLM locally, we recommend using vllm.
# Respond to questions related to the Hundred-Plant Garden (related to the knowledge base), but do not respond to weather questions.
python3 -m huixiangdou.main
+-----------------------+---------+--------------------------------+-----------------+
| Query | State | Reply | References |
+=======================+=========+================================+=================+
| What is in the Hundred-Plant Garden? | success | The Hundred-Plant Garden has a rich variety of natural landscapes and life... | installation.md |
--------------------------------------------------------------------------------------
| How is the weather today? | Init state| .. | |
+-----------------------+---------+--------------------------------+-----------------+
🔆 Input your question here, type `bye` for exit:
..
💡 Also run a simple Web UI with gradio:
python3 -m huixiangdou.gradio_ui
Or run a server to listen 23333, default pipeline is chat_with_repo:
python3 -m huixiangdou.api_server
# test async API
curl -X POST http://127.0.0.1:23333/huixiangdou_stream -H "Content-Type: application/json" -d '{"text": "how to install mmpose","image": ""}'
# cURL sync API
curl -X POST http://127.0.0.1:23333/huixiangdou_inference -H "Content-Type: application/json" -d '{"text": "how to install mmpose","image": ""}'
Please update the repodir documents, good_questions and bad_questions, and try your own domain knowledge (medical, financial, power, etc.).
IV. Integration
To Feishu, WeChat group
One-way sending to Feishu group
Two-way Feishu group receiving and sending, recalling
Personal WeChat Android access and Android tool
Personal WeChat wkteam access
To web front and backend
We provide typescript front-end and python back-end source code:
Multi-tenant management supported
Zero programming access to Feishu and WeChat
k8s friendly
Same as OpenXlab APP, please read the web deployment document.
To readthedocs.io
Try right-bottom button on the page and document.
🍴 Other Configurations
CPU-only Edition
If there is no GPU available, model inference can be completed using the siliconcloud API.
Taking docker miniconda+Python3.11 as an example, install CPU dependencies and run:
You need to manually download Visualized_m3.pth to the bge-m3 directory
Install FlagEmbedding on main branch, we have made bugfix. Here you can download bpe_simple_vocab_16e6.txt.gz
Install requirements/multimodal.txt
Run gradio to test, see the image and text retrieval result here.
python3 tests/test_query_gradio.py
Furthermore
Please read the following topics:
Hybrid knowledge graph and dense retrieval
Refer to config-advanced.ini configuration to improve effects
Group chat scenario anaphora resolution training
Use wkteam WeChat access, integrate images, public account parsing, and anaphora resolution
Use rag.py to annotate SFT training data
🛠️ FAQ
What if the robot is too cold/too chatty?
Fill in the questions that should be answered in the real scenario into resource/good_questions.json, and fill the ones that should be rejected into resource/bad_questions.json.
Adjust the theme content in repodir to ensure that the markdown documents in the main library do not contain irrelevant content.
Re-run feature_store to update thresholds and feature libraries.
⚠️ You can directly modify reject_throttle in config.ini. Generally speaking, 0.5 is a high value; 0.2 is too low.
Launch is normal, but out of memory during runtime?
LLM long text based on transformers structure requires more memory. At this time, kv cache quantization needs to be done on the model, such as lmdeploy quantization description. Then use docker to independently deploy Hybrid LLM Service.
# cd your_python_path/site-packages/faiss
cd /root/.conda/envs/InternLM2_Huixiangdou/lib/python3.10/site-packages/faiss/
ln -s swigfaiss.py swigfaiss_avx2.py
🍀 Acknowledgements
KIMI: Long text LLM, supports direct file upload
FlagEmbedding: BAAI RAG group
BCEmbedding: Chinese-English bilingual feature model
Langchain-ChatChat: Application of Langchain and ChatGLM
GrabRedEnvelope: WeChat red packet grab
📝 Citation
@misc{kong2024huixiangdou,
title={HuiXiangDou: Overcoming Group Chat Scenarios with LLM-based Technical Assistance},
author={Huanjun Kong and Songyang Zhang and Jiaying Li and Min Xiao and Jun Xu and Kai Chen},
year={2024},
eprint={2401.08772},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@misc{kong2024labelingsupervisedfinetuningdata,
title={Labeling supervised fine-tuning data with the scaling law},
author={Huanjun Kong},
year={2024},
eprint={2405.02817},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2405.02817},
}
@misc{kong2025huixiangdou2robustlyoptimizedgraphrag,
title={HuixiangDou2: A Robustly Optimized GraphRAG Approach},
author={Huanjun Kong and Zhefan Wang and Chenyang Wang and Zhe Ma and Nanqing Dong},
year={2025},
eprint={2503.06474},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/2503.06474},
}
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/InternLM/HuixiangDou là nguồn chính thức.
InternLM/HuixiangDou có những chủ đề gì?
GitHub topics của InternLM/HuixiangDou: "application", "assistant", "assistant-chat-bots", "chatbot", "dsl", "group-chat", "image-retrieval", "lark", "llm", "multimodal", "pipeline", "rag", "robot", "wechat". TopGit xếp repo vào nhóm AI Tools.
InternLM/HuixiangDou có phải mã nguồn mở không?
Có — InternLM/HuixiangDou phát hành theo license BSD-3-Clause, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/InternLM/HuixiangDou.
InternLM/HuixiangDou có trang demo không?
Dự án có trang chủ ở https://openxlab.org.cn/apps/detail/tpoisonooo/huixiangdou-web. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
InternLM/HuixiangDou còn đang phát triển không?
Commit gần nhất trên InternLM/HuixiangDou là 8 tháng trước (theo timestamp GitHub). Repo có 179 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
InternLM/HuixiangDou dùng license gì?
InternLM/HuixiangDou phát hành theo license BSD-3-Clause. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc đầy đủ README ở tab phía trên.
HuixiangDou có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về HuixiangDou.