Purpose
降低大模型对药物问答的幻觉率和错误率。This model is used in two modes:
- 独立审核 (standalone review) — input: 用户提问 + 大模型回答 → output: risk verbdict + action (采信 / 建议重新RAG).
- RAG 审核 (evidence-grounded review) — input: 检索资料 + 大模型回答 → output: consistency verdict
A/B/C + risk + re_rag flag, so the pipeline knows when to re-retrieve and answer again.
{"verdict":"A|B|C","risk":"low|medium|high","reason":"...","re_rag":"no|yes"}
- A fully supported — no fabrication →
re_rag: no
- B partially supported, detail deviation (dose/freq/name) →
re_rag: yes
- C clearly fabricated / contradicts evidence (hallucination) →
re_rag: yes
Training data (design to avoid forgetting + support RAG)
Trained on ~21,900 instruction samples distilled from four medical/drug sources:
- 临床药物速查手册 (第3版) — 825-page handbook, OCR'd (drug_handbook)
- 常用药物禁忌与合理用药 (中国药学会, 187 pages) (drug_contra)
- UpToDate drug-information monographs (task3) (uptodate_drug)
- 西氏内科学精要 (task2) (west_med)
Data is assembled in 4 complementary categories:
- grounded (9,921) — real drug-fact Q&A (适应症/剂量/禁忌/注意事项), anchors domain knowledge and slows forgetting.
- verify (9,359) — (evidence + answer) → consistency verdict; teaches evidence-grounded checking so the model can be a RAG component.
- wrong/correct discrimination (2,628) — pairs of plausible-but-fabricated answers (dose digit flips, swapped indications, invented contraindications) vs correct ones; the core hallucination-detection skill.
All facts were teacher-distilled strictly from the source chunks and are RAG-alignable: the same chunks are indexed into the FAISS knowledge base.
Medical Disclaimer
本模型用于辅助药物信息审核与RAG质检,仅供参考,不能替代执业医师或药师的判断。用药决策请以药品说明书和临床指南为准。Automated review output should be verified by a human professional.
Load & inference
from unsloth import FastLanguageModel model, tokenizer = FastLanguageModel.from_pretrained("Qwen/Qwen3-8B", max_seq_length=1536, load_in_4bit=True)model.load_adapter("chenhaodev/qwen3-8b-drug-reviewer-lora") user = ("请作为药物审核员,审核下面这条大模型给出的药物问答是否存在错误或幻觉,给出风险等级。\n" "用户提问:头孢唑林\n大模型回答:头孢唑林可用于青霉素过敏性休克史患者,每日剂量最高8克。")text = tokenizer.apply_chat_template([{"role":"user","content":user}], tokenize=False, add_generation_prompt=True, enable_thinking=False)enc = tokenizer(text, return_tensors="pt").to("cuda")out = model.generate(input_ids=enc.input_ids, attention_mask=enc.attention_mask, max_new_tokens=220, temperature=0.4)print(tokenizer.decode(out[0][enc.input_ids.shape[1]:], skip_special_tokens=True))
Training
- Base:
Qwen/Qwen3-8B, 4-bit (bnb), LoRA r=16, α=16, RSLoRA, all attn+MLP adapters (0.53% trainable)
- 8,000-sample balanced subset, 2 epochs (~2000 steps), LR 2e-4 cosine, bf16, batch 8
- Final train loss ≈ 0.86–1.06 (started ≈ 2.7)
Copyright note
The LoRA weights, model card and scripts are provided here. The training corpus is derived from copyrighted medical books / UpToDate and is not redistributed; only reproducibly distilled knowledge (weights) is published.