five

ThaiLLM/med-app-instruct

收藏
Hugging Face2026-03-25 更新2026-04-26 收录
下载链接:
https://hf-mirror.com/datasets/ThaiLLM/med-app-instruct
下载链接
链接失效反馈
官方服务:
资源简介:
--- dataset_info: features: - name: conversations dtype: string - name: tool_name dtype: string splits: - name: qwen3_5_27b num_bytes: 2420420878 num_examples: 376439 - name: qwen3_5_plus num_bytes: 2150192481 num_examples: 376477 - name: claude_4_6_sonnet num_bytes: 2147726822 num_examples: 376477 download_size: 5369403541 dataset_size: 8942688074 configs: - config_name: default data_files: - split: qwen3_5_27b path: data/qwen3_5_27b-* - split: qwen3_5_plus path: data/qwen3_5_plus-* - split: claude_4_6_sonnet path: data/claude_4_6_sonnet-* license: mit task_categories: - text-generation language: - th - en pretty_name: med-app-instruct size_categories: - 100K<n<1M --- # ThaiLLM Medical Instruction with Tool Calling A synthetic Thai medical instruction-following dataset with tool calling capabilities, designed for training language models to handle healthcare-related queries through a mobile health assistant interface. ## Dataset Description This dataset contains multi-turn conversations between users and an AI health assistant, featuring both direct responses and tool-augmented interactions. The conversations simulate a realistic Thai healthcare application scenario where the assistant can invoke various medical tools to provide accurate, contextual assistance. ### Dataset Structure Each example follows the OpenAI chat completion format and is compatible with Hugging Face's [SFTTrainer](https://huggingface.co/docs/trl/en/sft_trainer) for fine-tuning. ```python { "conversations": [ {"role": "system", "content": "...system prompt with tool definitions..."}, {"role": "user", "content": "...user query in Thai..."}, {"role": "assistant", "tool_calls": [...]}, # Tool invocation {"role": "tool", "name": "tool_name", "content": "...tool results..."}, {"role": "assistant", "content": "...final response..."} ], "tool_name": "..." # The primary tool used in this conversation } ``` ### Data Splits | Split | Description | Response Mining Model | |:------|:------------|:----------------------| | `qwen3_5_27b` | Responses mined from Qwen3-235B-A22B (27B active params) | [Qwen/Qwen3-235B-A22B](https://huggingface.co/Qwen/Qwen3-235B-A22B) | | `qwen3_5_plus` | Responses mined from Qwen3.5-Plus | Qwen3.5-Plus (via OpenRouter) | | `claude_4_6_sonnet` | Responses mined from Claude Sonnet 4.6 | [Claude Sonnet 4.6](https://docs.anthropic.com/en/docs/about-claude/models) | ## Tools The dataset includes interactions with 7 healthcare-related tools: | Tool Name | Description | Response Format | |:----------|:------------|:----------------| | `search_medical_facts` | Retrieves relevant medical facts from a knowledge base to answer health-related questions | Structured response with `<response>` and `<reference>` tags containing citations | | `prescreen` | Initiates a symptom severity assessment pipeline with differential diagnosis | Recommendation based on severity classification | | `get_health_emergency_contact` | Returns Thailand emergency health hotlines (ambulance, poison control, mental health) | List of relevant emergency contacts | | `create_appointment` | Creates a new appointment with a hospital/clinic | Confirmation of appointment details | | `create_reminder` | Creates a medication reminder | Confirmation of reminder setup | | `list_appointment` | Retrieves and allows interaction with existing appointments | List of appointments or confirmation of edits | | `list_reminder` | Retrieves and allows interaction with existing medication reminders | List of reminders or confirmation of edits | ### Tool Categories - **Informational Queries (IQ):** `search_medical_facts` - Medical RAG with citation requirements - **Health Assessment:** `prescreen` - Symptom severity classification - **Emergency Services:** `get_health_emergency_contact` - Thailand-specific emergency hotlines - **Scheduling & Management:** `create_appointment`, `create_reminder`, `list_appointment`, `list_reminder` ## Data Generation Pipeline ### Source Data The dataset is constructed from multiple sources: 1. **Medical Facts:** Retrieved from [ThaiLLM/med-facts](https://huggingface.co/datasets/ThaiLLM/med-facts) and [ThaiLLM/med-articles](https://huggingface.co/datasets/ThaiLLM/med-articles) 2. **Medical Q&A:** Based on [ThaiLLM/med-qas-synthetic](https://huggingface.co/datasets/ThaiLLM/med-qas-synthetic) (refined baseline split) 3. **Synthetic Tool Queries:** Generated for appointment, reminder, prescreen, and emergency contact scenarios 4. **Negative Samples:** Sourced from [kunato/typhoon-s-instruct-post-training](https://huggingface.co/datasets/kunato/typhoon-s-instruct-post-training) for non-tool conversations ### Generation Process 1. **Query Synthesis:** User queries are synthetically generated based on predefined scenarios covering various medical and scheduling use cases 2. **Tool Mocking:** Tool responses are simulated with realistic data (appointments, reminders, medical facts, prescreen results) 3. **Response Mining:** Final assistant responses are mined from a large language model given the full conversation context 4. **Format Conversion:** Conversations are converted to SFTTrainer-compatible format ## Intended Use ### Primary Use Cases - Fine-tuning LLMs for Thai medical chatbot applications - Training models to properly invoke and respond to tool calls - Building healthcare virtual assistants with scheduling capabilities - Research on medical information retrieval with citations ### Out-of-Scope Use - This dataset should **NOT** be used for actual medical diagnosis - Not suitable for providing real medical advice without human oversight - The emergency contact information is specific to Thailand and may not apply to other regions ## Dataset Statistics | Split | Samples | |:------|--------:| | `qwen3_5_27b` | 376,439 | | `qwen3_5_plus` | 376,477 | | `claude_4_6_sonnet` | TBD | ### Distribution by Tool (per split, approximate) | Tool Name | Samples | Percentage | |:----------|--------:|-----------:| | `negatives` (no tool call) | 357,072 | 94.85% | | `search_medical_facts` | 14,126 | 3.75% | | `get_health_emergency_contact` | 1,106 | 0.29% | | `create_appointment` | 1,000 | 0.27% | | `create_reminder` | 1,000 | 0.27% | | `list_reminder` | 778 | 0.21% | | `list_appointment` | 773 | 0.21% | | `prescreen` | 622 | 0.17% | ## Limitations and Biases 1. **Synthetic Nature:** Responses are generated by LLMs and may contain hallucinations or inaccuracies 2. **Thailand-Specific:** Emergency contacts and some medical practices are specific to Thailand's healthcare system 3. **Language Bias:** Primarily designed for Thai language; English support is secondary 4. **Medical Disclaimer:** This is synthetic training data and should not be used for actual medical decisions 5. **Tool Simulation:** Tool outputs are mocked/simulated and do not represent real medical data ## Related Datasets - [ThaiLLM/med-articles](https://huggingface.co/datasets/ThaiLLM/med-articles) - Source medical articles - [ThaiLLM/med-facts](https://huggingface.co/datasets/ThaiLLM/med-facts) - Extracted medical facts - [ThaiLLM/med-qas-synthetic](https://huggingface.co/datasets/ThaiLLM/med-qas-synthetic) - Medical Q&A pairs - [ThaiLLM/med-qas-golden-articles](https://huggingface.co/datasets/ThaiLLM/med-qas-golden-articles) - Human-annotated gold-label data

