---
title: ZhDoc2BotDialogue
canonical_url: "https://www.modelscope.cn/datasets/DAMO_ConvAI/ZhDoc2BotDialogue"
md_url: "https://www.modelscope.cn/datasets/DAMO_ConvAI/ZhDoc2BotDialogue.md"
repository: DAMO_ConvAI/ZhDoc2BotDialogue
chinese_name: "Chinese document-grounded dialogue data set (中文对话数据集)"
last_updated: 2024-09-02
license: "Apache License 2.0"
storage_size: "20 MB"
domain:
  - configs
  - text
tasks:
  - "{config_name=default, data_files=[{path=dialog_zh_train.csv, split=train}]}"
  - conversational
size_scale:
  - 100-10k
type:
  - kg-qa
downloads: 11577
stars: 37
---

# ZhDoc2BotDialogue

> ZhDoc2BotDialogue - DAMO_ConvAI 在 ModelScope 开源的数据集。Chinese document-grounded dialogue data set (中文对话数据集)

DAMO_ConvAI/ZhDoc2BotDialogue 是 ModelScope 魔搭社区上的{config_name=default, data_files=[{path=dialog_zh_train.csv, split=train}]}、conversational数据集，涉及 configs、text 领域，存储大小 20 MB，采用 Apache License 2.0 许可。

- **Repository**: DAMO_ConvAI/ZhDoc2BotDialogue
- **License**: Apache License 2.0
- **Tasks**: {config_name=default, data_files=[{path=dialog_zh_train.csv, split=train}]}, conversational
- **Domain**: configs, text
- **Storage size**: 20 MB
- **Downloads**: 11577
- **Stars**: 37
- **Last updated**: 2024-09-02

Source: https://www.modelscope.cn/datasets/DAMO_ConvAI/ZhDoc2BotDialogue

---

# Documen-grounded dialogue 
Goal-oriented document-grounded dialogue systems enable end users to interactively query about
domain-specific information based on the given documents. The tasks of querying document knowledge via conversational systems continue to attract a lot of attention from both research and industrial communities for various applications. The previous works addressed the task of English and Chinese document-grounded dialogue systems, leaving other languages less well explored. Thus, large communities of users are prevented access to automated services and information. We aim to extend the effort by introducing the Third  ACL DialDoc Workshop shared task involving documents and dialogues in diverse languages. For the first time, we provide training and evaluation data for document-grounded dialogue in Vietnamese and French, and organize the currently available Chinese and English document-grounded dialogue data. We hope that participants can leverage the linguistic similarities, for example, a large number of Vietnamese words are derived from Chinese, and English and French both belong to the Indo-European language family, to improve their models' performance in Vietnamese and French.


### Description


**This Project contains our organized Chinese document-grounded dialogue data from Doc2Bot (Doc2Bot: Accessing Heterogeneous Documents via Conversational Bots, EMNLP 2022)**



### Dataset Format

Each piece of data contains three attributes: query, passages, and response.

The query is a concatenation of the conversation history in reverse order, with the last turn marked as "<last_turn>", and the rest marked with "<user>" for user input and "<agent>" for system output. For example：
'<last_turn> 那吃药能不能治啊？ <agent> 这种情况可以治疗的，有很多种治疗方法，比如心理治疗、情绪治疗、药物治疗等等。 <user> 我想知道，我有个朋友经常自残但是没自杀过，这个毛病能治吗'



The 'passages' attribute contains a list of passages arranged according to reply dependencies, followed by a reverse-ordered chain of titles concatenated with "//" as the delimiter. Example:

