five

openbmb/UltraInteract_sft

收藏
Hugging Face2024-04-05 更新2024-04-19 收录
下载链接:
https://hf-mirror.com/datasets/openbmb/UltraInteract_sft
下载链接
链接失效反馈
官方服务:
资源简介:
--- language: - en license: mit pretty_name: UltraInteract_sft configs: - config_name: default data_files: - split: train path: 0000_sft.parquet dataset_info: features: - name: task dtype: string - name: dataset dtype: string - name: instruction dtype: string - name: response dtype: string - name: id dtype: string - name: parent_id dtype: string splits: - name: train num_bytes: 687238 num_examples: 288579 download_size: 687238 dataset_size: 687238 --- ## Introduction - 📜 [Paper](https://arxiv.org/abs/2404.02078) - 🤗 [Eurus Collection](https://huggingface.co/collections/openbmb/eurus-660bc40bec5376b3adc9d1c5) - 🤗 UltraInteract - [SFT](https://huggingface.co/datasets/openbmb/UltraInteract_sft) - [Preference Learning](https://huggingface.co/datasets/openbmb/UltraInteract_pair) - [GitHub Repo](https://github.com/OpenBMB/Eurus) UltraInteract is a large-scale, high-quality alignment dataset specifically designed for complex reasoning tasks. For each instruction, it includes a preference tree consisting of - (1) reasoning chains with diverse planning strategies in a unified format - (2) multi-turn interaction trajectories with the environment and the critique - (3) pairwise data to facilitate preference learning ## Structure UltraInteract collects a preference tree for each instruction, with the instruction being the root and each action a node. A trajectory is a root-to-leaf path consisting of a sequence of actions. In each preference tree, all nodes of correct actions and all trajectories ending with correct actions can be used for SFT. Paired correct and incorrect nodes or trajectories can be used for preference learning. <img src="./figures/tree.png" alt="tree" style="zoom: 20%;" /> ## Illustrative Example Here is an illustrative example of an UltraInteract trajectory over two turns. In each turn, the actor model generates step-by-step reasoning chains, and the environment and the critique model provide observations and textual critique respectively. <img src="./figures/ui_example.png" alt="ui_example" style="zoom: 25%;" /> ## Stats Below are some statistics about UltraInteract. It consists of 86k instructions, 286k correct answers, and 219k pairs. <img src="./figures/stats.png" alt="stats" style="zoom: 40%;" /> ## Dataset Format (SFT) Coding ```JSONC { "id": "92a7356beaa75391539cb79624bdf85b7e5d36d5e74e46a2f1c4001f40b3e055_1_1", // unique data id, contains three parts, the unique string, the depth of the preference tree, and current turn, separated by '_' "parent_id": "535550938ff58bd73cd7fb85be834bb90b7600daf6b6f6a16b64091e5ecbfe43", // data with the same parent_id have the same instruction but different actions. "task": "Coding", // task type, choices = ["Coding", "Math_Cot", "Math_PoT", "Logic"] "dataset": "codecontest", // the dataset where the instruction comes from "instruction": "Write Python code to solve the task.\nMike has a string s consisting of only lowercase English letters. He wants to change exactly one character from the string so that the resulting one is a palindrome. \n\nA palindrome is a string that reads the same backward as forward, for example strings \"z\", \"aaa\", \"aba\", \"abccba\" are palindromes, but strings \"codeforces\", \"reality\", \"ab\" are not.\n\nInput\n\nThe first and single line contains string s (1 ≤ |s| ≤ 15).\n\nOutput\n\nPrint \"YES\" (without quotes) if Mike can change exactly one character so that the resulting string is palindrome or \"NO\" (without quotes) otherwise. \n\nExamples\n\nInput\n\nabccaa\n\n\nOutput\n\nYES\n\n\nInput\n\nabbcca\n\n\nOutput\n\nNO\n\n\nInput\n\nabcda\n\n\nOutput\n\nYES", // the task description. "response": " Step 1: This problem asks us to determine if it is possible to change exactly one character in the string to make it a palindrome. Step 2: We can start by iterating through the characters in the string and counting the number of differences between corresponding characters from the beginning and end of the string. Step 3: If the length of the string is odd and there is only one difference, or if the length is even and there is exactly one difference, then it is possible to change exactly one character to make the string a palindrome. Step 4: We need to consider edge cases such as a single character string or an empty string. ```python # Step 5: Take the input string s = input() # Step 6: Calculate the length of the string n = len(s) # Step 7: Initialize a counter to keep track of the number of differences cnt = 0 # Step 8: Iterate through the first half of the string and count the number of differences between corresponding characters from the beginning and end of the string. for i in range(n//2): if s[i] != s[n-i-1]: cnt += 1 # Step 9: If the length of the string is odd and there are no differences, or if the length is even and there is exactly one difference, print "YES" (without quotes) if (n % 2 == 1 and cnt == 0) or (cnt == 1): print('YES') # Step 10: Otherwise, print "NO" (without quotes) else: print('NO') ```" // The step-by-step solution. } ``` Math ```JSONC { "id": "647b2e8706cf459a8e3ec8e99727d2d51ff3414bf187db43d92cff87f8012713_1_1", "parent_id": "499d250c5852eddcd48a28b6c173f1a2349a16555990a1cd6fb5c7954cb94587", "task": "Math_PoT", "dataset": "mathqa", "instruction": "Tool available:\n[1] Python interpreter\nWhen you send a message containing Python code to python, it will be executed in a stateful Jupyter notebook environment.\nSolve the following math problem step-by-step.\nthe length of a rectangle is doubled while its width is doubled . what is the % change in area ?", "response": " Step 1: The area of a rectangle is given by the product of its length and width. If the length is doubled, the area changes from l*w to 2l*w. Similarly, if the width is doubled, the area changes from l*w to l*2w. Step 2: If both the length and width are doubled, the area changes from l*w to 2l*2w. The percentage change in area is given by ((new area - old area) / old area)*100. Step 3: We can calculate the percentage change in area using the formula above. Step 4: By creating a tool to calculate the percentage change in area, we can easily solve the question. ```python # Step 5: Define a tool to calculate the percentage change in area def calculate_percentage_change(length, width): # Step 6: Calculate the old and new areas old_area = length * width new_area = 2 * length * 2 * width # Step 7: Calculate the percentage change percentage_change = ((new_area - old_area) / old_area) * 100 return percentage_change # Step 8: Call the function to solve the question percentage_change = calculate_percentage_change(2, 2) print(percentage_change) ```" } ``` Logic ```JSONC { "id": "92a19848da4fb0fc0b414f061f7500a81ea4cbd8f922ca1e32a6a15ef6f7e1a0_1_1", "parent_id": "107cc9147d8c09e62e2ba9e74cb41d9dbafd9a3adf62b67ba3da2b31c81b3300", "task": "Logic", "dataset": "hotpotqa", "instruction": " Tool available:\n[1] wikipedia_search(query: str) -> str\nThe Wikipedia Search tool provides access to a vast collection of articles covering a wide range of topics.\nCan query specific keywords or topics to retrieve accurate and comprehensive information. Solve the following problem step-by-step:\nWhich musician or group is from the US, 3OH!3 or Regina Spektor? Step 1: To determine which musician or group is from the US, we can search for information about each of them. ```python # Step 2: Searching for the information about 3OH!3. print(wikipedia_search('3OH!3')) ``` Page: 3OH!3 Summary: 3OH!3 (pronounced \"three oh three\") is an American electronic music duo from Boulder, Colorado, made up of Sean Foreman and Nathaniel Motte. They are best known for their single \"DONTTRUSTME\" from their album Want, which reached number seven on the Billboard Hot 100. Their second single, a remix of \"Starstrukk\" featuring Katy Perry from Want, was a top ten hit in the United Kingdom, Ireland, Finland, Poland, and Australia. They gained further recognition by featuring Kesha on the song \"My First Kiss\", which was made the lead single from their album Streets of Gold. The album later peaked at number seven on the Billboard 200.\n\n\n\nPage: 3OH!3 (album)\nSummary: 3OH!3 is the debut studio album by American electronic music band 3OH!3. The tracks \"Holler Til You Pass Out\" and \"Chokechain\" were later remixed for the band's major label debut. \"Holler Til You Pass Out\", \"Chokechain\", and \"Dance with Me\" are excluded from the iTunes release of the album.", "response": " Step 1: The provided information confirms that 3OH!3 is an American electronic music duo from Boulder, Colorado. Step 2: We no longer need to perform a search for Regina Spektor as we were only tasked to determine which of the two options is from the US and we have already confirmed 3OH!3's origin. Step 3: We can confidently conclude that 3OH!3 is the musician/group from the US. Answer:3OH!3" } ``` ## Citation ```bib @misc{yuan2024advancing, title={Advancing LLM Reasoning Generalists with Preference Trees}, author={Lifan Yuan and Ganqu Cui and Hanbin Wang and Ning Ding and Xingyao Wang and Jia Deng and Boji Shan and Huimin Chen and Ruobing Xie and Yankai Lin and Zhenghao Liu and Bowen Zhou and Hao Peng and Zhiyuan Liu and Maosong Sun}, year={2024}, eprint={2404.02078}, archivePrefix={arXiv}, primaryClass={cs.AI} } ```
提供机构:
openbmb
原始信息汇总

