Repository navigation
v0.3.0 — Upload your own PDFs, ask in Chinese or English
PolicyDesk now builds each company's knowledge base from the policy PDFs it uploads. Tables and figures are parsed, employees can ask in Chinese or English, and the web app has been redesigned around two views: Ask and Documents.
Highlights
- Upload your own PDFs. PDFs are parsed with MinerU 4.x; figures are described by Qwen-VL (
qwen3-vl-plus). New documents are added to the existing index, with no full rebuild. - Figures that fail are skipped, not fatal. The rest of the PDF is still added, and the app lists each skipped figure's page, caption, and reason.
- Add, list, and delete documents from the web app or the CLI. Deletion removes a document from Chroma, MongoDB, and Redis together. The same file cannot be added twice.
- Ask in Chinese or English. Query rewriting and answers follow the question's language, and keyword search now matches Chinese text.
- Redesigned web app. Source cards show file, page, and type (text, table, figure) before the streamed answer. The Documents view shows upload progress and a status table with confirmed deletion. Chinese/English interface, light and dark themes, phone layout.
⚠️ Upgrade notes
- Use a new knowledge base. The default
KB_NAMEis nowpolicydesk_uploads_v1. Set a new, unusedKB_NAMEin.env; older namespaces still contain the sample policies. - Sample policies are no longer indexed. Files in
data/are kept only as test fixtures. - Install MinerU separately. Install MinerU 4.x in its own environment and set
MINERU_COMMANDto the full path of itsmineruexecutable, for example/opt/anaconda3/envs/mineru/bin/mineru. - CLI changes.
preview,build, and--categorywere removed. Useadd,delete,list,ask, andchat. - New optional settings:
MINERU_PYTHON,MINERU_TIER,VL_MODEL.
Getting started
git pull
python -m pip install -r requirements.txt
docker compose up -d --wait
python -m streamlit run app.py