--- dataset_info: features: - name: conversations dtype: string - name: tool_name dtype: string splits: - name: qwen3_5_27b num_bytes: 2420420878 num_examples: 376439 - name: qwen3_5_plus num_bytes: 2150192481 num_examples: 376477 - name: claude_4_6_sonnet num_bytes: 2147726822 num_examples: 376477 download_size: 5369403541 dataset_size: 8942688074 configs: - config_name: default data_files: - split: qwen3_5_27b path: data/qwen3_5_27b-* - split: qwen3_5_plus path: data/qwen3_5_plus-* - split: claude_4_6_sonnet path: data/claude_4_6_sonnet-* license: mit task_categories: - text-generation language: - th - en pretty_name: med-app-instruct size_categories: - 100K<n<1M --- # 带工具调用的ThaiLLM医疗指令数据集 本数据集为合成式泰语医疗指令遵循数据集,支持工具调用功能,旨在训练大语言模型通过移动健康助手界面处理医疗相关查询。 ## 数据集说明 本数据集包含用户与AI健康助手的多轮对话,涵盖直接回复与工具增强交互两种形式。对话模拟了真实的泰语医疗应用场景,助手可调用各类医疗工具以提供精准且贴合上下文的协助。 ### 数据集结构 每条样本均遵循OpenAI对话补全格式,可兼容Hugging Face的[SFTTrainer](https://huggingface.co/docs/trl/en/sft_trainer)用于微调训练。 python { "conversations": [ {"role": "system", "content": "...带工具定义的系统提示词..."}, {"role": "user", "content": "...泰语用户查询..."}, {"role": "assistant", "tool_calls": [...]}, # 工具调用 {"role": "tool", "name": "tool_name", "content": "...工具返回结果..."}, {"role": "assistant", "content": "...最终回复..."} ], "tool_name": "..." # 本次对话中使用的主要工具 } ### 数据划分集 | 划分名称 | 说明 | 回复挖掘模型 | |:------|:------------|:----------------------| | `qwen3_5_27b` | 从Qwen3-235B-A22B(270亿活跃参数)中挖掘得到的回复 | [Qwen/Qwen3-235B-A22B](https://huggingface.co/Qwen/Qwen3-235B-A22B) | | `qwen3_5_plus` | 从Qwen3.5-Plus中挖掘得到的回复 | Qwen3.5-Plus(通过OpenRouter调用) | | `claude_4_6_sonnet` | 从Claude Sonnet 4.6中挖掘得到的回复 | [Claude Sonnet 4.6](https://docs.anthropic.com/en/docs/about-claude/models) | ## 工具集 本数据集包含7类医疗相关工具的交互场景: | 工具名称 | 功能说明 | 回复格式 | |:----------|:------------|:----------------| | `search_medical_facts` | 从知识库中检索相关医疗事实以解答健康相关问题 | 采用`<response>`和`<reference>`标签的结构化回复,包含引用信息 | | `prescreen` | 启动症状严重程度评估流水线并生成鉴别诊断 | 基于严重程度分类输出建议 | | `get_health_emergency_contact` | 返回泰国境内的医疗紧急热线(救护车、毒物控制、心理健康热线) | 相关紧急联系方式列表 | | `create_appointment` | 创建医院或诊所的新预约 | 预约详情确认信息 | | `create_reminder` | 创建用药提醒 | 提醒设置确认信息 | | `list_appointment` | 检索并支持对现有预约的交互操作 | 预约列表或编辑确认信息 | | `list_reminder` | 检索并支持对现有用药提醒的交互操作 | 提醒列表或编辑确认信息 | ### 工具分类 - **信息查询类(IQ)**:`search_medical_facts` —— 带引用要求的医疗检索增强生成(RAG) - **健康评估类**:`prescreen` —— 症状严重程度分类 - **紧急服务类**:`get_health_emergency_contact` —— 泰国专属紧急热线查询 - **日程与管理类**:`create_appointment`、`create_reminder`、`list_appointment`、`list_reminder` ## 数据生成流水线 ### 源数据 本数据集由多源数据构建: 1. **医疗事实**:源自[ThaiLLM/med-facts](https://huggingface.co/datasets/ThaiLLM/med-facts)与[ThaiLLM/med-articles](https://huggingface.co/datasets/ThaiLLM/med-articles) 2. **医疗问答**:基于[ThaiLLM/med-qas-synthetic](https://huggingface.co/datasets/ThaiLLM/med-qas-synthetic)(精炼后的基准划分集) 3. **合成工具查询**:针对预约、提醒、预筛查与紧急联系场景生成的工具查询 4. **负样本**:源自[kunato/typhoon-s-instruct-post-training](https://huggingface.co/datasets/kunato/typhoon-s-instruct-post-training),用于非工具调用的对话 ### 生成流程 1. **查询合成**:基于覆盖各类医疗与日程使用场景的预定义场景,合成用户查询 2. **工具模拟**:用真实数据(预约、提醒、医疗事实、预筛查结果)模拟工具回复 3. **回复挖掘**:基于完整对话上下文,从大语言模型中挖掘最终助手回复 4. **格式转换**:将对话转换为SFTTrainer兼容格式 ## 预期用途 ### 主要使用场景 - 针对泰语医疗聊天机器人应用的大语言模型微调 - 训练模型正确调用工具并生成对应回复 - 构建带日程管理功能的医疗虚拟助手 - 开展带引用的医疗信息检索相关研究 ### 禁止使用场景 - 本数据集**不得**用于实际医疗诊断 - 未经人类监督的情况下,不适用于提供真实医疗建议 - 紧急联系信息仅针对泰国境内,不适用于其他地区 ## 数据集统计信息 | 划分名称 | 样本量 | |:------|--------:| | `qwen3_5_27b` | 376,439 | | `qwen3_5_plus` | 376,477 | | `claude_4_6_sonnet` | 待公布(TBD) | ### 各划分集工具分布(近似值) | 工具名称 | 样本量 | 占比 | |:----------|--------:|-----------:| | `negatives`(无工具调用) | 357,072 | 94.85% | | `search_medical_facts` | 14,126 | 3.75% | | `get_health_emergency_contact` | 1,106 | 0.29% | | `create_appointment` | 1,000 | 0.27% | | `create_reminder` | 1,000 | 0.27% | | `list_reminder` | 778 | 0.21% | | `list_appointment` | 773 | 0.21% | | `prescreen` | 622 | 0.17% | ## 局限性与偏差 1. **合成特性**:回复由大语言模型生成,可能包含幻觉内容或不准确信息 2. **泰国专属特性**:紧急联系信息与部分医疗实践仅适配泰国医疗体系 3. **语言偏向**:主要面向泰语设计,英语支持为次要适配 4. **医疗免责声明**:本数据集为合成训练数据,不得用于实际医疗决策 5. **工具模拟**:工具输出为模拟生成,不代表真实医疗数据 ## 相关数据集 - [ThaiLLM/med-articles](https://huggingface.co/datasets/ThaiLLM/med-articles) —— 源医疗文章数据集 - [ThaiLLM/med-facts](https://huggingface.co/datasets/ThaiLLM/med-facts) —— 提取的医疗事实数据集 - [ThaiLLM/med-qas-synthetic](https://huggingface.co/datasets/ThaiLLM/med-qas-synthetic) —— 合成医疗问答对数据集 - [ThaiLLM/med-qas-golden-articles](https://huggingface.co/datasets/ThaiLLM/med-qas-golden-articles) —— 人工标注的金标准数据集
提供机构:
ThaiLLM
二维码
社区交流群
二维码
科研交流群
商业服务