["非自杀性自伤 // 非自杀性自伤的治疗 治疗方法主要有： 某种心理治疗 治疗存在的其他疾病 某些类型的心理治疗对自伤的人有所帮助。它们包括 辩证行为疗法 情绪调节小组疗法 辩证行为疗法提供每周一次的个人和小组咨询，为期1年，以及能够每天24小时通过电话联系的治疗师。治疗师充当行为教练。治疗目标是帮助患者发现应对压力的更好解决方法——例如，如何抵抗自我破坏的渴望。 情绪调节小组疗法包括14周的小组治疗。它可以帮助人们意识到，理解和接受他们的情绪。这种疗法帮助人们愿意接受负面情绪作为生活的一部分，以免如此激烈和冲动地回应这种情绪。 没有药物被批准用于治疗非自杀性自伤。不过，纳曲酮和某些非典型抗精神病药物对部分患者有效。 如果人们患有其他精神疾病（如抑郁症，进食障碍，物质使用障碍或边缘型人格障碍），则会治疗此类疾病。若有可能，应将患者转诊至心理保健医生。随访约诊至关重要。 抑郁症 抑郁障碍是指一种强烈的足以影响社会功能和／或导致对活动失去兴趣或乐趣的悲伤情绪。尽管抑郁可能在近期丧失或其他悲伤的事件之后出现，但是这种悲伤情绪常表现为一种超出实际情况的不恰当的情绪反应且持续时间长。 进食障碍 进食障碍是指进食或进食相关行为的紊乱，通常涉及 物质使用障碍 边缘型人格障碍 边缘型人格障碍的特征是关系不稳定，自我形象，情绪和行为不稳定，这种模式涉及患者生活的各个方面，并且患者对可能的拒绝和遗弃的过分敏感。"]

The response attribute is the desired output, beginning with "<response>". Here's an example: '<response> 目前没有药物被批准治疗非自杀性自伤，不过纳曲酮和某些非典型抗精神病药物对部分患者有效。'

### Loading Method
```python
from modelscope.msdatasets import MsDataset
from modelscope.utils.constant import DownloadMode

dataset = MsDataset.load(
    'DAMO_ConvAI/ZhDoc2BotDialogue',
    download_mode=DownloadMode.FORCE_REDOWNLOAD)
print(dataset[0]) 
# {'query': '<last_turn> 我想知道，我有个朋友经常自残但是没自杀过，这个毛病能治吗？ ', 'passages': '["非自杀性自伤 // 非自杀性自伤的治疗 治疗方法主要有： 某种心理治疗 治疗存
#  的其他疾病 某些类型的心理治疗对自伤的人有所帮助。它们包括 辩证行为疗法 情绪调节小组疗法 辩证行为疗法提供每周一次的个人和小组咨询，为期1年，以及能够每天24小时通过电话联系
#  治疗师。治疗师充当行为教练。治疗目标是帮助患者发现应对压力的更好解决方法——例如，如何抵抗自我破坏的渴望。 情绪调节小组疗法包括14周的小组治疗。它可以帮助人们意识到，理解和
#  受他们的情绪。这种疗法帮助人们愿意接受负面情绪作为生活的一部分，以免如此激烈和冲动地回应这种情绪。 没有药物被批准用于治疗非自杀性自伤。不过，纳曲酮和某些非典型抗精神病药
#  对部分患者有效。 如果人们患有其他精神疾病（如抑郁症，进食障碍，物质使用障碍或边缘型人格障碍），则会治疗此类疾病。若有可能，应将患者转诊至心理保健医生。随访约诊至关重要。 
#  郁症 抑郁障碍是指一种强烈的足以影响社会功能和／或导致对活动失去兴趣或乐趣的悲伤情绪。尽管抑郁可能在近期丧失或其他悲伤的事件之后出现，但是这种悲伤情绪常表现为一种超出实际
#  况的不恰当的情绪反应且持续时间长。 进食障碍 进食障碍是指进食或进食相关行为的紊乱，通常涉及 物质使用障碍 边缘型人格障碍 边缘型人格障碍的特征是关系不稳定，自我形象，情绪和
#  为不稳定，这种模式涉及患者生活的各个方面，并且患者对可能的拒绝和遗弃的过分敏感。"]', 'response': '<response> 这种情况可以治疗的，有很多种治疗方法，比如心理治疗、情绪治疗
#  药物治疗等等。'}

```








## Reference
```
@inproceedings{fu-etal-2022-doc2bot,
    title = "{D}oc2{B}ot: Accessing Heterogeneous Documents via Conversational Bots",
    author = "Fu, Haomin  and
      Zhang, Yeqin  and
      Yu, Haiyang  and
      Sun, Jian  and
      Huang, Fei  and
      Si, Luo  and
      Li, Yongbin  and
      Nguyen, Cam Tu",
    booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2022",
    month = dec,
    year = "2022",
    address = "Abu Dhabi, United Arab Emirates",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.findings-emnlp.131",
    pages = "1820--1836",
}
```