数据集概述

基本信息

  • 语言: 英语
  • 许可证: MIT
  • 名称: UltraInteract_sft
  • 配置: 默认配置
    • 数据文件:
      • 分割: 训练
      • 路径: 0000_sft.parquet

数据集特征

  • 特征:
    • 名称: task
      • 数据类型: string
    • 名称: dataset
      • 数据类型: string
    • 名称: instruction
      • 数据类型: string
    • 名称: response
      • 数据类型: string
    • 名称: id
      • 数据类型: string
    • 名称: parent_id
      • 数据类型: string

数据分割

  • 分割名称: 训练
    • 字节数: 687238
    • 样本数: 288579

数据集大小

  • 下载大小: 687238
  • 数据集大小: 687238

数据集格式 (SFT)

示例 - Coding

jsonc { "id": "92a7356beaa75391539cb79624bdf85b7e5d36d5e74e46a2f1c4001f40b3e055_1_1", "parent_id": "535550938ff58bd73cd7fb85be834bb90b7600daf6b6f6a16b64091e5ecbfe43", "task": "Coding", "dataset": "codecontest", "instruction": "Write Python code to solve the task. Mike has a string s consisting of only lowercase English letters. He wants to change exactly one character from the string so that the resulting one is a palindrome.

A palindrome is a string that reads the same backward as forward, for example strings "z", "aaa", "aba", "abccba" are palindromes, but strings "codeforces", "reality", "ab" are not.

Input

The first and single line contains string s (1 ≤ |s| ≤ 15).

Output

Print "YES" (without quotes) if Mike can change exactly one character so that the resulting string is palindrome or "NO" (without quotes) otherwise.

Examples

Input

abccaa

Output

YES

Input

abbcca

Output

NO

Input

abcda

Output

YES", "response": " Step 1: This problem asks us to determine if it is possible to change exactly one character in the string to make it a palindrome. Step 2: We can start by iterating through the characters in the string and counting the number of differences between corresponding characters from the beginning and end of the string. Step 3: If the length of the string is odd and there is only one difference, or if the length is even and there is exactly one difference, then it is possible to change exactly one character to make the string a palindrome. Step 4: We need to consider edge cases such as a single character string or an empty string.

    python
    # Step 5: Take the input string
    s = input()
    # Step 6: Calculate the length of the string
    n = len(s)
    # Step 7: Initialize a counter to keep track of the number of differences
    cnt = 0
    # Step 8: Iterate through the first half of the string and count the number of differences between corresponding characters from the beginning and end of the string.
    for i in range(n//2):
        if s[i] != s[n-i-1]:
            cnt += 1
    # Step 9: If the length of the string is odd and there are no differences, or if the length is even and there is exactly one difference, print "YES" (without quotes)
    if (n % 2 == 1 and cnt == 0) or (cnt == 1):
        print(YES)
    # Step 10: Otherwise, print "NO" (without quotes)
    else:
        print(NO)
    "

}

示例 - Math

jsonc { "id": "647b2e8706cf459a8e3ec8e99727d2d51ff3414bf187db43d92cff87f8012713_1_1", "parent_id": "499d250c5852eddcd48a28b6c173f1a2349a16555990a1cd6fb5c7954cb94587", "task": "Math_PoT", "dataset": "mathqa", "instruction": "Tool available: [1] Python interpreter When you send a message containing Python code to python, it will be executed in a stateful Jupyter notebook environment. Solve the following math problem step-by-step. the length of a rectangle is doubled while its width is doubled . what is the % change in area ?", "response": " Step 1: The area of a rectangle is given by the product of its length and width. If the length is doubled, the area changes from lw to 2lw. Similarly, if the width is doubled, the area changes from lw to l2w. Step 2: If both the length and width are doubled, the area changes from lw to 2l2w. The percentage change in area is given by ((new area - old area) / old area)*100. Step 3: We can calculate the percentage change in area using the formula above. Step 4: By creating a tool to calculate the percentage change in area, we can easily solve the question.

    python
    # Step 5: Define a tool to calculate the percentage change in area
    def calculate_percentage_change(length, width):
        # Step 6: Calculate the old and new areas
        old_area = length * width
        new_area = 2 * length * 2 * width
        # Step 7: Calculate the percentage change
        percentage_change = ((new_area - old_area) / old_area) * 100
        return percentage_change
    # Step 8: Call the function to solve the question
    percentage_change = calculate_percentage_change(2, 2)
    print(percentage_change)
    "

}

示例 - Logic

jsonc { "id": "92a19848da4fb0fc0b414f061f7500a81ea4cbd8f922ca1e32a6a15ef6f7e1a0_1_1", "parent_id": "107cc9147d8c09e62e2ba9e74cb41d9dbafd9a3adf62b67ba3da2b31c81b3300", "task": "Logic", "dataset": "hotpotqa", "instruction": " Tool available: [1] wikipedia_search(query: str) -> str The Wikipedia Search tool provides access to a vast collection of articles covering a wide range of topics. Can query specific keywords or topics to retrieve accurate and comprehensive information. Solve the following problem step-by-step: Which musician or group is from the US, 3OH!3 or Regina Spektor? Step 1: To determine which musician or group is from the US, we can search for information about each of them. python # Step 2: Searching for the information about 3OH!3. print(wikipedia_search(3OH!3))

    Page: 3OH!3
    Summary: 3OH!3 (pronounced "three oh three") is an American electronic music duo from Boulder, Colorado, made up of Sean Foreman and Nathaniel Motte. They are best known for their single "DONTTRUSTME" from their album Want, which reached number seven on the Billboard Hot 100. Their second single, a remix of "Starstrukk" featuring Katy Perry from Want, was a top ten hit in the United Kingdom, Ireland, Finland, Poland, and Australia. They gained further recognition by featuring Kesha on the song "My First Kiss", which was made the lead single from their album Streets of Gold. The album later peaked at number seven on the Billboard 200.

Page: 3OH!3 (album) Summary: 3OH!3 is the debut studio album by American electronic music band 3OH!3. The tracks "Holler Til You Pass Out" and "Chokechain" were later remixed for the bands major label debut. "Holler Til You Pass Out", "Chokechain", and "Dance with Me" are excluded from the iTunes release of the album.", "response": " Step 1: The provided information confirms that 3OH!3 is an American electronic music duo from Boulder, Colorado. Step 2: We no longer need to perform a search for Regina Spektor as we were only tasked to determine which of the two options is from the US and we have already confirmed 3OH!3s origin. Step 3: We can confidently conclude that 3OH!3 is the musician/group from the US. Answer:3OH!3" }

5,000+
优质数据集
54 个
任务类型
进入经典数据集
二维码
社区交流群

面向社区/商业的数据集话题

二维码
科研交流群

面向高校/科研机构的开源数据集话题

数据驱动未来

携手共赢发展

商业合作