可配置化部署方案
Medical-RAG通过模块化设计实现快速科室适配:
- 知识库分区:在Milvus集合中通过
dept_pk
字段标记不同科室数据 - 配置热更新:修改YAML文件即可切换科室专属配置
# default.yaml片段 collection: schema: - name: "dept_pk" dtype: "int64" is_primary: false
五步部署法
- 准备各科室标准问答数据集
- (of a computer) run
annotation.py
时指定--dept_id
参数分类标注 - exist
insert_data_to_collection.py
中设置科室标识字段 - 查询时添加
filters={"dept_pk":"目标科室ID"}
prerequisite - pass (a bill or inspection etc)
search_answer.yaml
独立配置各科室检索策略
This answer comes from the articleMedical-RAG: A Retrieval-Augmented Generation Framework for Constructing Chinese Medical Q&AsThe