config datasets help #856
-
May I ask if you have a more detailed document, or will you explain the meaning of the fields carefully in the future? I am a little confused about how the template field in this file is used, and why HUMAN and BOT are needed chatmed_eval_cfg = dict(
evaluator=dict(type=EMEvaluator))
chatmed_reader_cfg = dict(
input_columns=['query'],
output_column='response'
)
chatmed_infer_cfg = dict(
# Prompt 生成配置
prompt_template=dict(
type=PromptTemplate,
template=dict(
round=[
dict(role="HUMAN", prompt='{query}')
]
)),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=PPLInferencer)
)
chatmed_datasets = [
dict(
type=ChatMedDataset,
path='/mnt/petrelfs/wangguoan/git_repo/opencompass/data/ChatMed_Consult_Dataset/test.json',
reader_cfg=chatmed_reader_cfg,
infer_cfg=chatmed_infer_cfg,
eval_cfg=chatmed_eval_cfg
)
] below is chatmed data {"query": "这段时间去上厕所本来想小便的可是每次都会拉大便", "response": "这可能是因为你的饮食习惯或者消化系统的问题导致的。建议你试着调整一下饮食,增加膳食纤维的摄入量,多喝水,避免过度依赖泻药。同时,如果问题持续存在,建议去医院检查一下,排除肠道疾病等可能性。"}
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
We set HUMAN and BOT to differentiate the roles in a conversation. In a single-turn dialogue dataset, you only need to use HUMAN. For example: template = dict(
round=[
dict(
role='HUMAN',
prompt="{question}"
),
]
) In the case of multi-turn dialogues, you might need to specify templates for multiple rounds of HUMAN and BOT interactions. In the chatmed data example you provided, since it's a single-turn dialogue, using HUMAN as the template is sufficient. |
Beta Was this translation helpful? Give feedback.
We set HUMAN and BOT to differentiate the roles in a conversation. In a single-turn dialogue dataset, you only need to use HUMAN. For example:
In the case of multi-turn dialogues, you might need to specify templates for multiple rounds of HUMAN and BOT interactions. In the chatmed data example you provided, since it's a single-turn dialogue, using HUMAN as the template is sufficient.