├── LICENSE ├── README.md ├── data ├── ensemble-instruct.jsonl └── seed_tasks.jsonl ├── ensemble_instruct ├── bam_api.py ├── ensemble_output.py ├── gen_instances.py ├── gen_instructions.py ├── gen_output_zeroshot.py ├── sample_instances.py └── templates │ └── instance_template.py ├── requirements.txt ├── sample ├── openei.ensemble ├── openei.flan-t5-xxl_output.jsonl ├── openei.flan-ul2_output.jsonl ├── openei.io_instances.jsonl ├── openei.io_instructions.jsonl ├── openei.io_samples.jsonl ├── openei.o_instances.jsonl ├── openei.o_instructions.jsonl ├── openei.o_samples.jsonl └── openei.samples.jsonl └── scripts ├── ensemble.sh ├── ensemble_instruct.sh ├── gen_io_instance.sh ├── gen_io_instruction.sh ├── gen_o_instance.sh ├── gen_o_instruction.sh ├── gen_output_flan-t5-xxl.sh └── gen_output_flan-ul2.sh /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ensemble-instruct 2 | 3 | This repo includes the codebase and dataset releases for the following EMNLP2023 paper: 4 | 5 | **[Ensemble-Instruct: Instruction Tuning Data Generation with a Heterogeneous Mixture of LMs](https://aclanthology.org/2023.findings-emnlp.836)** 6 | 7 | The data set is given in **data/ensemble-instruct.jsonl** 8 | 9 | 10 | ### Installation 11 | 12 | 1. git clone https://github.com/IBM/ensemble-instruct 13 | 2. cd ensemble-instruct 14 | 3. Create a conda environment of your choice. Once such example would look like: 15 | 16 | conda create -y -p ./eienvs python=3.11 17 | 18 | 4. Activate the conda environment 19 | conda activate ./eienvs 20 | 5. Install the dependencies using the following command: 21 | pip install -r requirements.txt 22 | 23 | ### Environment Variable 24 | 25 | This repo assumes that all of the LLM's are accessible from the 26 | following platform, which requires an access key: 27 | 28 | https://bam.res.ibm.com/ 29 | 30 | And the access key can be set using the following command in your login shell: 31 | export BAM_API_KEY=xyz 32 | 33 | All of the models used in our experiments can also be accessed from: 34 | huggingface models: https://huggingface.co/models 35 | 36 | And you need to set the BAM_API_KEY to the access key of the platform of your choice 37 | 38 | ### Ensemble Instruct 39 | 40 | Step 0: In the repo directory, create a subdirectory sample, as shown below 41 | 42 | mkdir sample 43 | 44 | **Synthetic intruction tuning data set acquisition comprises 5 steps**: 45 | 46 | **Step 1: Instruction generation** 47 | Instructions are divided into 2 categories: 48 | 49 | 1. Instruction that requires input-output instances, which can be obtained with: 50 | scripts/gen_io_instruction.sh 51 | 2. Instruction that require output only instances, which can be obtained with: 52 | scripts/gen_o_instruction.sh 53 | 54 | **Step 2: Instance generation** 55 | 56 | Instances are also divided into 2 categories: 57 | 58 | 1. Input-output instances, which can be obtained with: 59 | scripts/gen_io_instance.sh 60 | 2. Output only instances, which can be obtained with: 61 | scripts/gen_o_instance.sh 62 | 63 | **Step 3: Filtering out invalid instances** 64 | 65 | Not all of the generated instances are in valid format. So we select only valid instances 66 | with the script ensemble_instruct/sample_instances.py input output 67 | 68 | Input-output instances and output only instances can be merged at this stage to 69 | proceed with output generation in the next step. 70 | 71 | **Step 4: Additional output generation** 72 | 73 | For output ensemble, we generate addition outputs given the instruction and (optional) input obtained in Steps 1 & 2, using flan-t5-xxl and flan-ul2 as follows: 74 | 75 | 1. Output generation with flan-t5-xxl 76 | scripts/gen_output_flan-t5-xxl.sh 77 | 2. Output generation with flan-ul2 78 | scripts/gen_output_flan-ul2.sh 79 | 80 | **Step 5: Ensemble Instruct** 81 | 82 | We apply ensembling of 3 sets ouf outputs generated in Step 2 and Step 4 to select high 83 | quality output as the final output, which can be obtained with 84 | 85 | scripts/ensemble.sh 86 | 87 | ### Putting all things together 88 | 89 | The following script run all of the 5 steps in one pipeline: 90 | 91 | scripts/ensemble_instruct.sh 92 | 93 | All of the intermediate outputs can be found in the directory: 94 | sample/ 95 | 96 | The final ensembled output is: **sample/openei.ensemble** 97 | 98 | ### Citation 99 | 100 | ``` 101 | @inproceedings{ensemble-instruct2023, \ 102 | title={Ensemble-Instruct: Instruction Tuning Data Generation with a Heterogeneous Mixture of LMs},\ 103 | author={Lee, Young-Suk and Sultan, Arafat and El-Kurdi, Yousef and Naseem, Tahira and Munawar, Asim and Florian, Radu and Roukos, Salim and Astudillo, Ramon}, \ 104 | journal={Findings of the Association for Computational Linguistics: EMNLP 2023}, \ 105 | pages={12561-12571},\ 106 | year={2023} 107 | } 108 | ``` 109 | 110 | ### Acknowledgement 111 | 112 | **gen_instruction.py** and **gen_instances.py** are adapted from [bootstrap_instruction](https://github.com/yizhongw/self-instruct/blob/main/self_instruct/bootstrap_instructions.py) 113 | and [generate_instances](https://github.com/yizhongw/self-instruct/blob/main/self_instruct/generate_instances.py) respectively. **seed_tasks.jsonl** is an exact copy of [seed_tasks](https://github.com/yizhongw/self-instruct/blob/main/data/seed_tasks.jsonl) 114 | -------------------------------------------------------------------------------- /ensemble_instruct/bam_api.py: -------------------------------------------------------------------------------- 1 | import os 2 | from dotenv import load_dotenv 3 | from genai.model import Credentials, Model 4 | from genai.schemas import GenerateParams 5 | import json 6 | import tqdm 7 | import random 8 | import argparse 9 | import time 10 | from datetime import datetime 11 | from typing import List, Optional, Union 12 | from genai.exceptions.genai_exception import GenAiException 13 | import time 14 | 15 | def make_bam_request( 16 | engine, 17 | api_key, 18 | prompts, 19 | decoding_method="sample", 20 | max_new_tokens=128, 21 | min_new_tokens=1, 22 | stream=False, 23 | temperature=0.7, 24 | top_k=50, 25 | top_p=1, 26 | stop_sequences=None): 27 | 28 | params = GenerateParams( 29 | decoding_method=decoding_method, 30 | max_new_tokens=max_new_tokens, 31 | min_new_tokens=min_new_tokens, 32 | stream=stream, 33 | temperature=temperature, 34 | top_k=top_k, 35 | top_p=top_p, 36 | stop_sequences=stop_sequences 37 | ) 38 | # api_key and api_endpoint depends on the URL of the LLM host machine 39 | # and should be modified accordingly 40 | creds = Credentials(api_key, api_endpoint="https://bam-api.res.ibm.com/v1") 41 | chat = Model(engine, params=params, credentials=creds) 42 | 43 | tries = 10 44 | for i in range(tries): # 10 retries 45 | try: 46 | responses = chat.generate(prompts) 47 | except GenAiException as e: 48 | if i < tries -1: 49 | print("Timeout connection to BAM, waiting 10mins before retry") 50 | print(e) 51 | print(f"Prompts: {prompts}") 52 | print("Promts Lengths:") 53 | print([len(i.split()) for i in prompts]) 54 | time.sleep(10*60) 55 | continue 56 | else: 57 | raise e 58 | break 59 | 60 | results = [] 61 | for response in responses: 62 | data = { 63 | "prompt": response.input_text, 64 | "response": response.generated_text, 65 | "seed": response.seed, 66 | } 67 | results.append(data) 68 | 69 | return results 70 | 71 | def parse_args(): 72 | parser = argparse.ArgumentParser() 73 | parser.add_argument( 74 | "--engine", 75 | type=str, 76 | default="flan-t5-xxl", 77 | help="BAM model to try", 78 | ) 79 | parser.add_argument( 80 | "--input_file", 81 | type=str, 82 | help="The input file that contains the prompts to BAM.", 83 | ) 84 | parser.add_argument( 85 | "--output_file", 86 | type=str, 87 | help="The output file to save the responses from BAM.", 88 | ) 89 | parser.add_argument( 90 | "--request_batch_size", 91 | type=int, 92 | default=5, 93 | help="The number of requests to send to BAM at a time.", 94 | ) 95 | parser.add_argument( 96 | "--use_existing_responses", 97 | action="store_true", 98 | help="Whether to use existing responses from the output file if exists", 99 | ) 100 | return parser.parse_args() 101 | 102 | if __name__ == "__main__": 103 | random.seed(123) 104 | args = parse_args() 105 | os.makedirs(os.path.dirname(args.output_file), exist_ok=True) 106 | fout = open(args.output_file, "w", encoding="utf-8") 107 | fin = open(args.input_file, "r", encoding="utf-8") 108 | 109 | all_prompts = [json.loads(line)["prompt"] for line in fin] 110 | print(f"Loaded {len(all_prompts)} human-written seed instructions") 111 | 112 | # BAM_API_KEY can be set with export BAM_API_KEY=xyz either in login shell or cli 113 | api_key = os.getenv("BAM_API_KEY", None) 114 | 115 | print("\n------------- Example (GPT Chat)-------------\n") 116 | 117 | for i in tqdm.tqdm(range(0, len(all_prompts), args.request_batch_size)): 118 | batch_prompts = all_prompts[i: i + args.request_batch_size] 119 | responses = make_bam_request(args.engine, api_key, batch_prompts) 120 | for response in responses: 121 | fout.write(json.dumps(response) + "\n") 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /ensemble_instruct/ensemble_output.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import logging 3 | import os 4 | import sys 5 | import json 6 | import re 7 | from collections import defaultdict 8 | from rouge_score import rouge_scorer 9 | from multiprocessing import Pool 10 | import string 11 | 12 | #set_progress_bar_enabled(False) 13 | logger = logging.getLogger(__name__) 14 | 15 | def normalize_answer(s): 16 | """Lower text and remove punctuation, and extra whitespace.""" 17 | def white_space_fix(text): 18 | return ' '.join(text.split()) 19 | def remove_punc(text): 20 | exclude = set(string.punctuation) 21 | return ''.join(ch for ch in text if ch not in exclude) 22 | def lower(text): 23 | return text.lower() 24 | return white_space_fix(remove_punc(lower(s))) 25 | 26 | def exact_match_score(prediction, ground_truth): 27 | return (normalize_answer(prediction) == normalize_answer(ground_truth)) 28 | 29 | def rouge1_score(prediction, ground_truth): 30 | scorer = rouge_scorer.RougeScorer(['rouge1'], use_stemmer=True) 31 | scores = scorer.score(prediction=prediction, target=ground_truth) 32 | return scores["rouge1"].fmeasure 33 | 34 | def rougeL_score(prediction, ground_truth): 35 | scorer = rouge_scorer.RougeScorer(['rougeL'], use_stemmer=True) 36 | scores = scorer.score(prediction=prediction, target=ground_truth) 37 | return scores["rougeL"].fmeasure 38 | 39 | def read_output_jsonfile(file_name): 40 | output_list = [] 41 | with open(file_name, encoding="utf-8") as reader: 42 | for line in reader: 43 | instance = json.loads(line) 44 | classlabel = instance["output"].strip() 45 | output_list.append(classlabel) 46 | return output_list 47 | 48 | def compute_EM(instance_output, output1, output2): 49 | io_o1 = exact_match_score(instance_output, output1) 50 | io_o2 = exact_match_score(instance_output, output2) 51 | o1_o2 = exact_match_score(output1, output2) 52 | return io_o1, io_o2, o1_o2 53 | 54 | def compute_rougeL(instance_output, output1, output2): 55 | io_o1_R = rougeL_score(instance_output, output1) 56 | io_o2_R = rougeL_score(instance_output, output2) 57 | o1_o2_R = rougeL_score(output1, output2) 58 | return io_o1_R, io_o2_R, o1_o2_R 59 | 60 | def select_worst_rougescore(io_o1_R, io_o2_R, o1_o2_R): 61 | if io_o1_R <= io_o2_R and io_o1_R <= o1_o2_R: 62 | return io_o1_R 63 | elif io_o2_R <= io_o1_R and io_o2_R <= o1_o2_R: 64 | return io_o2_R 65 | elif o1_o2_R <= io_o1_R and o1_o2_R <= io_o2_R: 66 | return o1_o2_R 67 | 68 | def select_best_rouge(io_o1_R, io_o2_R, o1_o2_R, instance_output, output1, output2): 69 | score1 = io_o1_R + io_o2_R 70 | score2 = io_o1_R + o1_o2_R 71 | score3 = io_o2_R + o1_o2_R 72 | 73 | if score1 >= score2 and score1 >= score3: 74 | return score1, instance_output 75 | elif score2 >= score1 and score2 >= score3: 76 | return score2, output1 77 | elif score3 >= score1 and score3 >= score2: 78 | return score3, output2 79 | 80 | def parse_args(): 81 | parser = argparse.ArgumentParser() 82 | parser.add_argument( 83 | "--genoutput1", 84 | type=str, 85 | required=True, 86 | help="generated output file1 zeroshot" 87 | ) 88 | parser.add_argument( 89 | "--genoutput2", 90 | type=str, 91 | required=True, 92 | help="generated output file2 zeroshot" 93 | ) 94 | parser.add_argument( 95 | "--instance_file", 96 | type=str, 97 | required=True, 98 | help="instruction-instance file used for output generation" 99 | ) 100 | parser.add_argument( 101 | "--ensemble", 102 | type=str, 103 | required=True, 104 | help="ensembed instance file via output ensembling" 105 | ) 106 | return parser.parse_args() 107 | 108 | if __name__ == '__main__': 109 | args = parse_args() 110 | genoutput1 = read_output_jsonfile(args.genoutput1) 111 | genoutput2 = read_output_jsonfile(args.genoutput2) 112 | 113 | if len(genoutput1) != len(genoutput2): 114 | raise Exception("Sorry, len(genoutput1) and len(genoutput2) are not the same!") 115 | ensemble = open(args.ensemble, "w", encoding="utf-8") 116 | 117 | linecount = 0 118 | with open(args.instance_file, encoding="utf-8") as reader: 119 | for line in reader: 120 | instance = json.loads(line) 121 | instruction = instance["instruction"].strip() 122 | input = instance["input"].strip() 123 | instance_output = instance["output"].strip() 124 | output1 = genoutput1[linecount] 125 | output2 = genoutput2[linecount] 126 | 127 | instance_output_norm = normalize_answer(instance_output) 128 | output1_norm = normalize_answer(output1) 129 | output2_norm = normalize_answer(output2) 130 | 131 | io_o1, io_o2, o1_o2 = compute_EM(instance_output_norm, output1_norm, output2_norm) 132 | io_o1_R, io_o2_R, o1_o2_R = compute_rougeL(instance_output_norm, output1_norm, output2_norm) 133 | 134 | # greedy selection of EM output 135 | em_flag = 0 136 | if io_o1==1 or io_o2==1: 137 | ensemble.write(json.dumps({ 138 | "instruction": instruction, 139 | "input": input, 140 | "output": instance_output 141 | }) + "\n") 142 | em_flag = 1 143 | elif em_flag==0 and o1_o2==1: 144 | ensemble.write(json.dumps({ 145 | "instruction": instruction, 146 | "input": input, 147 | "output": output1 148 | }) + "\n") 149 | em_flag = 1 150 | 151 | worst_rouge_score = select_worst_rougescore(io_o1_R, io_o2_R, o1_o2_R) 152 | best_rouge_score, best_output = select_best_rouge(io_o1_R, io_o2_R, o1_o2_R, instance_output, output1, output2) 153 | 154 | # Select only the best output with the minimum rougeL agreement score 155 | if em_flag==0 and worst_rouge_score > 0.01 and best_output!="": 156 | ensemble.write(json.dumps({ 157 | "instruction": instruction, 158 | "input": input, 159 | "output": best_output 160 | }) + "\n") 161 | 162 | linecount += 1 163 | print("linecount: ", linecount) 164 | 165 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /ensemble_instruct/gen_instances.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | import random 4 | import tqdm 5 | import re 6 | import argparse 7 | import pandas as pd 8 | from collections import OrderedDict 9 | from bam_api import make_bam_request 10 | from dotenv import load_dotenv 11 | from genai.model import Credentials, Model 12 | from genai.schemas import GenerateParams 13 | from templates.instance_template import output_template, input_output_template 14 | 15 | random.seed(42) 16 | 17 | def parse_args(): 18 | parser = argparse.ArgumentParser() 19 | parser.add_argument( 20 | "--batch_dir", 21 | type=str, 22 | required=True, 23 | help="The directory where the batch is stored.", 24 | ) 25 | parser.add_argument( 26 | "--input_file", 27 | type=str, 28 | required=True, 29 | default="machine_generated_instructions.jsonl", 30 | help="machine generated instruction file", 31 | ) 32 | parser.add_argument( 33 | "--output_file", 34 | type=str, 35 | required=True, 36 | default="machine_generated_instances.jsonl", 37 | help="machine generated instance output file", 38 | ) 39 | parser.add_argument( 40 | "--num_instructions", 41 | type=int, 42 | help="if specified, only generate instance input for this many instructions", 43 | ) 44 | parser.add_argument( 45 | "--max_instances_to_generate", 46 | type=int, 47 | default=1, 48 | help="The max number of instances to generate for each instruction.", 49 | ) 50 | parser.add_argument( 51 | "--template", 52 | type=str, 53 | default="input_output", 54 | help="Which template to use: output_template or input_output_template", 55 | ) 56 | parser.add_argument( 57 | "--engine", 58 | type=str, 59 | default="tiiuae/falcon-40b", 60 | help="The engine to use." 61 | ) 62 | parser.add_argument( 63 | "--request_batch_size", 64 | type=int, 65 | default=5, 66 | help="The number of requests to send in a batch." 67 | ) 68 | return parser.parse_args() 69 | 70 | if __name__ == '__main__': 71 | args = parse_args() 72 | api_key = os.getenv("BAM_API_KEY", None) 73 | # read the input file containing machine instructions 74 | with open(os.path.join(args.batch_dir, args.input_file)) as fin: 75 | lines = fin.readlines() 76 | if args.num_instructions is not None: 77 | lines = lines[:args.num_instructions] 78 | tasks = [] 79 | for line in lines: 80 | data = json.loads(line) 81 | if "metadata" in data: 82 | data["instruction_metadata"] = data["metadata"] 83 | del data["metadata"] 84 | tasks.append(data) 85 | 86 | output_path = os.path.join(args.batch_dir, args.output_file) 87 | existing_requests = {} 88 | # check to see if an output file already exists 89 | # if the output file exists, read the previously generated outputs 90 | if os.path.exists(output_path): 91 | with open(output_path) as fin: 92 | for line in tqdm.tqdm(fin): 93 | try: 94 | data = json.loads(line) 95 | existing_requests[data["instruction"]] = data 96 | except: 97 | pass 98 | print(f"Loaded {len(existing_requests)} existing requests") 99 | 100 | progress_bar = tqdm.tqdm(total=len(tasks)) 101 | with open(output_path, "w") as fout: 102 | for batch_idx in range(0, len(tasks), args.request_batch_size): 103 | batch = tasks[batch_idx: batch_idx + args.request_batch_size] 104 | if all(d["instruction"] in existing_requests for d in batch): 105 | for d in batch: 106 | data = existing_requests[d["instruction"]] 107 | data = OrderedDict( 108 | (k, data[k]) for k in \ 109 | ["instruction", "raw_instances"] 110 | ) 111 | fout.write(json.dumps(data, ensure_ascii=False) + "\n") 112 | else: 113 | prompts = [] 114 | for task in batch: 115 | # if output instance only, read output_template 116 | # otherwise, read input_output_template 117 | if args.template == "output": 118 | prompt = output_template + " " + task["instruction"].strip() + "\n" 119 | elif args.template == "input_output": 120 | prompt = input_output_template + " " + task["instruction"].strip() + "\n" 121 | prompts.append(prompt) 122 | 123 | results = make_bam_request( 124 | args.engine, 125 | api_key, 126 | prompts, 127 | decoding_method="sample", 128 | max_new_tokens=512, 129 | min_new_tokens=50, 130 | stop_sequences=["\n\n", "|EoS|"] 131 | ) 132 | for i in range(len(batch)): 133 | data = batch[i] 134 | data["instance_metadata"] = results[i] 135 | if results[i]["response"] is not None: 136 | data["raw_instances"] = results[i]["response"] 137 | else: 138 | data["raw_instances"] = "" 139 | data = OrderedDict( 140 | (k, data[k]) for k in \ 141 | ["instruction", "raw_instances"] 142 | ) 143 | fout.write(json.dumps(data, ensure_ascii=False) + "\n") 144 | progress_bar.update(len(batch)) 145 | -------------------------------------------------------------------------------- /ensemble_instruct/gen_instructions.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | import random 4 | import re 5 | import string 6 | import tqdm 7 | import argparse 8 | import numpy as np 9 | import pandas as pd 10 | from multiprocessing import Pool 11 | from functools import partial 12 | from rouge_score import rouge_scorer 13 | from bam_api import make_bam_request 14 | from dotenv import load_dotenv 15 | from genai.model import Credentials, Model 16 | from genai.schemas import GenerateParams 17 | 18 | random.seed(42) 19 | 20 | def encode_prompt(prompt_instructions): 21 | """Encode multiple prompt instructions into a single string.""" 22 | prompt = "Come up with a series of tasks:\n" 23 | for idx, instruction in enumerate(prompt_instructions): 24 | instruction = re.sub(r"\s+", " ", instruction).strip().rstrip(":") 25 | prompt += f"{idx+1}. {instruction} |EoS|\n" 26 | prompt += f"{len(prompt_instructions) + 1}." 27 | return prompt 28 | 29 | def sample_machine_instructions(machine_instructions, similarities, n): 30 | """Sample n machine instructions from a list of machine instructions.""" 31 | return random.sample(machine_instructions, min(n, len(machine_instructions))) 32 | 33 | def find_word_in_string(w, s): 34 | return re.compile(r'\b({0})\b'.format(w), flags=re.IGNORECASE).search(s) 35 | 36 | def post_process_bam_response(response): 37 | if response is None: 38 | return [] 39 | raw_instructions = re.split(r"\n\d+\s?\. ", response) 40 | instructions = [] 41 | for inst in raw_instructions: 42 | inst = re.sub(r"\s+", " ", inst).strip() 43 | if inst == "": 44 | continue 45 | # filter out too short or too long instructions 46 | if len(inst.split()) <= 3 or len(inst.split()) > 150: 47 | continue 48 | # filter based on keywords that are not suitable for language models. 49 | if any(find_word_in_string(word, inst) for word in ["image", "images", "graph", "graphs", "picture", "pictures", "file", "files", "map", "maps", "draw", "plot", "go to"]): 50 | continue 51 | # Note this is not a comprehensive filtering for all programming instructions. 52 | if inst.startswith("Write a program"): 53 | continue 54 | # filter those starting with punctuation 55 | if inst[0] in string.punctuation: 56 | continue 57 | # filter those starting with non-english character 58 | if not inst[0].isascii(): 59 | continue 60 | instructions.append(inst) 61 | return instructions 62 | 63 | def parse_args(): 64 | parser = argparse.ArgumentParser() 65 | parser.add_argument( 66 | "--batch_dir", 67 | type=str, 68 | required=True, 69 | default="data/bloom/", 70 | help="The directory where the batch is stored.", 71 | ) 72 | parser.add_argument( 73 | "--seed_tasks_path", 74 | type=str, 75 | required=True, 76 | default="data/seed_tasks.jsonl", 77 | help="The path to the human written data.", 78 | ) 79 | parser.add_argument( 80 | "--instruction_type", 81 | type=str, 82 | required=True, 83 | help="instance type for instruction: output for output only input_output for input-output", 84 | ) 85 | parser.add_argument( 86 | "--engine", 87 | type=str, 88 | default="tiiuae/falcon-40b", 89 | help="LLM engine to call for data generation" 90 | ) 91 | parser.add_argument( 92 | "--num_prompt_instructions", 93 | type=int, 94 | default=24, 95 | help="number of ICL samples: 24 for input-output instance and 10 for output-only instances" 96 | ) 97 | parser.add_argument( 98 | "--num_instructions_to_generate", 99 | type=int, 100 | default=100, 101 | help="number of instructions to be generated", 102 | ) 103 | parser.add_argument( 104 | "--request_batch_size", 105 | type=int, 106 | default=5, 107 | help="number of requests to be sent at a time." 108 | ) 109 | parser.add_argument( 110 | "--outputfile", 111 | type=str, 112 | default="io_instructions.jsonl" 113 | ) 114 | return parser.parse_args() 115 | 116 | if __name__ == "__main__": 117 | args = parse_args() 118 | seed_tasks = [json.loads(l) for l in open(args.seed_tasks_path, "r")] 119 | seed_instructions = [] 120 | 121 | # if the instruction type == input-output, read instructions with input-output instance 122 | # if the instruction type == output, read instructions with output only instance 123 | for t in seed_tasks: 124 | instance = t["instances"][0] 125 | if args.instruction_type=="input_output": 126 | if instance["input"]!="": 127 | seed_instructions.append(t["instruction"]) 128 | elif args.instruction_type=="output": 129 | if instance["input"]=="": 130 | seed_instructions.append(t["instruction"]) 131 | 132 | print(f"Loaded {len(seed_instructions)} human-written seed instructions") 133 | 134 | # make sure BAM_API_KEY is set as an environment variable 135 | api_key = os.getenv("BAM_API_KEY", None) 136 | 137 | os.makedirs(args.batch_dir, exist_ok=True) 138 | request_idx = 0 139 | 140 | # load previously generated instructions by LLM 141 | machine_instructions = [] 142 | if os.path.exists(os.path.join(args.batch_dir, args.outputfile)): 143 | with open(os.path.join(args.batch_dir, args.outputfile), "r") as fin: 144 | for line in fin: 145 | instruction_info = json.loads(line) 146 | machine_instructions.append(instruction_info["instruction"]) 147 | request_idx = instruction_info["request_idx"] + 1 148 | print(f"Loaded {len(machine_instructions)} input-generated instructions") 149 | 150 | # similarities = {} 151 | scorer = rouge_scorer.RougeScorer(["rougeL"], use_stemmer=False) 152 | 153 | # generate new instructions! 154 | progress_bar = tqdm.tqdm(total=args.num_instructions_to_generate) 155 | if machine_instructions: 156 | progress_bar.update(len(machine_instructions)) 157 | 158 | with open(os.path.join(args.batch_dir, args.outputfile), "a") as fout: 159 | while len(machine_instructions) < args.num_instructions_to_generate: 160 | batch_inputs = [] 161 | # Prepare for the prompts with ICL samples 162 | for _ in range(args.request_batch_size): 163 | # select maximum of 4 instructions (out of 24 or 10) from machine generated ones 164 | prompt_instructions = sample_machine_instructions( 165 | machine_instructions, 166 | similarities=None, 167 | n=4) 168 | # sample human instructions from the pool 169 | prompt_instructions += random.sample(seed_instructions, args.num_prompt_instructions - len(prompt_instructions)) 170 | random.shuffle(prompt_instructions) 171 | prompt = encode_prompt(prompt_instructions) 172 | batch_inputs.append(prompt) 173 | 174 | # send the prompts to the LLM for new instructions 175 | results = make_bam_request( 176 | args.engine, 177 | api_key, 178 | batch_inputs, 179 | decoding_method="sample", 180 | max_new_tokens=256, 181 | min_new_tokens=15, 182 | stop_sequences=["|EoS|"] 183 | ) 184 | 185 | instructions = [] 186 | all_metadata = [] 187 | for result in results: 188 | new_instructions = post_process_bam_response(result["response"]) 189 | instructions += new_instructions 190 | all_metadata += [result] * len(new_instructions) 191 | 192 | # similarity score computation from https://github.com/yizhongw/self-instruct 193 | for inst, metadata in zip(instructions, all_metadata): 194 | with Pool(4) as p: 195 | rouge_scores = p.map(partial(scorer.score, inst), seed_instructions + machine_instructions) 196 | rouge_scores = [score["rougeL"].fmeasure for score in rouge_scores] 197 | if max(rouge_scores) > 0.7: 198 | continue 199 | all_instructions = seed_instructions + machine_instructions 200 | most_similar_instructions = { 201 | all_instructions[i] : rouge_scores[i] for i in np.argsort(rouge_scores)[-10:][::-1] 202 | } 203 | machine_instructions.append(inst) 204 | fout.write(json.dumps({ 205 | "instruction": inst, 206 | "most_similar": most_similar_instructions, 207 | "avg_similarity_score": float(np.mean(rouge_scores)), 208 | "metadata": metadata, 209 | "request_idx": request_idx 210 | }) + "\n") 211 | progress_bar.update(1) 212 | request_idx += 1 213 | -------------------------------------------------------------------------------- /ensemble_instruct/gen_output_zeroshot.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | import random 4 | import tqdm 5 | import re 6 | import argparse 7 | import pandas as pd 8 | from collections import OrderedDict 9 | from bam_api import make_bam_request 10 | from dotenv import load_dotenv 11 | from genai.model import Credentials, Model 12 | from genai.schemas import GenerateParams 13 | 14 | random.seed(42) 15 | 16 | def parse_args(): 17 | parser = argparse.ArgumentParser() 18 | parser.add_argument( 19 | "--batch_dir", 20 | type=str, 21 | required=True, 22 | help="The directory where the batch is stored.", 23 | ) 24 | parser.add_argument( 25 | "--engine", 26 | type=str, 27 | default="google/flan-t5-xxl", 28 | help="The LLM engine for output generation" 29 | ) 30 | parser.add_argument( 31 | "--request_batch_size", 32 | type=int, 33 | default=5, 34 | help="The number of requests to send in a batch." 35 | ) 36 | parser.add_argument( 37 | "--num_instructions", 38 | type=int, 39 | ) 40 | parser.add_argument( 41 | "--input_file", 42 | required=True, 43 | type=str, 44 | help="input_generated_instances.jsonl", 45 | ) 46 | parser.add_argument( 47 | "--output_file", 48 | type=str, 49 | required=True, 50 | help="zeroshot output_generated.jsonl", 51 | ) 52 | return parser.parse_args() 53 | 54 | if __name__ == '__main__': 55 | args = parse_args() 56 | api_key = os.getenv("BAM_API_KEY", None) 57 | 58 | # read input file up to the specified number of instructions 59 | with open(os.path.join(args.batch_dir, args.input_file)) as fin: 60 | lines = fin.readlines() 61 | if args.num_instructions is not None: 62 | lines = lines[:args.num_instructions] 63 | 64 | # read previously generated output file and store the samples in existing_requests 65 | output_path = os.path.join(args.batch_dir, args.output_file) 66 | existing_requests = {} 67 | if os.path.exists(output_path): 68 | with open(output_path) as fin: 69 | for line in tqdm.tqdm(fin): 70 | try: 71 | data = json.loads(line) 72 | existing_requests[data["instruction"]] = data 73 | except: 74 | pass 75 | print(f"Loaded {len(existing_requests)} existing requests") 76 | 77 | progress_bar = tqdm.tqdm(total=len(lines)) 78 | with open(output_path, "w") as fout: 79 | for batch_idx in range(0, len(lines), args.request_batch_size): 80 | batch = [json.loads(line) for line in lines[batch_idx: batch_idx + args.request_batch_size]] 81 | if all(d["instruction"] in existing_requests for d in batch): 82 | for d in batch: 83 | data = existing_requests[d["instruction"]] 84 | data = OrderedDict( 85 | (k, data[k]) for k in \ 86 | ["instruction", "input", "output"] 87 | ) 88 | fout.write(json.dumps(data, ensure_ascii=False) + "\n") 89 | else: 90 | prompts = [d["instruction"].strip() + "\n" + d["input"].strip() for d in batch] 91 | results = make_bam_request( 92 | args.engine, 93 | api_key, 94 | prompts, 95 | decoding_method="greedy", 96 | max_new_tokens=256, 97 | min_new_tokens=1, 98 | stop_sequences=["\n\n","|EoS|"] 99 | ) 100 | 101 | for i in range(len(batch)): 102 | data = batch[i] 103 | if results[i]["response"] is not None: 104 | data["output"] = results[i]["response"] 105 | else: 106 | data["output"] = "" 107 | data = { 108 | "instruction": data["instruction"], 109 | "input": data["input"], 110 | "output": data["output"] 111 | } 112 | data = OrderedDict( 113 | (k, data[k]) for k in \ 114 | ["instruction", "input", "output"] 115 | ) 116 | fout.write(json.dumps(data, ensure_ascii=False) + "\n") 117 | progress_bar.update(len(batch)) 118 | -------------------------------------------------------------------------------- /ensemble_instruct/sample_instances.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import logging 3 | import os 4 | import sys 5 | import json 6 | import re 7 | from collections import defaultdict 8 | 9 | logger = logging.getLogger(__name__) 10 | 11 | # select instruction, input and output only from machine generated instances 12 | def main(): 13 | parser = argparse.ArgumentParser() 14 | parser.add_argument("inputfile") 15 | parser.add_argument("outputfile") 16 | 17 | args = parser.parse_args() 18 | genout = open(args.outputfile, "w", encoding="utf-8") 19 | 20 | inputcount = 0 21 | instruction_list = [] 22 | with open(args.inputfile, encoding="utf-8") as reader: 23 | for raw_example in reader: 24 | instance = json.loads(raw_example) 25 | instruction = instance["instruction"].strip() 26 | raw_instance = instance["raw_instances"].strip() 27 | raw_instance = raw_instance.replace("\n\n", "^") 28 | instances = raw_instance.split('^') 29 | for idx, instance in enumerate(instances): 30 | samples = instance.splitlines() 31 | # handle input-output instances 32 | if 'input:' in samples[0]: 33 | if idx==0 and len(samples) > 1: 34 | input = samples[0].strip() 35 | output = samples[1].strip() 36 | if 'input:' in input and 'output:' in output: 37 | input = input.replace("input:","").strip() 38 | input = input.replace("|EoS|","").strip() 39 | output = output.replace("output:","").strip() 40 | output = output.replace("|EoS|","").strip() 41 | instruction = instruction.replace("|EoS|","").strip() 42 | if len(output.split()) > 0 and output!="": 43 | genout.write(json.dumps({ 44 | "instruction": instruction, 45 | "input": input, 46 | "output": output 47 | }) + "\n") 48 | inputcount += 1 49 | elif idx > 0 and len(samples) > 2: 50 | instruction = samples[0].strip() 51 | input = samples[1].strip() 52 | output = samples[2].strip() 53 | if 'instruction:' in instruction and 'input:' in input and \ 54 | 'output:' in output and len(instruction.split()) > 5: 55 | instruction = instruction.replace("instruction:","").strip() 56 | instruction = instruction.replace("|EoS|","").strip() 57 | input = input.replace("input:","").strip() 58 | input = input.replace("|EoS|","").strip() 59 | output = output.replace("output:","").strip() 60 | output = output.replace("|EoS|","").strip() 61 | if len(output.split()) > 0 and output!="": 62 | genout.write(json.dumps({ 63 | "instruction": instruction, 64 | "input": input, 65 | "output": output 66 | }) + "\n") 67 | inputcount += 1 68 | # handle output only instances 69 | elif 'output:' in samples[0] and 'input:' not in samples[0]: 70 | if idx==0 and len(samples) > 0: 71 | output = samples[0].strip() 72 | if 'output:' in output: 73 | output = output.replace("output:","").strip() 74 | output = output.replace("|EoS|","").strip() 75 | instruction = instruction.replace("|EoS|","").strip() 76 | if len(output.split()) > 0 and output!="": 77 | genout.write(json.dumps({ 78 | "instruction": instruction, 79 | "input": "", 80 | "output": output 81 | }) + "\n") 82 | inputcount += 1 83 | elif idx > 0 and len(samples) > 1: 84 | instruction = samples[0].strip() 85 | output = samples[1].strip() 86 | if 'instruction:' in instruction and 'output:' in output and \ 87 | len(instruction.split()) > 5: 88 | instruction = instruction.replace("instruction:","").strip() 89 | instruction = instruction.replace("|EoS|","").strip() 90 | output = output.replace("output:","").strip() 91 | output = output.replace("|EoS|","").strip() 92 | if len(output.split()) > 0 and output != "": 93 | genout.write(json.dumps({ 94 | "instruction": instruction, 95 | "input": "", 96 | "output": output 97 | }) + "\n") 98 | inputcount += 1 99 | 100 | print("good_instruction:", inputcount) 101 | 102 | if __name__ == "__main__": 103 | main() 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /ensemble_instruct/templates/instance_template.py: -------------------------------------------------------------------------------- 1 | output_template = '''Generate examples for the instructions. The instruction does not require input and generate the output only. 2 | 3 | instruction: Which exercises are best for reducing belly fat at home? 4 | output: Lying Leg Raises, Leg In And Out, Plank, Side Plank, Sit-ups 5 | |EoS| 6 | 7 | instruction: Converting 85 F to Celsius. 8 | output: 85°F = 29.44°C 9 | |EoS| 10 | 11 | instruction: Write a program to compute the sum of integers from k to n. 12 | output: 13 | def sum(k, n): 14 | sum = 0 15 | for i in range(k, n+1): 16 | sum += i 17 | return sum 18 | |EoS| 19 | 20 | instruction: Turn down a job offer by sending an email to a recruiter explaining the reason. 21 | output: Hi [Recruiter], 22 | Thank you so much for the generous offer to join your team. As we discussed, I’ve admired the company for a number of years, and am a proud endorser of its products. However, after further consideration of where I currently am in my career, I’ve decided to accept an offer at another company. I would love to stay in touch with you and have already started following you on [Social Media Platfor]. Again, thank you so much for your time and consideration. 23 | Thanks again, 24 | [Your Name] 25 | |EoS| 26 | 27 | instruction: Is there anything I can eat for a breakfast that doesn't include eggs, yet includes protein, and has roughly 700-1000 calories? 28 | output: Yes, you can have 1 oatmeal banana protein shake and 4 strips of bacon. The oatmeal banana protein shake may contain 1/2 cup oatmeal, 60 grams whey protein powder, 1/2 medium banana, 1tbsp flaxseed oil and 1/2 cup watter, totalling about 550 calories. The 4 strips of bacon contains about 200 calories. 29 | |EoS| 30 | 31 | instruction: Suggest some games that can be played by a group of people. 32 | output: 1. Werewolf 2. Who Am I? 3. Charades 4. Balderdash 5. Pictionary 6. Two Truths and a Lie 7. Uno 8. Story Starters 9. Truth or Dare 10. Kubb 33 | |EoS| 34 | 35 | instruction: Write an example of unethical behavior at the workplace and explain why it is unethical. 36 | output: An example of unethical behavior is the failure to honor commitments. For example, your boss promises you an extra day off if you rush out an important project by a certain date. You work late hours and finish the project before the deadline. Ready for your day off, you mention it to your boss who responds "No, we have too much work to do." Your boss engaged in unethical behavior that has virtually guaranteed your future distrust and unwillingness to extend yourself to assist in department emergencies. In addition, you are likely to complain to your co-workers, causing them to distrust the promises of the boss and be unwilling to cooperate with his requests. 37 | |EoS| 38 | 39 | instruction: Is working part-time a good idea for teenagers between 15 and 19 years old?" 40 | output: There are both pros and cons to having a part-time job as a teenager. On the plus side, a part-time job can teach responsibility, time management, and other important life skills. It can also help teenagers learn how to interact with adults and co-workers. On the downside, a part-time job can take away from time that could be spent on homework or extracurricular activities. It can also be difficult to find a job that works around a school schedule. 41 | |EoS| 42 | 43 | instruction: How would you explain colors to a person born blind? 44 | output: "I can see colors like you can hear different sounds with millions of different pitches and volumes, feel different degrees of warmth on your skin, and smell different smells. Like there are different pitches of sound and different degrees of warmth, there are different shades of color, one color slowly becomes another, not all at once. Musician, Duke Ellington, claimed that certain piano notes would elicit a different color. For example, a D note would be a dark blue color. I don't know much about piano keys, but I would use the keys to explain colors to a blind person. A high key elicits a bright color, a low key elicits a dark color. Mia lost her vision when she was young. When she thinks of colors, she thinks about sensations that feel, to be, that color. So we can explain colors as Pink. It is the delicate softness of flower petals, the unrestrained laughter of a child. White It is the sound of the wind blowing steadily through pine trees. It is the feeling of fine sand, sifting through fingers. Gray It is the feeling of the world after it has rained. Yellow It is the faint heat from the sun on a cool day. 45 | |EoS| 46 | 47 | instruction: "Write a funny interview question. Why did you choose this question? 48 | output: Someone gives you an elephant. You can't sell it or give it away. What do you do with the elephant? The reason I chose this question is that a potential employer might ask you this question to determine how you prioritize, think, and solve problems. 49 | |EoS| 50 | 51 | instruction: My flight is canceled - can I sue them for a refund? Give me a detailed answer according to the law. 52 | output: Unfortunately, the answer is probably not. In the United States, airlines are not required by law to financially compensate you for a canceled flight, and even theories like breach of contract fall flat given the 'small print' provisions of most airlines' ticketing policies. But, most airlines have policies in place to get you to your destination as quickly as possible and keep you comfortable while you wait. 53 | |EoS| 54 | 55 | instruction: In your opinion, what are the qualities of an effective sports coach? 56 | output: The coaches that have inspired me in the past are the ones who pointed out both strengths and our weaknesses, rather than just the pitfalls. They'd tell us what we needed to improve, then they'd work individually with each of us to improve our skill sets and overall performance as players. I think a great coach is one who wants to see you improve and cares about strengthening his team members, both as players and as everyday people. 57 | |EoS| 58 | 59 | instruction: How can individuals and organizations reduce unconscious bias? 60 | output: A good place to start is by slowing down decisions are more likely to be affected by unconscious biases when they are made quickly or under stress. Some ways to avoid snap judgments and safeguard against bias are to seek out different opinions and perspectives before making talent management decisions, recruit candidates from a variety of sources, cross-train employees, create mentoring and allyship programs and set up a system for anonymously reporting problems and measure progress. 61 | |EoS| 62 | 63 | instruction: Try coming up with a creative way to stay motivated during a workout. 64 | output: Here are some tips to help you stay motivated: You can start with setting simple goals and then progress to longer-range goals. Remember to make your goals realistic and achievable. Write down your goals. Seeing the benefits of regular exercise and writing your goals down on paper may help you stay motivated. You may also find that it helps to keep an exercise diary. Record what you did during each exercise session, how long you exercised, and how you felt afterward. - Find sports or activities that you enjoy, then vary the routine to keep it interesting. Remember, exercise doesn't have to be boring, and you're more likely to stick with a fitness program if you're having fun. - Make physical activity part of your daily routine. If it's hard to find time for exercise, don't fall back on excuses. Schedule workouts as you would any other important activity. - Some people find it helpful to work out with a friend. Invite friends or co-workers to join you when you exercise or go on walks. Work out with your partner or other loved ones. - After each exercise session, take a few minutes to savor the good feelings that exercise gives you. This type of internal reward can help you make a long-term commitment to regular exercise. External rewards can help too. When you reach a longer-range goal, treat yourself to a new pair of walking shoes or new tunes to enjoy while you exercise.\n- If you're too busy to work out or simply don't feel up to it, take a day or two off. Go easy on yourself if you need a break. The important thing is to get back on track as soon as you can. There are a variety of ways to stay motivated during a workout. Find what works best for you and stick with it. 65 | |EoS| 66 | 67 | instruction: Give me an example of a time when you had to use your sense of humor. 68 | output: When my girlfriend is angry, I need to make some funny jokes to make her happy. 69 | |EoS| 70 | 71 | instruction:''' 72 | 73 | input_output_template = '''Generate examples for the following instructions. The instruction requires input and output instances. And you have to generate both input and output. 74 | 75 | instruction: Extract all the country names in the paragraph, list them separated by commas. 76 | input: Dr. No is the sixth novel by the English author Ian Fleming to feature his British Secret Service agent James Bond. Written at Fleming's Goldeneye estate in Jamaica, it was first published in the United Kingdom by Jonathan Cape in 1958. In the novel Bond looks into the disappearance in Jamaica of two fellow MI6 operatives who had been investigating Doctor No. Bond travels to No's Caribbean island and meets Honeychile Rider, who is there to collect shells. They are captured and taken to a luxurious facility carved into a mountain. The character of Doctor No, the son of a German missionary and a Chinese woman, was influenced by Sax Rohmer's Fu Manchu stories. Dr. No was the first of Fleming's novels to face widespread negative reviews in Britain, but it was received more favourably in the United States. 77 | output: English, British, Jamaica, the United Kingdom, German, Chinese, Britain, the United States. 78 | |EoS| 79 | 80 | instruction: Sort the given input ascendingly. 81 | input: [10, 92, 2, 5, -4, 92, 5, 101] 82 | output: [-4, 2, 5, 5, 10, 92, 92, 101] 83 | |EoS| 84 | 85 | instruction: Sort the given input ascendingly. 86 | input: [9.99, 10, -5, -1000, 5e6, 999] 87 | output: [-1000, -5, 9.99, 10, 999, 5e6] 88 | |EoS| 89 | 90 | instruction: Suggest a better and more professional rephrasing of the following input. 91 | input: This house is surprisingly not constructed very well, and you probably need more money to fix it after you buy it. If you ask me, I would suggest you to consider other candidates. 92 | output: This house does not seem to be constructed well, so you may need to spend more money to fix it after you purchase it. I would suggest that you look at other properties. 93 | |EoS| 94 | 95 | instruction: Suggest a better and more professional rephrasing of the following input. 96 | input: Just so you know, we did an experiment last week and found really surprising results - language model can improve itself! 97 | output: Our experiments last week demonstrated surprising results, proving that the language model can improve itself. 98 | |EoS| 99 | 100 | instruction: Read the following input paragraph and answer a math question about the paragraph. You need to write out the calculation for getting the final answer. 101 | input: Gun violence in the United States results in tens of thousands of deaths and injuries annually, and was the leading cause of death for children 19 and younger in 2020. In 2018, the most recent year for which data are available as of 2021, the Centers for Disease Control and Prevention's (CDC) National Center for Health Statistics reports 38,390 deaths by firearm, of which 24,432 were by suicide. The rate of firearm deaths per 100,000 people rose from 10.3 per 100,000 in 1999 to 12 per 100,000 in 2017, with 109 people dying per day or about 14,542 homicides in total, being 11.9 per 100,000 in 2018. In 2010, there were 19,392 firearm-related suicides, and 11,078 firearm-related homicides in the U.S. In 2010, 358 murders were reported involving a rifle while 6,009 were reported involving a handgun; another 1,939 were reported with an unspecified type of firearm. In 2011, a total of 478,400 fatal and nonfatal violent crimes were committed with a firearm. Question: How many more firearm-related deaths were there in 2018 compared to 2010? 102 | output: 38390 - (19392 + 11078) = 38390 - 30470 = 7920. So, in 2018, there were 7920 more deaths by firearm than in 2010. 103 | |EoS| 104 | 105 | instruction: Solve the equation and find the value of X. Show your steps. 106 | input: Equation: 10X + 5 = 10 107 | output: 10X = 5, X = 0.5 108 | |EoS| 109 | 110 | instruction: Solve the equation and find the value of X. Show your steps. 111 | Equation: X + Y + 120 = 100 112 | output: X + Y = -20, X = -20 - Y 113 | |EoS| 114 | 115 | instruction: Select the oldest person from the given list. 116 | input: George Washington, Confucius, Michael Jordan, Michelangelo 117 | output: Confucious 118 | |EoS| 119 | 120 | instruction: Select the oldest person from the given list. 121 | input: Alan Turing, Geoffrey Hinton, Yann LeCun, Yoshua Bengio 122 | output: Alan Turing 123 | |EoS| 124 | 125 | instruction: In this task, you need to compare the meaning of the two sentences and tell if they are the same. Output yes or no. 126 | input: Sentence 1: The teacher is speaking to the class. Sentence 2: The teacher is speaking to the students. 127 | output: yes 128 | |EoS| 129 | 130 | instruction: Choose a topic for the following article. Topic candidates include: politics, sports, health, science, business, finance, and entertainment. 131 | input: Whales are a widely distributed and diverse group of fully aquatic placental marine mammals. They are an informal grouping within the infraorder Cetacea, which usually excludes dolphins and porpoises. Whales, dolphins and porpoises belong to the order Cetartiodactyla, which consists of even-toed ungulates. Their closest non-cetacean living relatives are the hippopotamuses, from which they and other cetaceans diverged about 54 million years ago. The two parvorders of whales, baleen whales (Mysticeti) and toothed whales (Odontoceti), are thought to have had their last common ancestor around 34 million years ago. Whales consist of eight extant families: Balaenopteridae (the rorquals), Balaenidae (right whales), Cetotheriidae (the pygmy right whale), Eschrichtiidae (the grey whale), Monodontidae (belugas and narwhals), Physeteridae (the sperm whale), Kogiidae (the dwarf and pygmy sperm whale), and Ziphiidae (the beaked whales). 132 | output: science 133 | |EoS| 134 | 135 | instruction: Classify the sentiment of the sentence into positive, negative or mixed. 136 | input: I enjoy the flavor of the restaurant but their service is too slow. 137 | output: mixed 138 | |EoS| 139 | 140 | instruction: Answer the following multiple choice question. Select A, B, C, or D for the final answer. 141 | input: Which company has its hq in Singapore? 142 | (A) Alibaba 143 | (B) TSMC 144 | (C) Salesforce 145 | (D) Shopee 146 | output: D 147 | |EoS| 148 | 149 | instruction: Classify whether the following email is a spam or not. Output true or false. 150 | input: Hello, We assessed the 2015 payment structure as provided for under the term of employment and discovered that you are due for a salary raise starting August 2015. You salary raise documents are enclosed below: Access the documet here 151 | Faithfully, 152 | Human Resources 153 | output: true 154 | |EoS| 155 | 156 | instruction: Does the information in the document supports the claim? You can answer Support or Unsupport. 157 | input: Document: After a record-breaking run that saw mortgage rates plunge to all-time lows and home prices soar to new highs, the U.S. housing market finally is slowing. While demand and price gains are cooling, any correction is likely to be a modest one, housing economists and analysts say. No one expects price drops on the scale of the declines experienced during the Great Recession. Claim: The US housing market is going to crash soon. 158 | output: Unsupport 159 | |EoS| 160 | 161 | instruction: Predict whether the news has positive impact or negative impact on the company stock price. Output positive, negative or neutral. 162 | input: Tesla driver involved in a fatal crash in southern China earlier in November said the vehicle's brakes failed to respond for more than a mile, but the American automaker suggested he didn't use them at all. Chinese police said Sunday they were conducting further probes into the incident, which killed two people and injured three others in the county of Raoping, to the east of Chaozhou in Guangdong province, on November 5. Company: Tesla. 163 | output: negative 164 | |EoS| 165 | 166 | instruction": What is the relation between the given pairs? 167 | input: Night : Day :: Right : Left 168 | output: The relation between the given pairs is that they are opposites. 169 | |EoS| 170 | 171 | instruction: Given a sentence and a number, return the word that correspond to the location of the given number in the sentence, where each word is a white-space separated and the location index starts from 1. 172 | input: This is a random sentence. 4 173 | output: random 174 | |EoS| 175 | 176 | instruction:''' 177 | 178 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | ################################ 2 | ###### Core dependencies ####### 3 | ################################ 4 | torch>=1.0.0 5 | rouge-score 6 | tqdm>=4.31.1 7 | transformers>=3.0.0 8 | matplotlib 9 | pandas>=1.0.1 10 | numpy 11 | packaging>=20.9 12 | openai==0.24.0 13 | benepar 14 | spacy 15 | plotly 16 | python-dotenv 17 | ibm-generative-ai 18 | bert-score==0.3.13 19 | -------------------------------------------------------------------------------- /sample/openei.ensemble: -------------------------------------------------------------------------------- 1 | {"instruction": "Tell me if the article contains offensive language. If it does, give me the offensive language.", "input": "I am a f*cking idiot.", "output": "f*cking"} 2 | {"instruction": "Given a list of words, return all the possible words that can be constructed from the list. For example, given [\u201ca\u201d, \u201cb\u201d], the return value should be [\u201ca\u201d, \u201cab\u201d, \u201cb\u201d, \u201cba\u201d, \u201cbb\u201d] (in any order).", "input": "[\"a\", \"b\", \"c\"]", "output": "[\"a\", \"ab\", \"b\", \"ba\", \"bb\", \"bc\", \"c\"]"} 3 | {"instruction": "Given the context, predict the next word.", "input": "A dog . A cat .", "output": "A mouse"} 4 | {"instruction": "Tell me if this sentence is grammatically correct.", "input": "I am a girl.", "output": "yes"} 5 | {"instruction": "Given the input, predict how much time it will take to get from the current location to the destination.", "input": "I live in London, UK and I am planning a trip to New York, USA. How long will it take to reach there?", "output": "8.5 hours"} 6 | {"instruction": "Rank the following hotels.", "input": "(1) Four Seasons (2) Park Hyatt (3) Waldorf Astoria (4) The Peninsula (5) Mandarin Oriental (6) Ritz-Carlton (7) St. Regis (8) Intercontinental (9) Holiday Inn (10) Hilton Garden Inn (11) Motel 6 (12) The Ritz", "output": "1. Park Hyatt, 2. Waldorf Astoria, 3. Four Seasons, 4. Mandarin Oriental, 5. The Peninsula, 6. The Ritz-Carlton, 7. St. Regis, 8. Intercontinental, 9. Holiday Inn, 10. Hilton Garden Inn, 11. Motel 6, 12. The Ritz"} 7 | {"instruction": "The following text is part of a research paper. Based on the contents, identify the research paper's major conclusion.", "input": "\"In this paper, we present a novel method for the detection of malicious code. We first define a taxonomy of malware, and then introduce a system to automatically detect malware. We then propose a novel technique to automatically generate a signature that can detect malware. We evaluate our system on a number of samples of malware and show that our technique can reliably detect malware. Our system is able to achieve a 94.4% detection rate on our samples. To the best of our knowledge, this is the first system to automatically detect malicious code.\"", "output": "This is the first system to automatically detect malicious code"} 8 | {"instruction": "Given a list of restaurants and their ratings, sort the restaurants by their ratings.", "input": "[['Mangia'], ['Barbie'], ['Taco Bell'], ['Subway'], ['The Cheesecake Factory']]", "output": "['Taco Bell', 'Mangia', 'Subway', 'Barbie', 'The Cheesecake Factory']"} 9 | {"instruction": "Write the summary of the given article.", "input": "\"I think we're going to be OK\" says the co-founder of the popular travel site. \"This is the first time where things are going to be bad for a while.\"", "output": "The founder of Airbnb, Brian Chesky, says the company is \"going to be OK\" after the company's stock price dropped by more than 50%. The company's stock price dropped by more than 50% after the company's stock price dropped by more than 50%. The company's stock price dropped by more than 50% after the company's stock price dropped by more than 50%. \"I think we're going to be OK,\" said Brian Chesky, co-founder of the popular travel site. \"This is the first time where things are going to be bad for a while.\" Airbnb's stock price dropped by more than 50% after the company's stock price dropped by more than 50%. The company's stock price dropped by more than 50% after the company's stock price dropped by more than 50%. \"I think we're going to be OK,\" said Brian Chesky, co-founder of the popular travel site. \"This is the first time where things are going to be bad for a while.\" Airbnb's stock price dropped by more than 50% after the company's stock price dropped by more than 50%. The company's stock price dropped by more than 50% after the company's stock price dropped by"} 10 | {"instruction": "Given a list of numbers, find the biggest number.", "input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", "output": "10"} 11 | {"instruction": "Given a question-answer pair, generate a new question-answer pair based on the old question-answer pair.", "input": "Question: \"What is the capital of the US?\" Answer: \"Washington\"", "output": "What is the capital of the US?"} 12 | {"instruction": "Write an email to request a meeting with the professor based on the given information.", "input": "Dear Professor, I am a PhD candidate in your lab. I would like to discuss my PhD proposal with you. Can we have a meeting on Monday?", "output": "I am available on Monday, May 1st."} 13 | {"instruction": "Summarize the following paragraph, and provide the summary as the output.", "input": "\u201cSailing has always been an important part of my life,\u201d said Mark Reynolds, a British sailor who is a multiple times world champion. \u201cI got into sailing by mistake, because my dad was trying to learn how to sail and we went out in an old wooden boat and he didn\u2019t know how to sail. I would say that my love for sailing really stemmed from that experience.\u201d Reynolds competed in the 1996 Olympic Games in Atlanta and is a 5-time world champion in the \u201cStar\u201d class of boat. Mark Reynolds is now the president of the British Sailing Team.", "output": "Meet the British sailor Mark Reynolds, who is a multiple times world champion."} 14 | {"instruction": "Complete the lyrics of the given song.", "input": "I am the Walrus (Walrus, I am the walrus)", "output": "I am the Eggman (Eggman, I am the Eggman)"} 15 | {"instruction": "Given a sentence, find the subject and verb.", "input": "This is a random sentence.", "output": "The subject is \"This\". The verb is \"is\"."} 16 | {"instruction": "Given a sentence, tell me if it is a question. If it is, answer it.", "input": "Is this a question?", "output": "Yes, it is."} 17 | {"instruction": "Given a list of items (of a certain type), determine if a given item is in the list. The list is not sorted.", "input": "The list: apple, banana, orange. The item: orange", "output": "The item is in the list."} 18 | {"instruction": "Given a product name, return the list of related product names.", "input": "Tesla", "output": "Model S, Tesla Roadster, Tesla Model X"} 19 | {"instruction": "Write a recipe for the following dish.", "input": "This is a recipe for a chicken noodle soup..", "output": "In a large pot, saute the onion in the butter until tender. Add the chicken stock, chicken, carrots, celery, parsley, thyme, salt and pepper. Bring to a boil. Reduce the heat to low and simmer for 30 minutes. Add the noodles and cook for an additional 10 minutes."} 20 | {"instruction": "Identify the main idea in the article.", "input": "In the U.S., more than 2 million people have been infected with the coronavirus and over 111,000 have died. The latest:", "output": "The latest on the coronavirus outbreak in the U.S."} 21 | {"instruction": "Write a short essay on the given topic.", "input": "Do you think AI is a threat to humanity?", "output": "Artificial intelligence (AI) is a branch of computer science that focuses on the creation of intelligent machines that can perform tasks that require human intelligence, such as visual perception, speech recognition, and decision-making. AI has been a topic of debate in the media and in popular culture for decades. In the 1950s, the term was used to describe a computer that could play chess against humans. In the 1980s, the term was used to describe a computer that could beat humans at a game of checkers. In the 1990s, the term was used to describe a computer that could beat humans at a game of Go. In the 2000s, the term was used to describe a computer that could beat humans at a game of Atari Breakout. In the 2010s, the term is used to describe a computer that can beat humans at a game of Go, chess, and Atari Breakout. In the 2020s, the term is used to describe a computer that can beat humans at a game of Go, chess, and Atari Breakout. In the 2030s, the term is used to describe a computer that can beat humans at a game of"} 22 | {"instruction": "Make a list of possible names for the entity, based on the description.", "input": "The name of the place is unknown.", "output": "[unknown, unknown place]"} 23 | {"instruction": "Given a list of tasks, tell me which task should be done first.", "input": "Write a story. Write a poem. Write a book. Write a paper.", "output": "Write a story."} 24 | {"instruction": "Summarize the article.", "input": "The U.S. economy will grow at a faster pace next year than previously expected, as the country's central bank is set to raise interest rates at a faster pace over the next two years, according to new projections released Wednesday. The Federal Reserve's updated projections show that the economy will expand at a 3.4% pace in 2019, up from its previous forecast of 3.1%. The central bank also said it expects the unemployment rate to fall to 3.5% by the end of next year, down from 4.1% now. The central bank's 17 policymakers also raised their economic growth expectations for 2020 to 3.2% from 3.1% previously.", "output": "The US economy will grow at a faster pace next year than previously expected, as the country\u2019s central bank is set to raise interest rates at a faster pace over the next two years, according to new projections released on Wednesday. The Federal Reserve\u2019s updated projections show that the economy will expand at a 3.4% pace in 2019, up from its previous forecast of 3.1%."} 25 | {"instruction": "Correct and polish the sentence grammatically.", "input": "\"My, this is a large and pleasant room.\"", "output": "\"This is a large and pleasant room.\""} 26 | {"instruction": "Given the following paragraph, tell me the first sentence that mentions the following terms.", "input": "The number of companies that have hit the $1 trillion valuation mark is increasing, and so too is the number of countries that have a trillion-dollar company.", "output": "The number of companies that have hit the $1 trillion valuation mark is increasing, and so too is the number of countries that have a trillion-dollar company."} 27 | {"instruction": "Translate the sentence into another language.", "input": "This is a random sentence. 4", "output": "T\u00e0i l\u1ed9c m\u1ed9t c\u00e2u l\u1ea1c l\u1ed9."} 28 | {"instruction": "Tell me if the following statement is true.", "input": "2 + 2 = 4", "output": "True"} 29 | {"instruction": "Given the input, summarize the main points.", "input": "\"The New York City Department of Education (NYCDOE) is the largest system of schools in the United States, serving 1.1 million students in more than 1,800 schools.\"", "output": "The New York City Department of Education (NYCDOE) is the largest system of schools in the United States, serving 1.1 million students in more than 1,800 schools."} 30 | {"instruction": "Identify if the following is a logical argument. If so, identify the conclusion.", "input": "All mammals are animals. All animals are alive. Therefore, all mammals are alive.", "output": "True"} 31 | {"instruction": "Given a sentence, pick a random word in it, and replace it with a synonym.", "input": "This is a random sentence.", "output": "This is a random sentence."} 32 | {"instruction": "Given a sentence, add a comment to explain the meaning of the sentence.", "input": "The patient is in a coma.", "output": "The patient is in a state of unconsciousness that can be woken up with the right treatment."} 33 | {"instruction": "Analyze the content of the article and determine the author's point of view.", "input": "In \"The Great Gatsby,\" what is the theme of the book and who is the narrator?", "output": "The overall theme of the book is a warning about the consequences of materialism and carelessness. Nick is the narrator of the book."} 34 | {"instruction": "Write an essay on this topic.", "input": "An article about a company.", "output": "The company has been a member of the FTSE 250 Index since June 2012."} 35 | {"instruction": "Explain the following phenomenon. You can add any facts or examples that are relevant.", "input": "If a new technology is released, its price is always expensive at the beginning.", "output": "The price of a new technology is always high at the beginning."} 36 | {"instruction": "What would be a good headline for this article?", "input": "The U.S. economy lost 140,000 jobs in December, as the labor market continued to reel from the coronavirus pandemic. The unemployment rate fell to 6.7%, but that was due to the labor force shrinking by 199,000.", "output": "The U.S. Economy Loses 140,000 Jobs In December Amid Pandemic."} 37 | {"instruction": "Write a summary of the article. You can add your opinion.", "input": "The 2020 United States presidential election was the 59th quadrennial United States presidential election. It was held on Tuesday, November 3, 2020. Donald Trump, the incumbent president and the Republican nominee, was running for reelection to a second term. Democrat Joe Biden, the former vice president, was the Democratic nominee. The Democratic Party also nominated vice presidential candidate Kamala Harris, the U.S. senator from California, to be vice president. Trump and Biden were the oldest candidates ever to compete in a U.S. presidential election, at age 74 and 77, respectively. Biden became president-elect after defeating Trump in the electoral college.", "output": "The 2020 United States presidential election was the 59th quadrennial United States presidential election. It was held on Tuesday, November 3, 2020. Donald Trump, the incumbent president and the Republican nominee, was running for reelection to a second term. Democrat Joe Biden, the former vice president, was the Democratic nominee. The Democratic Party also nominated vice presidential candidate Kamala Harris, the U.S. senator from California, to be vice president. Trump and Biden were the oldest candidates ever to compete in a U.S. presidential election, at age 74 and 77, respectively. Biden became president-elect after defeating Trump in the electoral college."} 38 | {"instruction": "The following query contains some errors. Explain what these errors are and fix them.", "input": "SELECT * FROM \"table\" WHERE \"column\" LIKE '%t%' AND \"column\" LIKE '%2'", "output": "The string \"%t%\" is missing a closing quote. Also, the correct LIKE statement is \"column\" LIKE '%t%'."} 39 | {"instruction": "Generate a summary on the following passage.", "input": "The American Museum of Natural History in New York has a new permanent exhibition: \"The Power of Poison.\"", "output": "The American Museum of Natural History in New York has a new permanent exhibition: \"The Power of Poison.\""} 40 | {"instruction": "Write a report on the following incident.", "input": "According to the report, a 35-year-old man was arrested after he was accused of punching a 7-year-old boy in the face. The man was at the park with his 3-year-old daughter when she was playing on the slide. The man then pulled her off the slide when the boy said to him he should let her play. The incident was caught on camera and was uploaded to Twitter. The video shows the man punching the boy in the face. The boy was left with a black eye and a swollen cheek. The 35-year-old man was seen running away from the park after hitting the child. He was later arrested and charged with hit and run. The boy's mother stated that she had to take her son to the hospital for a CT scan and X-ray. The mother also stated \"I'm glad he is alive.\"", "output": "A 35-year-old man was arrested after he was accused of punching a 7-year-old boy in the face. The man was at the park with his 3-year-old daughter when she was playing on the slide. The man then pulled her off the slide when the boy said to him he should let her play. The incident was caught on camera and was uploaded to Twitter. The video shows the man punching the boy in the face. The boy was left with a black eye and a swollen cheek. The 35-year-old man was seen running away from the park after hitting the child. He was later arrested and charged with hit and run. The boy's mother stated that she had to take her son to the hospital for a CT scan and X-ray. The mother also stated \"I'm glad he is alive.\""} 41 | {"instruction": "Given a paragraph, identify the main points and the supporting points.", "input": "The United States is a federal republic with a presidential system of government. The head of state and head of government is the President. The executive power is vested in the President, who acts as the head of the executive branch that includes the Cabinet. The legislative branch consists of the bicameral Congress, which consists of the House of Representatives and the Senate. The judicial branch consists of the Supreme Court and lower federal courts.", "output": "The United States is a federal republic with a presidential system of government. The executive power is vested in the President, who acts as the head of the executive branch that includes the Cabinet. The legislative branch consists of the bicameral Congress, which consists of the House of Representatives and the Senate. The judicial branch consists of the Supreme Court and lower federal courts."} 42 | {"instruction": "Write a short introduction to the following product.", "input": "[{'name': 'iPhone', 'price': '1999.00', 'description': 'This is a mobile phone.'},{'name': 'Samsung', 'price': '1999.00', 'description': 'This is a mobile phone.'},{'name': 'Nokia', 'price': '1999.00', 'description': 'This is a mobile phone.'}]", "output": "The iPhone is a mobile phone. The Samsung is a mobile phone. The Nokia is a mobile phone."} 43 | {"instruction": "Given the input, output the output.", "input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", "output": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"} 44 | {"instruction": "Write a dialogue between the user and the salesperson.", "input": "Hello, I would like to buy a gift for my friend.", "output": "Hello, I can help you with that. What would you like to buy?"} 45 | {"instruction": "Given a sentence, rewrite it without using the given word.", "input": "This is a random sentence.", "output": "This is a random sentence."} 46 | {"instruction": "Provide a one-sentence summary for each paragraph.", "input": "In this article, we consider the role of the Internet in shaping and maintaining the public sphere. We argue that the Internet, by its very nature, is not structured in a way that supports the public sphere and, in fact, undermines it in a number of ways. The Internet is a medium of individualism. This is because it is based on individual choice, rather than on a shared common ground, such as a newspaper.", "output": "In this article, we consider the role of the Internet in shaping and maintaining the public sphere. We argue that the Internet, by its very nature, is not structured in a way that supports the public sphere and, in fact, undermines it in a number of ways. The Internet is a medium of individualism. This is because it is based on individual choice, rather than on a shared common ground, such as a newspaper."} 47 | {"instruction": "Given a string, output the longest palindrome that can be formed from that string.", "input": "abcba", "output": "aabbcc"} 48 | {"instruction": "Generate a new sentence that includes the four given words.", "input": "This is a test. Apple, Banana, Orange, Mango", "output": "This is a test. Apple, Banana, Orange, Mango"} 49 | {"instruction": "Given a news article, tell me if it is credible or not.", "input": "The United States military said it has started the process of withdrawing from Afghanistan after a 20-year war that cost the lives of 2,461 American service members and hundreds of thousands of Afghans.", "output": "The article is credible."} 50 | {"instruction": "What are the best exercises you can do with a kettlebell?", "input": "", "output": "Goblet squat: The goblet squat is a great exercise for beginners to learn proper squat technique. The goblet squat is a great exercise for beginners to learn proper squat technique. It\u2019s also a good exercise for experienced lifters."} 51 | {"instruction": "Write a blog post about your favorite YouTube channel.", "input": "", "output": "I'm a huge fan of the channel, and I've been watching it for years. I've seen it grow from a small channel to a huge one, and I've seen it go from a channel that was a joke to a channel that is a huge part of my life. I've seen it grow from a channel that was a joke to a channel that is a huge part of my life. I've seen it grow from a channel that was a joke to a channel that is a huge part of my life. I've seen it grow from a channel that was a joke to a channel that is a huge part of my life. I've seen it grow from a channel that was a joke to a channel that is a huge part of my life. I've seen it grow from a channel that was a joke to a channel that is a huge part of my life. I've seen it grow from a channel that was a joke to a channel that is a huge part of my life. I've seen it grow from a channel that was a"} 52 | {"instruction": "Write a short story that begins with the following, \"The wind was blowing and the rain falling, but still I managed to light a fire...\"", "input": "", "output": "I was camping in the woods. The wind was blowing and the rain falling, but still I managed to light a fire. I sat down and waited for the fire to catch. It did not. I sat down and waited for the fire to catch. It did not."} 53 | {"instruction": "Write a short story about a woman who is married to a man who has a big penis.", "input": "", "output": "The woman was married to a man who had a big penis. She was embarrassed to show it to her friends. One day she decided to show it to her friends. They were all shocked."} 54 | {"instruction": "What is the best way to build a computer?", "input": "", "output": "There are many ways to build a computer. The best way to build a computer depends on the user's needs and budget. For example, if the user wants a high-end gaming computer, they might want to invest in a powerful processor and graphics card. If the user is on a budget, they might want to invest in a less powerful processor and graphics card. There are many websites and forums that can help the user choose the best parts for their needs. The user can also ask for advice from friends or family who have built computers before."} 55 | {"instruction": "Write a short story that begins with the following, \"I was walking down the street and I saw a man...\"", "input": "", "output": "I was walking down the street and I saw a man. I asked him if he needed help. He said he was fine. I walked away."} 56 | {"instruction": "How do you think the world will be like in 20 years?", "input": "", "output": "I think the world will be a better place."} 57 | {"instruction": "How would you explain a computer to someone who has no idea what a computer is?", "input": "", "output": "A computer is a machine that can store and process information."} 58 | {"instruction": "What are the best ways to improve your writing skills?", "input": "", "output": "Read a lot of books on writing."} 59 | {"instruction": "What are some ways to make a boring day interesting?", "input": "", "output": "Go for a walk."} 60 | {"instruction": "If you had a chance to ask your favorite author one question, what would it be?", "input": "", "output": "What is your favorite book of all time?"} 61 | {"instruction": "Write a short story about a man who takes a nap.", "input": "", "output": "A man is tired. He decides to take a nap. He closes his eyes and takes a nap. He wakes up feeling refreshed."} 62 | {"instruction": "What are some of the things you like about your job?", "input": "", "output": "I like the people I work with."} 63 | {"instruction": "What are some interesting facts about the English language?", "input": "", "output": "The English language is the most widely spoken language in the world ."} 64 | {"instruction": "Come up with a quick morning routine that you can do in 5-10 minutes.", "input": "", "output": "Take a shower, get dressed, eat breakfast, and get out the door."} 65 | {"instruction": "What is the difference between a computer\u2019s RAM and its CPU?", "input": "", "output": "ram is memory"} 66 | {"instruction": "Write a short story about someone finding a lost item.", "input": "", "output": "I was walking home when I saw a watch. When I picked it up, I saw the name \"Doe\" on it. I thought, \"This must be the Doe family's watch.\" I ran home, found the number, and called the Doe family. They were so happy to get it back. I was happy to help."} 67 | {"instruction": "What is the difference between a dog and a cat?", "input": "", "output": "dog is mammal"} 68 | {"instruction": "Create a comic strip about a day in the life of your favorite teacher.", "input": "", "output": "i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm a teacher i'm"} 69 | {"instruction": "How will the world be different in 20 years?", "input": "", "output": "The world will be a lot more crowded."} 70 | {"instruction": "What is a good way to keep track of your progress?", "input": "", "output": "Keeping track of your progress is a great way to stay motivated and see how far you\u2019ve come. There are many different ways to do this, but some effective methods include keeping a journal, setting goals, and using tracking apps."} 71 | {"instruction": "What is your best advice for someone who wants to start a blog?", "input": "", "output": "Start a blog on a topic you are passionate about."} 72 | {"instruction": "What are some things that make you feel happy?", "input": "", "output": "- Spending time with my family. - Going outside on a sunny day. - Watching funny movies or videos. - Listening to music. - Going for a walk or jog. - Reading a good book. - Petting my dog. - Getting a good night's sleep. - Eating a piece of chocolate. - Doing something nice for someone else."} 73 | {"instruction": "Write a script in JavaScript for creating random numbers between 1-50.", "input": "", "output": "n = 1 r = 0 while n 50: n += 1 r += 1 if n == 50: break"} 74 | {"instruction": "What are some ways to improve your sleep?", "input": "", "output": "Eat a light snack before bed."} 75 | {"instruction": "What would you do to help a student who is struggling in school?", "input": "", "output": "Ask the student to come to your office hours."} 76 | {"instruction": "What is the most expensive item you have bought?", "input": "", "output": "a car"} 77 | {"instruction": "What is your favorite movie and why?", "input": "", "output": "i like the movie because it is a good movie"} 78 | {"instruction": "How can I learn to appreciate food more?", "input": "", "output": "Eat slowly and savor each bite."} 79 | {"instruction": "Is there a difference between a computer\u2019s CPU and its microprocessor?", "input": "", "output": "No, a CPU is a microprocessor."} 80 | {"instruction": "Write a blog post about the best way to study for an exam.", "input": "", "output": "The best way to study for an exam is to make a study plan and stick with it. Start by familiarizing yourself with the material and making sure you understand the concepts. Next, make a schedule and set aside time for studying. Finally, use effective study methods such as flashcards, practice tests, and mnemonics. By following these tips, you can ensure that you are well-prepared for your exam."} 81 | {"instruction": "What are the top 5 things in your life that you would like to change?", "input": "", "output": "I want to lose weight"} 82 | {"instruction": "What is the best way to get rid of mosquitoes?", "input": "", "output": "Burning a mosquito coil"} 83 | {"instruction": "Write a C program for FizzBuzz.", "input": "", "output": "#include int main() { for (int i = 1; i <= 100; i++) { if (i % 15 == 0) printf(\"FizzBuzz\"); if (i % 3 == 0) printf(\"Fizz\"); if (i % 5 == 0) printf(\"Buzz\"); else printf(\"%d\", i); printf(\"\\n\"); } return 0; }"} 84 | {"instruction": "What is the best way to start a conversation with a stranger?", "input": "", "output": "Ask them how they are doing."} 85 | {"instruction": "What are the best tips for staying happy and healthy?", "input": "", "output": "Eat a healthy diet, exercise, and get enough sleep."} 86 | {"instruction": "Who is your hero? Why?", "input": "", "output": "a hero is someone who is admired for their courage and achievements"} 87 | {"instruction": "What new skill will you learn this year?", "input": "", "output": "I will learn how to play the piano."} 88 | {"instruction": "What is your favorite joke?", "input": "", "output": "A man walks into a bar and sees a man with a hat on. He asks the man with the hat on, \"What's your favorite joke?\""} 89 | {"instruction": "Write a creative ending for a horror movie.", "input": "", "output": "The film ends with the narrator telling the audience that the story they just watched actually happened, and that the events of the film are true."} 90 | {"instruction": "What is the best way to ask someone out?", "input": "", "output": "Tell them you want to go out with them."} 91 | {"instruction": "Suggest some ways to improve your communication skills.", "input": "", "output": "Practice speaking in front of a mirror."} 92 | {"instruction": "How can you become more popular at school?", "input": "", "output": "Go to the library and hang out with people."} 93 | {"instruction": "Create a list of tips for writing a great cover letter.", "input": "", "output": "Write a cover letter that is specific to the job you are applying for. Keep it short and to the point. Use a professional font and keep the letter to one page. Make sure to include your contact information at the top of the letter."} 94 | {"instruction": "What are the basic rules of a healthy diet?", "input": "", "output": "Eat a variety of foods from each food group every day."} 95 | {"instruction": "If you were to build a city from scratch, what would you build and why?", "input": "", "output": "a city with a lot of parks and green spaces"} 96 | {"instruction": "What does it mean to be \"American?\"", "input": "", "output": "to be born in united states"} 97 | {"instruction": "Write a short story about a character who is forced to leave their home town.", "input": "", "output": "I was born and raised in New York City. I never thought I would leave, but when my husband took a job in Los Angeles, I had no choice. Leaving New York was the hardest thing I've ever done. I cried for days. I cried when I said goodbye to my family and friends. I cried when I packed up my things. I cried when I got on the plane. I cried when I arrived in Los Angeles. I cried when I unpacked my things. I cried when I tried to make new friends. I cried when I had to start my life over. But eventually, I stopped crying. I made new friends. I found a new job. I bought a new house. I even learned to drive on the other side of the road. I never thought I would leave New York, but I'm glad I did."} 98 | {"instruction": "Find 5 best books and recommend one.", "input": "", "output": "The Count of Monte Cristo"} 99 | {"instruction": "Write a letter to a friend, explaining why you think they should quit their job.", "input": "", "output": "Dear John, I'm writing to you because I think you should quit your job. I know you're a good worker, but you're not a good person. You're a jerk. You're a jerk to your boss, your coworkers, and your customers. You're a jerk to your family. You're a jerk to your friends. You're a jerk to me. I'm not asking you to quit your job. I'm asking you to quit being a jerk. I'm asking you to be a better person. I'm asking you to be a better friend. I'm asking you to be a better son. I'm asking you to be a better brother. I'm asking you to be a better man. I'm asking you to be a better friend. I'm asking you to be a better person. I'm asking you to be a better friend. I'm asking you to be a better person. I'm asking you to be a better person. I'm asking you to be"} 100 | {"instruction": "Create 3 different lists of 10 questions that you would ask your friends about their lives.", "input": "", "output": "What is your favorite food?"} 101 | {"instruction": "What is the most valuable lesson your teacher has taught you so far?", "input": "", "output": "I learned that I can do anything I put my mind to."} 102 | {"instruction": "Write a description of your favorite TV show.", "input": "", "output": "The premise of the show is that the main character is a sailor who is sent to a small island to find his brother who has gone missing. The island is inhabited by a group of people who are all related to each other in some way. The main character is a sailor who is sent to a small island to find his brother who has gone missing. The island is inhabited by a group of people who are all related to each other in some way."} 103 | {"instruction": "What is the best way to get to know a new city?", "input": "", "output": "go on a walking tour"} 104 | {"instruction": "Write a short story using the following words:", "input": "", "output": "The man was a thief. He stole a wallet from a woman. He took her purse and ran off. The woman chased him. She caught him and slapped him."} 105 | {"instruction": "Write a short story about a person who wakes up one day and cannot remember who they are.", "input": "", "output": "A man wakes up one day and cannot remember who he is. He looks around and sees a woman in a tattered dress. She tells him that her name is Rose. They go to a cafe and he orders a coffee. She tells him that she is a waitress at the cafe and that she has been waiting on him for a long time. She tells him that she has been waiting on him for a long time. They go to a park and sit on a bench. She tells him that she has been waiting on him for a long time. They go to a cafe and he orders a coffee. She tells him that her name is Rose. They go to a park and sit on a bench. She tells him that she has been waiting on him for a long time. They go to a cafe and he orders a coffee. She tells him that her name is Rose. They go to a park and sit on a bench. She tells him that she has been waiting on him for a long time. They go to a cafe and he orders a coffee. She tell"} 106 | -------------------------------------------------------------------------------- /sample/openei.flan-ul2_output.jsonl: -------------------------------------------------------------------------------- 1 | {"instruction": "Tell me if the article contains offensive language. If it does, give me the offensive language.", "input": "I am a f*cking idiot.", "output": "Yes"} 2 | {"instruction": "Given a list of words, return all the possible words that can be constructed from the list. For example, given [“a”, “b”], the return value should be [“a”, “ab”, “b”, “ba”, “bb”] (in any order).", "input": "[\"a\", \"b\", \"c\"]", "output": "[abc]"} 3 | {"instruction": "Given the context, predict the next word.", "input": "A dog . A cat .", "output": "a"} 4 | {"instruction": "Tell me if this sentence is grammatically correct.", "input": "I am a girl.", "output": "acceptable"} 5 | {"instruction": "Given the input, predict how much time it will take to get from the current location to the destination.", "input": "I live in London, UK and I am planning a trip to New York, USA. How long will it take to reach there?", "output": "10 hours"} 6 | {"instruction": "Rank the following hotels.", "input": "(1) Four Seasons (2) Park Hyatt (3) Waldorf Astoria (4) The Peninsula (5) Mandarin Oriental (6) Ritz-Carlton (7) St. Regis (8) Intercontinental (9) Holiday Inn (10) Hilton Garden Inn (11) Motel 6 (12) The Ritz", "output": "(1)"} 7 | {"instruction": "The following text is part of a research paper. Based on the contents, identify the research paper's major conclusion.", "input": "\"In this paper, we present a novel method for the detection of malicious code. We first define a taxonomy of malware, and then introduce a system to automatically detect malware. We then propose a novel technique to automatically generate a signature that can detect malware. We evaluate our system on a number of samples of malware and show that our technique can reliably detect malware. Our system is able to achieve a 94.4% detection rate on our samples. To the best of our knowledge, this is the first system to automatically detect malicious code.\"", "output": "This is the first system to automatically detect malicious code"} 8 | {"instruction": "Given a list of restaurants and their ratings, sort the restaurants by their ratings.", "input": "[['Mangia'], ['Barbie'], ['Taco Bell'], ['Subway'], ['The Cheesecake Factory']]", "output": "[['The Cheesecake Factory'], ['Barbie'], ['Taco Bell'], ['Mangia'], ['Subway']]"} 9 | {"instruction": "Write the summary of the given article.", "input": "\"I think we're going to be OK\" says the co-founder of the popular travel site. \"This is the first time where things are going to be bad for a while.\"", "output": "The co-founder of the popular travel site, which was recently acquired by Expedia, says the company is not in danger of going out of business. \"I think we're going to be OK,\" said Rick Seaney, who co-founded Travelocity in 1996. \"This is the first time where things are going to be bad for a while.\" Seaney, who is also the CEO of Expedia, said the company is still profitable and has a strong balance sheet. \"We're not going to go out of business,\" he said. \"We're going to be OK.\" Seaney said the company is still profitable and has a strong balance sheet. \"We're not going to go out of business,\" he said. \"We're going to be OK.\" Seaney said the company is still profitable and has a strong balance sheet. \"We're not going to go out of business,\" he said. \"We're going to be OK.\" Seaney said the company is still profitable and has a strong balance sheet. \"We're not going to go out of business,\" he said. \"We're going to be OK.\" Seaney said the company is still"} 10 | {"instruction": "Given a list of numbers, find the biggest number.", "input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", "output": "10"} 11 | {"instruction": "Given a question-answer pair, generate a new question-answer pair based on the old question-answer pair.", "input": "Question: \"What is the capital of the US?\" Answer: \"Washington\"", "output": "What is the capital of the US in 2020?"} 12 | {"instruction": "Write an email to request a meeting with the professor based on the given information.", "input": "Dear Professor, I am a PhD candidate in your lab. I would like to discuss my PhD proposal with you. Can we have a meeting on Monday?", "output": "I will be available all day. Thank you."} 13 | {"instruction": "Summarize the following paragraph, and provide the summary as the output.", "input": "“Sailing has always been an important part of my life,” said Mark Reynolds, a British sailor who is a multiple times world champion. “I got into sailing by mistake, because my dad was trying to learn how to sail and we went out in an old wooden boat and he didn’t know how to sail. I would say that my love for sailing really stemmed from that experience.” Reynolds competed in the 1996 Olympic Games in Atlanta and is a 5-time world champion in the “Star” class of boat. Mark Reynolds is now the president of the British Sailing Team.", "output": "Meet the British sailor Mark Reynolds, who is a multiple times world champion."} 14 | {"instruction": "Generate an appropriate response to the given comment.", "input": "I love the game.", "output": "I'm glad you like it."} 15 | {"instruction": "Complete the lyrics of the given song.", "input": "I am the Walrus (Walrus, I am the walrus)", "output": "I am the Walrus (Walrus, I am the walrus)"} 16 | {"instruction": "Given a sentence, find the subject and verb.", "input": "This is a random sentence.", "output": "the king , be king"} 17 | {"instruction": "Given a sentence, tell me if it is a question. If it is, answer it.", "input": "Is this a question?", "output": "Yes"} 18 | {"instruction": "Given a list of items (of a certain type), determine if a given item is in the list. The list is not sorted.", "input": "The list: apple, banana, orange. The item: orange", "output": "Yes"} 19 | {"instruction": "Given a product name, return the list of related product names.", "input": "Tesla", "output": "Tesla Model S"} 20 | {"instruction": "Write a recipe for the following dish.", "input": "This is a recipe for a chicken noodle soup..", "output": "In a large pot, saute the onion in the butter until tender. Add the chicken stock, chicken, carrots, celery, parsley, thyme, salt and pepper. Bring to a boil. Reduce the heat to low and simmer for 30 minutes. Add the noodles and cook for an additional 10 minutes."} 21 | {"instruction": "Identify the main idea in the article.", "input": "In the U.S., more than 2 million people have been infected with the coronavirus and over 111,000 have died. The latest:", "output": "The latest on the coronavirus outbreak in the U.S."} 22 | {"instruction": "The following are the steps to a recipe. Make sure you follow the recipe in the order given.", "input": "Steps: 1. Add the flour, sugar, butter, and eggs to a large bowl. 2. Mix the ingredients together until they form a thick dough. 3. Roll the dough out on a floured surface until it is about 1/2 inch thick. 4. Cut the dough into 2-inch squares. 5. Place the squares on a baking sheet and bake in a preheated oven for 10-12 minutes, until the edges start to brown. 6. Remove from the oven and let cool before serving.", "output": "Preheat the oven to 400 degrees."} 23 | {"instruction": "Write a short essay on the given topic.", "input": "Do you think AI is a threat to humanity?", "output": "Artificial intelligence (AI) is a branch of computer science that focuses on the creation of intelligent machines that can perform tasks that require human intelligence, such as visual perception, speech recognition, and decision-making. AI has been a topic of debate in the media and in popular culture for decades. In the 1950s, the term was used to describe a computer that could play chess against humans. In the 1980s, the term was used to describe a computer that could beat humans at a game of checkers. In the 1990s, the term was used to describe a computer that could beat humans at a game of Go. In the 2000s, the term was used to describe a computer that could beat humans at a game of Atari Breakout. In the 2010s, the term is used to describe a computer that can beat humans at a game of Go, chess, and Atari Breakout. In the 2020s, the term is used to describe a computer that can beat humans at a game of Go, chess, and Atari Breakout. In the 2030s, the term is used to describe a computer that can beat humans at a game of"} 24 | {"instruction": "Make a list of possible names for the entity, based on the description.", "input": "The name of the place is unknown.", "output": ""} 25 | {"instruction": "Given a list of tasks, tell me which task should be done first.", "input": "Write a story. Write a poem. Write a book. Write a paper.", "output": "Write a story"} 26 | {"instruction": "Given a number, count the total number of digits in the number.", "input": "10, 10.9, 102.05, 10.005, 10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9", "output": "29"} 27 | {"instruction": "Summarize the article.", "input": "The U.S. economy will grow at a faster pace next year than previously expected, as the country's central bank is set to raise interest rates at a faster pace over the next two years, according to new projections released Wednesday. The Federal Reserve's updated projections show that the economy will expand at a 3.4% pace in 2019, up from its previous forecast of 3.1%. The central bank also said it expects the unemployment rate to fall to 3.5% by the end of next year, down from 4.1% now. The central bank's 17 policymakers also raised their economic growth expectations for 2020 to 3.2% from 3.1% previously.", "output": "The Federal Reserve's updated projections show that the economy will expand at a 3.4% pace in 2019, up from its previous forecast of 3.1%."} 28 | {"instruction": "Correct and polish the sentence grammatically.", "input": "\"My, this is a large and pleasant room.\"", "output": "\"My, this is a large and pleasant room.\""} 29 | {"instruction": "Given the following paragraph, tell me the first sentence that mentions the following terms.", "input": "The number of companies that have hit the $1 trillion valuation mark is increasing, and so too is the number of countries that have a trillion-dollar company.", "output": "The number of companies that have hit the $1 trillion valuation mark is increasing"} 30 | {"instruction": "Translate the sentence into another language.", "input": "This is a random sentence. 4", "output": "4"} 31 | {"instruction": "List all the names of authors that have been mentioned in the article.", "input": "If you've ever been to a big bookstore, you may have noticed that most of the books are written by white people. But there are some exceptions. For instance, there's a growing number of books written by people of color. In fact, about 40 percent of all books published in the U.S. in 2017 were written by people of color.", "output": ","} 32 | {"instruction": "Tell me if the following statement is true.", "input": "2 + 2 = 4", "output": "Yes"} 33 | {"instruction": "Given the context in the title, what should be the title of the article?", "input": "This is the title of the article.", "output": "The X Factor"} 34 | {"instruction": "Given an email and some facts, find out who the sender is. Output the name.", "input": "[(\"Michael\", \"Mike\"), (\"Peter\", \"Pete\"), (\"Sam\", \"Sammy\")]", "output": "Michael"} 35 | {"instruction": "Given the input, summarize the main points.", "input": "\"The New York City Department of Education (NYCDOE) is the largest system of schools in the United States, serving 1.1 million students in more than 1,800 schools.\"", "output": "The NYC Department of Education is the largest system of schools in the United States, serving 1.1 million students in more than 1,800 schools."} 36 | {"instruction": "Identify if the following is a logical argument. If so, identify the conclusion.", "input": "All mammals are animals. All animals are alive. Therefore, all mammals are alive.", "output": "yes"} 37 | {"instruction": "Given a sentence, pick a random word in it, and replace it with a synonym.", "input": "This is a random sentence.", "output": "The sand was blown away by the wind."} 38 | {"instruction": "Find the next number in the sequence.", "input": "1 2 3 5 8 13 21 34", "output": "45"} 39 | {"instruction": "Given the problem, do some basic research to find the answer.", "input": "What is the answer to the question 'What is the answer to the question?' ?", "output": "Y"} 40 | {"instruction": "Given a sentence, extract the following information: (1) the name of a person, (2) the name of a company, (3) the name of a country, (4) the name of a city, (5) the name of a month, (6) the name of a day.", "input": "This is a random sentence.", "output": ", the name of a city, is the capital of a country."} 41 | {"instruction": "Given a sentence, add a comment to explain the meaning of the sentence.", "input": "The patient is in a coma.", "output": "The patient is unconscious."} 42 | {"instruction": "Analyze the content of the article and determine the author's point of view.", "input": "In \"The Great Gatsby,\" what is the theme of the book and who is the narrator?", "output": "The narrator is unnamed, but is implied to be the author of the book."} 43 | {"instruction": "Give me a list of synonyms for the word 'awesome'.", "input": "awesome", "output": "awesomest, awesomes, awesomests"} 44 | {"instruction": "Write an essay on this topic.", "input": "An article about a company.", "output": "The company has been a member of the FTSE 250 Index since June 2012."} 45 | {"instruction": "Explain the following phenomenon. You can add any facts or examples that are relevant.", "input": "If a new technology is released, its price is always expensive at the beginning.", "output": "The price of a new technology will decrease over time."} 46 | {"instruction": "What would be a good headline for this article?", "input": "The U.S. economy lost 140,000 jobs in December, as the labor market continued to reel from the coronavirus pandemic. The unemployment rate fell to 6.7%, but that was due to the labor force shrinking by 199,000.", "output": "U.S. Economy Loses 140,000 Jobs in December"} 47 | {"instruction": "Given a list of items, tell me if the given item is on the list.", "input": "List: a, b, c, d, e, f", "output": "yes"} 48 | {"instruction": "Come up with a list of names for the given person.", "input": "John", "output": "Johnnie, John, Johnnie Jr., Johnnie"} 49 | {"instruction": "Write a summary of the article. You can add your opinion.", "input": "The 2020 United States presidential election was the 59th quadrennial United States presidential election. It was held on Tuesday, November 3, 2020. Donald Trump, the incumbent president and the Republican nominee, was running for reelection to a second term. Democrat Joe Biden, the former vice president, was the Democratic nominee. The Democratic Party also nominated vice presidential candidate Kamala Harris, the U.S. senator from California, to be vice president. Trump and Biden were the oldest candidates ever to compete in a U.S. presidential election, at age 74 and 77, respectively. Biden became president-elect after defeating Trump in the electoral college.", "output": "The 2020 United States presidential election was the 59th quadrennial United States presidential election, held on Tuesday, November 3, 2020. Donald Trump, the incumbent president and the Republican nominee, was running for reelection to a second term. Democrat Joe Biden, the former vice president, was the Democratic nominee. The Democratic Party also nominated vice presidential candidate Kamala Harris, the U.S. senator from California, to be vice president. Trump and Biden were the oldest candidates ever to compete in a U.S. presidential election, at age 74 and 77, respectively. Trump and Biden were the oldest candidates ever to compete in a U.S. presidential election, at age 74 and 77, respectively."} 50 | {"instruction": "Given the context, find the most appropriate person to introduce.", "input": "This is a random sentence. 4", "output": "adam"} 51 | {"instruction": "The following query contains some errors. Explain what these errors are and fix them.", "input": "SELECT * FROM \"table\" WHERE \"column\" LIKE '%t%' AND \"column\" LIKE '%2'", "output": "SELECT * FROM \"table\" WHERE \"column\" LIKE '%t%' AND \"column\" LIKE '%2'"} 52 | {"instruction": "Generate a summary on the following passage.", "input": "The American Museum of Natural History in New York has a new permanent exhibition: \"The Power of Poison.\"", "output": "The exhibition is a collection of poisons from around the world, including a venomous snake, a venomous spider and a venomous frog."} 53 | {"instruction": "Write a report on the following incident.", "input": "According to the report, a 35-year-old man was arrested after he was accused of punching a 7-year-old boy in the face. The man was at the park with his 3-year-old daughter when she was playing on the slide. The man then pulled her off the slide when the boy said to him he should let her play. The incident was caught on camera and was uploaded to Twitter. The video shows the man punching the boy in the face. The boy was left with a black eye and a swollen cheek. The 35-year-old man was seen running away from the park after hitting the child. He was later arrested and charged with hit and run. The boy's mother stated that she had to take her son to the hospital for a CT scan and X-ray. The mother also stated \"I'm glad he is alive.\"", "output": "A man was arrested after he was accused of punching a 7-year-old boy in the face. According to the report, a 35-year-old man was arrested after he was accused of punching a 7-year-old boy in the face. The man was at the park with his 3-year-old daughter when she was playing on the slide. The man then pulled her off the slide when the boy said to him he should let her play. The incident was caught on camera and was uploaded to Twitter. The video shows the man punching the boy in the face. The boy was left with a black eye and a swollen cheek. The 35-year-old man was seen running away from the park after hitting the child. He was later arrested and charged with hit and run. The boy's mother stated that she had to take her son to the hospital for a CT scan and X-ray. The boy's mother also stated \"I'm glad he is alive.\""} 54 | {"instruction": "Given a paragraph, identify the main points and the supporting points.", "input": "The United States is a federal republic with a presidential system of government. The head of state and head of government is the President. The executive power is vested in the President, who acts as the head of the executive branch that includes the Cabinet. The legislative branch consists of the bicameral Congress, which consists of the House of Representatives and the Senate. The judicial branch consists of the Supreme Court and lower federal courts.", "output": "The United States is a federal republic with a presidential system of government. The head of state and head of government is the President. The executive power is vested in the President, who acts as the head of the executive branch that includes the Cabinet. The legislative branch consists of the bicameral Congress, which consists of the House of Representatives and the Senate. The judicial branch consists of the Supreme Court and lower federal courts."} 55 | {"instruction": "Generate a response to a given email.", "input": "Hi, I am having trouble logging in. Can you reset my password?", "output": "I can help you with that. What is your email address?"} 56 | {"instruction": "Given a news article, output the news source.", "input": "A gunman used a rifle to kill 19 children and two teachers at a Texas elementary school on Tuesday in the latest mass shooting at a U.S. school, the state's governor said. The attacker, who was killed by law enforcement, stormed the Uvalde school with a handgun and a rifle, Governor Greg Abbott said in a statement.", "output": "Texas governor says gunman used rifle in school shooting"} 57 | {"instruction": "Write a short introduction to the following product.", "input": "[{'name': 'iPhone', 'price': '1999.00', 'description': 'This is a mobile phone.'},{'name': 'Samsung', 'price': '1999.00', 'description': 'This is a mobile phone.'},{'name': 'Nokia', 'price': '1999.00', 'description': 'This is a mobile phone.'}]", "output": "The iPhone is a mobile phone that is sold for $ 1999. It is made by Apple."} 58 | {"instruction": "Given the input, output the output.", "input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", "output": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"} 59 | {"instruction": "Given the following information, predict the value of y.", "input": "x = 2; y = 4; z = 3", "output": "y"} 60 | {"instruction": "Use the knowledge of the story to answer the question.", "input": "Story: In a village, one day a man was walking and he saw a dog with a bone in his mouth. He wanted to take the bone from the dog and asked the dog to give the bone to him but the dog refused. So, he tried to take the bone out of the dog's mouth, then the dog bit him and he lost his finger. He ran to the doctor and the doctor said that he cannot do anything about this. He lost his finger. Question: What is the moral of the story?", "output": "Don't play with dogs"} 61 | {"instruction": "Write a dialogue between the user and the salesperson.", "input": "Hello, I would like to buy a gift for my friend.", "output": "Hello, what would you like to buy?"} 62 | {"instruction": "Write a function that takes in a string and tell whether it is a palindrome.", "input": "ABCD", "output": "s = input() if s[::-1] == s: print(\"Yes\") else: print(\"No\")"} 63 | {"instruction": "Generate a news article using the following text.", "input": "This is a sample news article.", "output": "The Associated Press contributed to this report."} 64 | {"instruction": "Given the problem, identify the important information that I should know.", "input": "What is the solution for this math problem? 4 + 6 = ?", "output": "4 + 6 ="} 65 | {"instruction": "Write a paragraph to describe your thoughts of the following news.", "input": "(A) The most powerful earthquake ever recorded in New Zealand, a 7.8-magnitude quake, has struck near the city of Christchurch on the country's South Island. (B) The quake, which struck at 12:02 p.m. local time, was 16.1 miles (26 kilometers) deep, the United States Geological Survey said. (C) The quake struck on the edge of the Pacific Ocean and was followed by 5,000 aftershocks, including a 6.0-magnitude temblor, which struck Sunday afternoon about 60 miles (100 kilometers) from the city. (D) The earthquake struck near the city of Christchurch, which is still recovering from a devastating 6.3-magnitude quake that hit the city in 2011, killing 185 people. (E) An estimated 1,300 residents spent Saturday night in emergency shelters, and Christchurch Mayor Bob Parker told Radio New Zealand that the impact of the quake would not be clear before daybreak. (F) \"It's too early to tell what the impact will be,\" he said. \"It's far too early to tell what the impact will be.\" (G) The earthquake was felt as far away as Wellington, 200 miles (320 kilometers) away. (H) \"The quake was not just a Christchurch event. It was felt as far away as Wellington, 200 miles (320 kilometers) away.\"", "output": "Which of the following is true of the earthquake?"} 66 | {"instruction": "Generate a description for a given photo.", "input": "", "output": "The sand castle is made of sand."} 67 | {"instruction": "Given a sentence, rewrite it without using the given word.", "input": "This is a random sentence.", "output": "The man sat on the bench."} 68 | {"instruction": "Provide a one-sentence summary for each paragraph.", "input": "In this article, we consider the role of the Internet in shaping and maintaining the public sphere. We argue that the Internet, by its very nature, is not structured in a way that supports the public sphere and, in fact, undermines it in a number of ways. The Internet is a medium of individualism. This is because it is based on individual choice, rather than on a shared common ground, such as a newspaper.", "output": "The Internet is a medium of individualism."} 69 | {"instruction": "Given a string, output the longest palindrome that can be formed from that string.", "input": "abcba", "output": "abcba"} 70 | {"instruction": "Generate a new sentence that includes the four given words.", "input": "This is a test. Apple, Banana, Orange, Mango", "output": "Apple, banana, orange, mango are fruits."} 71 | {"instruction": "Given a list of words, classify them based on their part of speech.", "input": "The list of words: [good, run, fast, slow, jump, high, low, long, short, black, white, red, blue, green, yellow]", "output": "word"} 72 | {"instruction": "Given a news article, tell me if it is credible or not.", "input": "The United States military said it has started the process of withdrawing from Afghanistan after a 20-year war that cost the lives of 2,461 American service members and hundreds of thousands of Afghans.", "output": "Credible"} 73 | {"instruction": "What are the best exercises you can do with a kettlebell?", "input": "", "output": "swings"} 74 | {"instruction": "Write a blog post about your favorite YouTube channel.", "input": "", "output": "I'm a huge fan of YouTube. I love watching videos of people doing funny things, and I love watching videos of people doing things that aren't funny. I love watching videos of people doing things that aren't funny because they're so weird and random. I love watching videos of people doing things that aren't funny because they're so weird and random. I love watching videos of people doing things that aren't funny because they're so weird and random. I love watching videos of people doing things that aren't funny because they're so weird and random. I love watching videos of people doing things that aren't funny because they're so weird and random. I love watching videos of people doing things that aren't funny because they're so weird and random. I love watching videos of people doing things that aren't funny because they're so weird and random. I love watching videos of people doing things that aren't funny because they're so weird and random. I love watching videos of people doing things that aren't funny because they're so weird and random. I love watching videos of people doing things that aren't"} 75 | {"instruction": "Write a short story that begins with the following, \"The wind was blowing and the rain falling, but still I managed to light a fire...\"", "input": "", "output": "I was camping in the woods. It was a rainy day. I was trying to build a fire. I had to use a lot of wood."} 76 | {"instruction": "Write a short story about a woman who is married to a man who has a big penis.", "input": "", "output": "The woman was married to a man who had a big penis. She was embarrassed to show it to her friends. One day she decided to show it to her friends. They were all shocked."} 77 | {"instruction": "What are your three best tips for getting up in the morning?", "input": "", "output": "Invest in a comfortable mattress."} 78 | {"instruction": "What is the best way to build a computer?", "input": "", "output": "Buy a motherboard, cpu, and ram."} 79 | {"instruction": "Write a short story that begins with the following, \"I was walking down the street and I saw a man...\"", "input": "", "output": "I was walking down the street and I saw a man. He was wearing a hat and a coat. He was walking with a cane. He was wearing a pair of glasses."} 80 | {"instruction": "What are the best tips you have for students who want to learn more about their field of study?", "input": "", "output": "Go to conferences and seminars."} 81 | {"instruction": "How do you think the world will be like in 20 years?", "input": "", "output": "I think the world will be a better place."} 82 | {"instruction": "How would you explain a computer to someone who has no idea what a computer is?", "input": "", "output": "A computer is a machine that can store and process information."} 83 | {"instruction": "What are the best ways to improve your writing skills?", "input": "", "output": "Read a lot of books."} 84 | {"instruction": "What are some ways to make a boring day interesting?", "input": "", "output": "Go for a walk."} 85 | {"instruction": "If you had a chance to ask your favorite author one question, what would it be?", "input": "", "output": "What is your favorite book of all time?"} 86 | {"instruction": "Write a short story about a man who takes a nap.", "input": "", "output": "The man was tired. He decided to take a nap. He fell asleep. He woke up refreshed."} 87 | {"instruction": "What are some of the things you like about your job?", "input": "", "output": "I like the fact that I can work from home."} 88 | {"instruction": "What are some interesting facts about the English language?", "input": "", "output": "English is the most widely spoken language in the world"} 89 | {"instruction": "Come up with a quick morning routine that you can do in 5-10 minutes.", "input": "", "output": "Take a shower, get dressed, eat breakfast, and get out the door."} 90 | {"instruction": "What is the difference between a computer’s RAM and its CPU?", "input": "", "output": "memory is volatile and can be lost if power is lost"} 91 | {"instruction": "Write a short story about someone finding a lost item.", "input": "", "output": "The man found a lost wallet. He was happy to find it. He walked home with the wallet. He was happy to have it back."} 92 | {"instruction": "What is the best way to learn how to code? What is the best way to learn how to program?", "input": "", "output": "You can learn to code by taking a class at your local community college or university, or by taking an online course."} 93 | {"instruction": "What is the difference between a dog and a cat?", "input": "", "output": "dog is mammal"} 94 | {"instruction": "Which is the best place to go for a relaxing holiday?", "input": "", "output": "hawaii"} 95 | {"instruction": "Create a comic strip about a day in the life of your favorite teacher.", "input": "", "output": "a teacher is preparing for class"} 96 | {"instruction": "How will the world be different in 20 years?", "input": "", "output": "The world will be more connected."} 97 | {"instruction": "What is a good way to keep track of your progress?", "input": "", "output": "Write down your goals and how you plan to achieve them."} 98 | {"instruction": "What is your best advice for someone who wants to start a blog?", "input": "", "output": "Start a blog on a topic you are passionate about."} 99 | {"instruction": "What are some things that make you feel happy?", "input": "", "output": "a good meal"} 100 | {"instruction": "Write a script in JavaScript for creating random numbers between 1-50.", "input": "", "output": "n = int(input()) n = n + 1 n = n % 50 n = n // 50 print(n)"} 101 | {"instruction": "What are some ways to improve your sleep?", "input": "", "output": "Eat a light snack before bed."} 102 | {"instruction": "What’s the best way to get a job in the gaming industry?", "input": "", "output": "Go to school for game design."} 103 | {"instruction": "What would you do to help a student who is struggling in school?", "input": "", "output": "Ask them to explain the problem to you."} 104 | {"instruction": "What is the best way to learn another language?", "input": "", "output": "Immerse yourself in the language."} 105 | {"instruction": "What would a planet be like if we were all made out of jello?", "input": "", "output": "jelloearth"} 106 | {"instruction": "What is the most expensive item you have bought?", "input": "", "output": "car"} 107 | {"instruction": "What is your favorite movie and why?", "input": "", "output": "i like the movie because it is a good movie"} 108 | {"instruction": "How can I learn to appreciate food more?", "input": "", "output": "Eat slowly and savor every bite."} 109 | {"instruction": "What are the best snacks I can eat to build muscle?", "input": "", "output": "Protein shakes"} 110 | {"instruction": "How can you improve your writing?", "input": "", "output": "Read a lot of books."} 111 | {"instruction": "Is there a difference between a computer’s CPU and its microprocessor?", "input": "", "output": "no"} 112 | {"instruction": "What do you think is the best way to learn about a new topic?", "input": "", "output": "Read about it"} 113 | {"instruction": "Write a blog post about the best way to study for an exam.", "input": "", "output": "The best way to study for an exam is to study in a way that is most effective for you. Everyone is different, and what works for one person may not work for another. The best way to study for an exam is to figure out what works best for you."} 114 | {"instruction": "What are the top 5 things in your life that you would like to change?", "input": "", "output": "i would like to change my job"} 115 | {"instruction": "What is the best way to get rid of mosquitoes?", "input": "", "output": "Use a mosquito repellent."} 116 | {"instruction": "What is the most exciting thing about this year?", "input": "", "output": "the upcoming presidential election"} 117 | {"instruction": "What is the best way to take notes?", "input": "", "output": "Write down the main points of the lecture."} 118 | {"instruction": "Write a C program for FizzBuzz.", "input": "", "output": "n = int(input()) if n%3 == 0: print(n//3, end=\"\") else: print(n//3+1, end=\"\")"} 119 | {"instruction": "What is the best way to start a conversation with a stranger?", "input": "", "output": "Ask them how they are doing."} 120 | {"instruction": "What is the best way to improve your memory?", "input": "", "output": "Take a walk."} 121 | {"instruction": "What are the best tips for staying happy and healthy?", "input": "", "output": "Eat a balanced diet, exercise regularly, and get enough sleep."} 122 | {"instruction": "Who is your hero? Why?", "input": "", "output": "a hero is someone who is admired for their courage and achievements"} 123 | {"instruction": "What new skill will you learn this year?", "input": "", "output": "to play the guitar"} 124 | {"instruction": "What is your favorite joke?", "input": "", "output": "A man walks into a bar and sees a man with a hat on. He asks the man with the hat on, \"What's your favorite joke?\""} 125 | {"instruction": "What is your favorite meal you’ve ever eaten?", "input": "", "output": "asian curry"} 126 | {"instruction": "Write a creative ending for a horror movie.", "input": "", "output": "The film ends with the narrator telling the audience that the story they just watched actually happened, and that the events of the film are true."} 127 | {"instruction": "Imagine that you are a teacher and you want to make your own textbook. What topics would you cover?", "input": "", "output": "atoms and molecules"} 128 | {"instruction": "What is the best way to ask someone out?", "input": "", "output": "Tell them you like them and ask them out."} 129 | {"instruction": "Suggest some ways to improve your communication skills.", "input": "", "output": "Practice your communication skills."} 130 | {"instruction": "How can you become more popular at school?", "input": "", "output": "Go to the library and hang out with people."} 131 | {"instruction": "Create a list of tips for writing a great cover letter.", "input": "", "output": "Write a cover letter that is specific to the job you are applying for. Keep it short and to the point. Use a professional font and keep the letter to one page. Make sure to include your contact information at the top of the letter."} 132 | {"instruction": "What are the basic rules of a healthy diet?", "input": "", "output": "Eat a variety of foods from each food group every day."} 133 | {"instruction": "What is a good way to reduce stress?", "input": "", "output": "Meditate"} 134 | {"instruction": "Why do you think some people learn faster than others?", "input": "", "output": "Some people are just more intelligent."} 135 | {"instruction": "What is the correct way to drink from a cup?", "input": "", "output": "suck the liquid into your mouth"} 136 | {"instruction": "If you were to build a city from scratch, what would you build and why?", "input": "", "output": "a city with a lot of parks and green spaces"} 137 | {"instruction": "What does it mean to be \"American?\"", "input": "", "output": "to be born in united states"} 138 | {"instruction": "Write a short story about a character who is forced to leave their home town.", "input": "", "output": "The man was forced to leave his home town. He had to leave because he was a homosexual."} 139 | {"instruction": "Write a short story, “A day in the life of a homeless person.”", "input": "", "output": "A homeless man was walking down the street. He saw a man with a sign that said \"I'm hungry.\" The homeless man asked the man for some food. The man said he didn't have any. The homeless man said he was homeless and didn't have any money. The homeless man said he was just looking for a place to sleep. The homeless man said he was tired of being homeless."} 140 | {"instruction": "What are the benefits of meditation?", "input": "", "output": "it can help you relax"} 141 | {"instruction": "Find 5 best books and recommend one.", "input": "", "output": "The Hobbit"} 142 | {"instruction": "Write a letter to a friend, explaining why you think they should quit their job.", "input": "", "output": "Dear John, I'm writing to you because I think you should quit your job. I know you're a good worker, but you're not a good person. You're a jerk. You're a jerk to your boss, your coworkers, and your customers. You're a jerk to your family. You're a jerk to your friends. You're a jerk to me. I'm not asking you to quit your job. I'm asking you to quit being a jerk. I'm asking you to be a better person. I'm asking you to be a better friend. I'm asking you to be a better son. I'm asking you to be a better brother. I'm asking you to be a better man. I'm asking you to be a better friend. I'm asking you to be a better person. I'm asking you to be a better friend. I'm asking you to be a better person. I'm asking you to be a better person. I'm asking you to be "} 143 | {"instruction": "Create 3 different lists of 10 questions that you would ask your friends about their lives.", "input": "", "output": "What is your favorite food?"} 144 | {"instruction": "What is the most valuable lesson your teacher has taught you so far?", "input": "", "output": "I learned that I can do anything I put my mind to."} 145 | {"instruction": "Write a description of your favorite TV show.", "input": "", "output": "The show is about a family of a father, a mother, and two children."} 146 | {"instruction": "Write a review of a book you recently read.", "input": "", "output": "This is a very good book. It is a very good book because it is a very good book. It is a very good book because it is a very good book. It is a very good book because it is a very good book. It is a very good book because it is a very good book. It is a very good book because it is a very good book. It is a very good book because it is a very good book. It is a very good book because it is a very good book. It is a very good book because it is a very good book. It is a very good book because it is a very good book. It is a very good book because it is a very good book. It is a very good book because it is a very good book. It is a very good book because it is a very good book. It is a very good book because it is a very good book. It is a very good book because it is a very good book. It is a very good book because it is a very good book. It is a very good book because"} 147 | {"instruction": "What is the best way to get to know a new city?", "input": "", "output": "go on a walking tour"} 148 | {"instruction": "What are some common mistakes people make when they are trying to lose weight?", "input": "", "output": "Eating too much"} 149 | {"instruction": "Do you believe that the minimum wage should be higher in the US?", "input": "", "output": "(B)."} 150 | {"instruction": "Do you know any good jokes?", "input": "", "output": "A man walks into a bar and sees a man wearing a tiger suit."} 151 | {"instruction": "What is a good way to improve a bad mood?", "input": "", "output": "Laugh"} 152 | {"instruction": "Write a short story using the following words:", "input": "", "output": "The man was a thief. He stole a wallet from a woman. He took her purse and ran off. The woman chased him. She caught him and slapped him."} 153 | {"instruction": "Write a short story about a person who wakes up one day and cannot remember who they are.", "input": "", "output": "A man wakes up one day and cannot remember who he is. He looks around and sees a woman in a tattered dress. She tells him that her name is Rose. They go to a cafe and he orders a coffee. She tells him that she is a waitress at the cafe and that she has been waiting on him for a long time. She tells him that she has been waiting on him for a long time. They go to a park and sit on a bench. She tells him that she has been waiting on him for a long time. They go to a cafe and he orders a coffee. She tells him that her name is Rose. They go to a park and sit on a bench. She tells him that she has been waiting on him for a long time. They go to a cafe and he orders a coffee. She tells him that her name is Rose. They go to a park and sit on a bench. She tells him that she has been waiting on him for a long time. They go to a cafe and he orders a coffee. She tell"} 154 | -------------------------------------------------------------------------------- /sample/openei.io_samples.jsonl: -------------------------------------------------------------------------------- 1 | {"instruction": "Tell me if the article contains offensive language. If it does, give me the offensive language.", "input": "I am a f*cking idiot.", "output": "f*cking"} 2 | {"instruction": "Given a list of words, return all the possible words that can be constructed from the list. For example, given [\u201ca\u201d, \u201cb\u201d], the return value should be [\u201ca\u201d, \u201cab\u201d, \u201cb\u201d, \u201cba\u201d, \u201cbb\u201d] (in any order).", "input": "[\"a\", \"b\", \"c\"]", "output": "[\"a\", \"ab\", \"b\", \"ba\", \"bb\", \"bc\", \"c\"]"} 3 | {"instruction": "Given the context, predict the next word.", "input": "A dog . A cat .", "output": "A mouse"} 4 | {"instruction": "Tell me if this sentence is grammatically correct.", "input": "I am a girl.", "output": "yes"} 5 | {"instruction": "Given the input, predict how much time it will take to get from the current location to the destination.", "input": "I live in London, UK and I am planning a trip to New York, USA. How long will it take to reach there?", "output": "6 hours and 15 minutes"} 6 | {"instruction": "Rank the following hotels.", "input": "(1) Four Seasons (2) Park Hyatt (3) Waldorf Astoria (4) The Peninsula (5) Mandarin Oriental (6) Ritz-Carlton (7) St. Regis (8) Intercontinental (9) Holiday Inn (10) Hilton Garden Inn (11) Motel 6 (12) The Ritz", "output": "1. Park Hyatt, 2. Waldorf Astoria, 3. Four Seasons, 4. Mandarin Oriental, 5. The Peninsula, 6. The Ritz-Carlton, 7. St. Regis, 8. Intercontinental, 9. Holiday Inn, 10. Hilton Garden Inn, 11. Motel 6, 12. The Ritz"} 7 | {"instruction": "The following text is part of a research paper. Based on the contents, identify the research paper's major conclusion.", "input": "\"In this paper, we present a novel method for the detection of malicious code. We first define a taxonomy of malware, and then introduce a system to automatically detect malware. We then propose a novel technique to automatically generate a signature that can detect malware. We evaluate our system on a number of samples of malware and show that our technique can reliably detect malware. Our system is able to achieve a 94.4% detection rate on our samples. To the best of our knowledge, this is the first system to automatically detect malicious code.\"", "output": "\"The system is able to achieve a 94.4% detection rate on our samples.\""} 8 | {"instruction": "Given a list of restaurants and their ratings, sort the restaurants by their ratings.", "input": "[['Mangia'], ['Barbie'], ['Taco Bell'], ['Subway'], ['The Cheesecake Factory']]", "output": "['Taco Bell', 'Mangia', 'Subway', 'Barbie', 'The Cheesecake Factory']"} 9 | {"instruction": "Write the summary of the given article.", "input": "\"I think we're going to be OK\" says the co-founder of the popular travel site. \"This is the first time where things are going to be bad for a while.\"", "output": "\"I think we're going to be OK\" says the co-founder of the popular travel site. \"This is the first time where things are going to be bad for a while.\""} 10 | {"instruction": "Given a list of numbers, find the biggest number.", "input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", "output": "10"} 11 | {"instruction": "Given a question-answer pair, generate a new question-answer pair based on the old question-answer pair.", "input": "Question: \"What is the capital of the US?\" Answer: \"Washington\"", "output": "Question: \"What is the capital of Canada?\" Answer: \"Ottawa\""} 12 | {"instruction": "Write an email to request a meeting with the professor based on the given information.", "input": "Dear Professor, I am a PhD candidate in your lab. I would like to discuss my PhD proposal with you. Can we have a meeting on Monday?", "output": "Dear Professor, I am a PhD candidate in your lab. I would like to discuss my PhD proposal with you. Can we have a meeting on Monday?"} 13 | {"instruction": "Summarize the following paragraph, and provide the summary as the output.", "input": "\u201cSailing has always been an important part of my life,\u201d said Mark Reynolds, a British sailor who is a multiple times world champion. \u201cI got into sailing by mistake, because my dad was trying to learn how to sail and we went out in an old wooden boat and he didn\u2019t know how to sail. I would say that my love for sailing really stemmed from that experience.\u201d Reynolds competed in the 1996 Olympic Games in Atlanta and is a 5-time world champion in the \u201cStar\u201d class of boat. Mark Reynolds is now the president of the British Sailing Team.", "output": "Sailing has always been an important part of my life, said Mark Reynolds, a British sailor who is a multiple times world champion. I got into sailing by mistake, because my dad was trying to learn how to sail and we went out in an old wooden boat and he didn't know how to sail. I would say that my love for sailing really stemmed from that experience."} 14 | {"instruction": "Generate an appropriate response to the given comment.", "input": "I love the game.", "output": "Thanks!"} 15 | {"instruction": "Complete the lyrics of the given song.", "input": "I am the Walrus (Walrus, I am the walrus)", "output": "I am the Eggman (Eggman, I am the Eggman)"} 16 | {"instruction": "Given a sentence, find the subject and verb.", "input": "This is a random sentence.", "output": "The subject is \"This\". The verb is \"is\"."} 17 | {"instruction": "Given a sentence, tell me if it is a question. If it is, answer it.", "input": "Is this a question?", "output": "Yes, it is."} 18 | {"instruction": "Given a list of items (of a certain type), determine if a given item is in the list. The list is not sorted.", "input": "The list: apple, banana, orange. The item: orange", "output": "The item is in the list."} 19 | {"instruction": "Given a product name, return the list of related product names.", "input": "Tesla", "output": "Tesla Model S, Tesla Model X, Tesla Model Y, Tesla Cybertruck, Tesla Roadster, Tesla Solar Roof, Tesla Powerwall, Tesla Powerpack"} 20 | {"instruction": "Write a recipe for the following dish.", "input": "This is a recipe for a chicken noodle soup..", "output": "Ingredients: 1-2 chicken breast, 1-2 chicken thighs, 1 carrot, 1-2 tablespoon of soy sauce, 1-2 tablespoon of salt, 1-2 tablespoon of pepper, 2-3 garlic, 1-2 medium potatoes, 1 pack of egg noodles."} 21 | {"instruction": "Identify the main idea in the article.", "input": "In the U.S., more than 2 million people have been infected with the coronavirus and over 111,000 have died. The latest:", "output": "The latest:"} 22 | {"instruction": "The following are the steps to a recipe. Make sure you follow the recipe in the order given.", "input": "Steps: 1. Add the flour, sugar, butter, and eggs to a large bowl. 2. Mix the ingredients together until they form a thick dough. 3. Roll the dough out on a floured surface until it is about 1/2 inch thick. 4. Cut the dough into 2-inch squares. 5. Place the squares on a baking sheet and bake in a preheated oven for 10-12 minutes, until the edges start to brown. 6. Remove from the oven and let cool before serving.", "output": "Step 5"} 23 | {"instruction": "Write a short essay on the given topic.", "input": "Do you think AI is a threat to humanity?", "output": "(This question is asking for your opinion.)"} 24 | {"instruction": "Make a list of possible names for the entity, based on the description.", "input": "The name of the place is unknown.", "output": "[unknown, unknown place]"} 25 | {"instruction": "Given a list of tasks, tell me which task should be done first.", "input": "Write a story. Write a poem. Write a book. Write a paper.", "output": "Write a story."} 26 | {"instruction": "Given a number, count the total number of digits in the number.", "input": "10, 10.9, 102.05, 10.005, 10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9.10.9", "output": "9"} 27 | {"instruction": "Summarize the article.", "input": "The U.S. economy will grow at a faster pace next year than previously expected, as the country's central bank is set to raise interest rates at a faster pace over the next two years, according to new projections released Wednesday. The Federal Reserve's updated projections show that the economy will expand at a 3.4% pace in 2019, up from its previous forecast of 3.1%. The central bank also said it expects the unemployment rate to fall to 3.5% by the end of next year, down from 4.1% now. The central bank's 17 policymakers also raised their economic growth expectations for 2020 to 3.2% from 3.1% previously.", "output": "The US economy will grow at a faster pace next year than previously expected, as the country\u2019s central bank is set to raise interest rates at a faster pace over the next two years, according to new projections released on Wednesday. The Federal Reserve\u2019s updated projections show that the economy will expand at a 3.4% pace in 2019, up from its previous forecast of 3.1%."} 28 | {"instruction": "Correct and polish the sentence grammatically.", "input": "\"My, this is a large and pleasant room.\"", "output": "\"This is a large and pleasant room.\""} 29 | {"instruction": "Given the following paragraph, tell me the first sentence that mentions the following terms.", "input": "The number of companies that have hit the $1 trillion valuation mark is increasing, and so too is the number of countries that have a trillion-dollar company.", "output": "a trillion-dollar company"} 30 | {"instruction": "Translate the sentence into another language.", "input": "This is a random sentence. 4", "output": "T\u00e0i l\u1ed9c m\u1ed9t c\u00e2u l\u1ea1c l\u1ed9."} 31 | {"instruction": "List all the names of authors that have been mentioned in the article.", "input": "If you've ever been to a big bookstore, you may have noticed that most of the books are written by white people. But there are some exceptions. For instance, there's a growing number of books written by people of color. In fact, about 40 percent of all books published in the U.S. in 2017 were written by people of color.", "output": "{\"Marlon James\", \"Chimamanda Ngozi Adichie\", \"NoViolet Bulawayo\", \"Yaa Gyasi\", \"Tayari Jones\"}"} 32 | {"instruction": "Tell me if the following statement is true.", "input": "2 + 2 = 4", "output": "True"} 33 | {"instruction": "Given the context in the title, what should be the title of the article?", "input": "This is the title of the article.", "output": "This is the title of the article."} 34 | {"instruction": "Given an email and some facts, find out who the sender is. Output the name.", "input": "[(\"Michael\", \"Mike\"), (\"Peter\", \"Pete\"), (\"Sam\", \"Sammy\")]", "output": "Sam"} 35 | {"instruction": "Given the input, summarize the main points.", "input": "\"The New York City Department of Education (NYCDOE) is the largest system of schools in the United States, serving 1.1 million students in more than 1,800 schools.\"", "output": "NYCDOE is the largest system of schools in the US."} 36 | {"instruction": "Identify if the following is a logical argument. If so, identify the conclusion.", "input": "All mammals are animals. All animals are alive. Therefore, all mammals are alive.", "output": "True"} 37 | {"instruction": "Given a sentence, pick a random word in it, and replace it with a synonym.", "input": "This is a random sentence.", "output": "This is a random sentence."} 38 | {"instruction": "Find the next number in the sequence.", "input": "1 2 3 5 8 13 21 34", "output": "34"} 39 | {"instruction": "Given the problem, do some basic research to find the answer.", "input": "What is the answer to the question 'What is the answer to the question?' ?", "output": "42"} 40 | {"instruction": "Given a sentence, extract the following information: (1) the name of a person, (2) the name of a company, (3) the name of a country, (4) the name of a city, (5) the name of a month, (6) the name of a day.", "input": "This is a random sentence.", "output": "(1) This, (2) This, (3) This, (4) This, (5) This, (6) This"} 41 | {"instruction": "Given a sentence, add a comment to explain the meaning of the sentence.", "input": "The patient is in a coma.", "output": "The patient is in a state of unconsciousness that can be woken up with the right treatment."} 42 | {"instruction": "Analyze the content of the article and determine the author's point of view.", "input": "In \"The Great Gatsby,\" what is the theme of the book and who is the narrator?", "output": "The overall theme of the book is a warning about the consequences of materialism and carelessness. Nick is the narrator of the book."} 43 | {"instruction": "Give me a list of synonyms for the word 'awesome'.", "input": "awesome", "output": "cool, amazing, wonderful, beautiful, terrific, good, great, outstanding, magnificent, marvelous, incredible, astonishing, amazing, awesome, fantastic, terrific, wonderful, splendid, splendid, awesome, awesome, beautiful, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable, unbelievable,"} 44 | {"instruction": "Write an essay on this topic.", "input": "An article about a company.", "output": "An essay on the given topic."} 45 | {"instruction": "Explain the following phenomenon. You can add any facts or examples that are relevant.", "input": "If a new technology is released, its price is always expensive at the beginning.", "output": "The price of new technology is always expensive at the beginning because there is low supply and high demand."} 46 | {"instruction": "What would be a good headline for this article?", "input": "The U.S. economy lost 140,000 jobs in December, as the labor market continued to reel from the coronavirus pandemic. The unemployment rate fell to 6.7%, but that was due to the labor force shrinking by 199,000.", "output": "The U.S. Economy Loses 140,000 Jobs In December Amid Pandemic."} 47 | {"instruction": "Given a list of items, tell me if the given item is on the list.", "input": "List: a, b, c, d, e, f", "output": "True"} 48 | {"instruction": "Come up with a list of names for the given person.", "input": "John", "output": "Jack, Johnny, Johny, Jon, Jonathan, etc."} 49 | {"instruction": "Write a summary of the article. You can add your opinion.", "input": "The 2020 United States presidential election was the 59th quadrennial United States presidential election. It was held on Tuesday, November 3, 2020. Donald Trump, the incumbent president and the Republican nominee, was running for reelection to a second term. Democrat Joe Biden, the former vice president, was the Democratic nominee. The Democratic Party also nominated vice presidential candidate Kamala Harris, the U.S. senator from California, to be vice president. Trump and Biden were the oldest candidates ever to compete in a U.S. presidential election, at age 74 and 77, respectively. Biden became president-elect after defeating Trump in the electoral college.", "output": "The 2020 United States presidential election was the 59th quadrennial United States presidential election. It was held on Tuesday, November 3, 2020. Joe Biden, the Democratic nominee, was running against incumbent Donald Trump for the office of president. Biden and running mate Kamala Harris won the election. Joe Biden became the 46th President of the United States and Kamala Harris became the Vice President of the country."} 50 | {"instruction": "Given the context, find the most appropriate person to introduce.", "input": "This is a random sentence. 4", "output": "random"} 51 | {"instruction": "The following query contains some errors. Explain what these errors are and fix them.", "input": "SELECT * FROM \"table\" WHERE \"column\" LIKE '%t%' AND \"column\" LIKE '%2'", "output": "The string \"%t%\" is missing a closing quote. Also, the correct LIKE statement is \"column\" LIKE '%t%'."} 52 | {"instruction": "Generate a summary on the following passage.", "input": "The American Museum of Natural History in New York has a new permanent exhibition: \"The Power of Poison.\"", "output": "The American Museum of Natural History in New York has a new permanent exhibition."} 53 | {"instruction": "Write a report on the following incident.", "input": "According to the report, a 35-year-old man was arrested after he was accused of punching a 7-year-old boy in the face. The man was at the park with his 3-year-old daughter when she was playing on the slide. The man then pulled her off the slide when the boy said to him he should let her play. The incident was caught on camera and was uploaded to Twitter. The video shows the man punching the boy in the face. The boy was left with a black eye and a swollen cheek. The 35-year-old man was seen running away from the park after hitting the child. He was later arrested and charged with hit and run. The boy's mother stated that she had to take her son to the hospital for a CT scan and X-ray. The mother also stated \"I'm glad he is alive.\"", "output": "The 35-year-old man was arrested after he was accused of punching a 7-year-old boy in the face."} 54 | {"instruction": "Given a paragraph, identify the main points and the supporting points.", "input": "The United States is a federal republic with a presidential system of government. The head of state and head of government is the President. The executive power is vested in the President, who acts as the head of the executive branch that includes the Cabinet. The legislative branch consists of the bicameral Congress, which consists of the House of Representatives and the Senate. The judicial branch consists of the Supreme Court and lower federal courts.", "output": "The United States is a federal republic with a presidential system of government. The executive power is vested in the President, who acts as the head of the executive branch that includes the Cabinet. The legislative branch consists of the bicameral Congress, which consists of the House of Representatives and the Senate. The judicial branch consists of the Supreme Court and lower federal courts."} 55 | {"instruction": "Generate a response to a given email.", "input": "Hi, I am having trouble logging in. Can you reset my password?", "output": "Dear Sir,"} 56 | {"instruction": "Given a news article, output the news source.", "input": "A gunman used a rifle to kill 19 children and two teachers at a Texas elementary school on Tuesday in the latest mass shooting at a U.S. school, the state's governor said. The attacker, who was killed by law enforcement, stormed the Uvalde school with a handgun and a rifle, Governor Greg Abbott said in a statement.", "output": "CNN"} 57 | {"instruction": "Write a short introduction to the following product.", "input": "[{'name': 'iPhone', 'price': '1999.00', 'description': 'This is a mobile phone.'},{'name': 'Samsung', 'price': '1999.00', 'description': 'This is a mobile phone.'},{'name': 'Nokia', 'price': '1999.00', 'description': 'This is a mobile phone.'}]", "output": "[{'name': 'iPhone', 'price': '1999.00', 'description': 'This is a mobile phone.'},{'name': 'Samsung', 'price': '1999.00', 'description': 'This is a mobile phone.'},{'name': 'Nokia', 'price': '1999.00', 'description': 'This is a mobile phone.'}]"} 58 | {"instruction": "Given the input, output the output.", "input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", "output": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"} 59 | {"instruction": "Given the following information, predict the value of y.", "input": "x = 2; y = 4; z = 3", "output": "7"} 60 | {"instruction": "Use the knowledge of the story to answer the question.", "input": "Story: In a village, one day a man was walking and he saw a dog with a bone in his mouth. He wanted to take the bone from the dog and asked the dog to give the bone to him but the dog refused. So, he tried to take the bone out of the dog's mouth, then the dog bit him and he lost his finger. He ran to the doctor and the doctor said that he cannot do anything about this. He lost his finger. Question: What is the moral of the story?", "output": "The moral of the story is that in life, you will face many challenges and not all of them will have good outcomes."} 61 | {"instruction": "Write a dialogue between the user and the salesperson.", "input": "Hello, I would like to buy a gift for my friend.", "output": "Hi! How may I help you?"} 62 | {"instruction": "Write a function that takes in a string and tell whether it is a palindrome.", "input": "ABCD", "output": "true"} 63 | {"instruction": "Generate a news article using the following text.", "input": "This is a sample news article.", "output": "This is a sample news article."} 64 | {"instruction": "Given the problem, identify the important information that I should know.", "input": "What is the solution for this math problem? 4 + 6 = ?", "output": "The solution is 10."} 65 | {"instruction": "Write a paragraph to describe your thoughts of the following news.", "input": "(A) The most powerful earthquake ever recorded in New Zealand, a 7.8-magnitude quake, has struck near the city of Christchurch on the country's South Island. (B) The quake, which struck at 12:02 p.m. local time, was 16.1 miles (26 kilometers) deep, the United States Geological Survey said. (C) The quake struck on the edge of the Pacific Ocean and was followed by 5,000 aftershocks, including a 6.0-magnitude temblor, which struck Sunday afternoon about 60 miles (100 kilometers) from the city. (D) The earthquake struck near the city of Christchurch, which is still recovering from a devastating 6.3-magnitude quake that hit the city in 2011, killing 185 people. (E) An estimated 1,300 residents spent Saturday night in emergency shelters, and Christchurch Mayor Bob Parker told Radio New Zealand that the impact of the quake would not be clear before daybreak. (F) \"It's too early to tell what the impact will be,\" he said. \"It's far too early to tell what the impact will be.\" (G) The earthquake was felt as far away as Wellington, 200 miles (320 kilometers) away. (H) \"The quake was not just a Christchurch event. It was felt as far away as Wellington, 200 miles (320 kilometers) away.\"", "output": "The paragraph should describe your thoughts of the following news."} 66 | {"instruction": "Generate a description for a given photo.", "input": "", "output": "A man with a black jacket, blue jeans and black shoes."} 67 | {"instruction": "Given a sentence, rewrite it without using the given word.", "input": "This is a random sentence.", "output": "This is a random sentence."} 68 | {"instruction": "Provide a one-sentence summary for each paragraph.", "input": "In this article, we consider the role of the Internet in shaping and maintaining the public sphere. We argue that the Internet, by its very nature, is not structured in a way that supports the public sphere and, in fact, undermines it in a number of ways. The Internet is a medium of individualism. This is because it is based on individual choice, rather than on a shared common ground, such as a newspaper.", "output": "In this article, we consider the role of the Internet in shaping and maintaining the public sphere. We argue that the Internet, by its very nature, is not structured in a way that supports the public sphere and, in fact, undermines it in a number of ways. The Internet is a medium of individualism. This is because it is based on individual choice, rather than on a shared common ground, such as a newspaper."} 69 | {"instruction": "Given a string, output the longest palindrome that can be formed from that string.", "input": "abcba", "output": "aabbcc"} 70 | {"instruction": "Generate a new sentence that includes the four given words.", "input": "This is a test. Apple, Banana, Orange, Mango", "output": "This is a test. Apple, Banana, Orange, Mango"} 71 | {"instruction": "Given a list of words, classify them based on their part of speech.", "input": "The list of words: [good, run, fast, slow, jump, high, low, long, short, black, white, red, blue, green, yellow]", "output": "Adjectives: good, fast, slow, short, black, white, red, blue, green, yellow. Nouns: run, jump, high, low, long. Verbs: run, jump, high, low, long, fast, slow, good, red, blue, green, yellow."} 72 | {"instruction": "Given a news article, tell me if it is credible or not.", "input": "The United States military said it has started the process of withdrawing from Afghanistan after a 20-year war that cost the lives of 2,461 American service members and hundreds of thousands of Afghans.", "output": "The article is credible."} 73 | -------------------------------------------------------------------------------- /sample/openei.o_samples.jsonl: -------------------------------------------------------------------------------- 1 | {"instruction": "What are the best exercises you can do with a kettlebell?", "input": "", "output": "Goblet squat: The goblet squat is a great exercise for beginners to learn proper squat technique. The goblet squat is a great exercise for beginners to learn proper squat technique. It\u2019s also a good exercise for experienced lifters."} 2 | {"instruction": "Write a blog post about your favorite YouTube channel.", "input": "", "output": "My favorite YouTube channel is the \"Vsauce\" channel. Vsauce is a YouTube channel that features Michael Stevens, a science communicator and educator, discussing a variety of scientific topics and concepts in an entertaining and informative way. The channel has over 9 million subscribers and has been viewed over 1.3 billion times. Vsauce is a great channel for anyone who wants to learn more about science and how the world around us works. The videos are typically very well-produced and the topics are always interesting. I would highly recommend checking out the Vsauce channel if you're looking for some great science content to watch."} 3 | {"instruction": "Write a short story that begins with the following, \"The wind was blowing and the rain falling, but still I managed to light a fire...\"", "input": "", "output": "The wind was blowing and the rain falling, but still I managed to light a fire. It was a tough job, but I was determined to succeed. I had to get this fire going to keep myself warm and dry. Finally, after a lot of effort, I managed to get the fire going. I felt a sense of satisfaction as I saw the flames licking at the dry wood. I sat down next to the fire and felt the warmth of the flames on my face. The rain was still falling, but I didn't care. I was warm and dry, and that was all that mattered."} 4 | {"instruction": "Write a short story about a woman who is married to a man who has a big penis.", "input": "", "output": "

She was a beautiful woman, but she had been married several times. Her latest husband was a man she had known for many years. He was a nice man, but he had a big penis. One day, she went to the doctor and told him about her husband's penis. The doctor said, \"I can't do anything about it. It's too big. You'll have to learn to live with it.\"

"} 5 | {"instruction": "What are your three best tips for getting up in the morning?", "input": "", "output": "1. Don't snooze your alarm. 2. Don't use your phone as alarm. 3. Drink a glass of water after waking up."} 6 | {"instruction": "What is the best way to build a computer?", "input": "", "output": "There are many ways to build a computer. The best way to build a computer depends on the user's needs and budget. For example, if the user wants a high-end gaming computer, they might want to invest in a powerful processor and graphics card. If the user is on a budget, they might want to invest in a less powerful processor and graphics card. There are many websites and forums that can help the user choose the best parts for their needs. The user can also ask for advice from friends or family who have built computers before."} 7 | {"instruction": "Write a short story that begins with the following, \"I was walking down the street and I saw a man...\"", "input": "", "output": "I was walking down the street and I saw a man with a gun. I was scared, but I didn't want to be rude, so I nodded at him and said, \"Hi.\" He nodded back and said, \"Hi.\" I kept walking. I was scared, but I didn't want to be rude, so I nodded at him and said, \"Hi.\" He nodded back and said, \"Hi.\" I kept walking."} 8 | {"instruction": "What are the best tips you have for students who want to learn more about their field of study?", "input": "", "output": "1. Ask questions in class: If you are not sure, ask your teachers, friends, or others in your field. You can even go online to find out more. 2. Learn from others: Read books, watch videos, and listen to podcasts about your field. You can also find articles and blogs online that can give you insights into specific aspects of your field. 3. Join a club or organization: This is a great way to meet others who are interested in the same things as you are. You can also network with people who are already working in your field. 4. Do an internship: This is a great way to get experience in your field and see what it is like first-hand. You can also volunteer at places that are related to your field. 5. Shadow someone: This is a great way to learn more about your field and see what it is like to work in that field. You can also ask people who are already working in your field to shadow them for a day or two."} 9 | {"instruction": "How do you think the world will be like in 20 years?", "input": "", "output": "In the next 20 years, I think the world will be like this:"} 10 | {"instruction": "How would you explain a computer to someone who has no idea what a computer is?", "input": "", "output": "Computers are devices that are used to store, process, and retrieve information. There are many different types of computers, but they all essentially work the same way. A computer has a central processing unit (CPU), which is responsible for running programs and performing calculations. The CPU is connected to memory and storage devices, which store data and programs. Input devices, such as keyboards and mice, allow users to interact with the computer. Output devices, such as monitors and printers, display information that has been processed by the computer. Computer networks allow computers to communicate with each other."} 11 | {"instruction": "What are the best ways to improve your writing skills?", "input": "", "output": "1. Keep a journal - Journalling is a great way to practice your writing skills. You can use a diary or a notebook to write down your thoughts and ideas. 2. Read books - Reading is an excellent way to improve your writing skills. By reading a variety of books, you will learn new vocabulary and improve your grammar. 3. Join a writing group - Joining a writing group is a great way to get feedback on your writing. You can also learn new techniques from other writers in the group. 4. Take a course - There are many writing courses available online and in person. These courses can teach you how to write better and improve your skills. 5. Practice makes perfect - The best way to improve your writing is to practice. Set aside time each day to write and you will soon see improvement in your skills."} 12 | {"instruction": "What are some ways to make a boring day interesting?", "input": "", "output": "1. You can make a boring day interesting by doing something fun like going to the mall, watching a movie, or going out to eat. 2. You can also make a boring day interesting by doing something productive like cleaning your room, doing homework, or exercising. 3. You can also make a boring day interesting by finding something new to do like exploring a new place, learning a new skill, or meeting new people. 4. You can also make a boring day interesting by changing your perspective on the day. For example, you could look at the day as an opportunity to relax and recharge, or an opportunity to learn something new. 5. Finally, you can make a boring day interesting by finding ways to make the day more memorable. For example, you could take photos, write in a journal, or create a scrapbook."} 13 | {"instruction": "If you had a chance to ask your favorite author one question, what would it be?", "input": "", "output": "I'd ask him what his favorite book was."} 14 | {"instruction": "Write a short story about a man who takes a nap.", "input": "", "output": "The man takes a nap in the afternoon and wakes up to find himself in a strange dimension, where time flows in reverse. As he walks out of his house, he sees a man walking into his house. The man sees his car driving back to his garage and is surprised. The man sees his wife leaving the house and entering the house. The man walks into a store and sees a clerk putting items onto a shelf. The man walks out of the store and sees the clerk taking items from the shelf. The man sees a truck drive down the street and unload items onto the sidewalk. The man sees a man push a cart and put all the items back on the truck. The man sees a truck drive down the street and unload the items from the sidewalk back onto the truck. The man sees the truck drive down the street and deliver the items to the store. The man sees the clerk put the items onto the shelf. The man sees a customer walk into the store and take items from the shelf. The man sees the customer walk out of the store and put the items into his car. The man sees the customer drive away from the house and put things into his garage. The man sees the customer walk into his house and close the door. The man sees the same customer walk out of his house and drive back to the store. The man sees the clerk walk out of the store and get into his car and drive away. The man sees the clerk walk into his house and enter the garage. The man sees the clerk walk out of his house and walk back to his car. The man sees the clerk drive away from the house and drive into his garage. The man sees the clerk walk out of his garage and walk into his house. The man sees the clerk walk back to his house and drive away. The man sees the clerk get out of his car and walk into his house. The man sees the clerk walk out of his house and drive away. The man sees the clerk walk in the store and buy a drink and a sandwich. The man sees the clerk walk out of the store and walk into his car and drive back to his house. The man sees the clerk walk out of his house and drive into his garage. The man sees the clerk walk out of his garage and get into his car and drive away. The man sees the clerk drive out of the house and gets into his car and drive back into the store. The man sees the clerk walk out of the store and walk into his car and drive away."} 15 | {"instruction": "What are some of the things you like about your job?", "input": "", "output": "The benefits of my job are that I get to work with a great team. I also enjoy the variety of tasks I am given. I also enjoy learning new things and working on interesting projects."} 16 | {"instruction": "What are some interesting facts about the English language?", "input": "", "output": "There are about 170,000 English words and 1 million of its compounds. All of the above are used in various combinations. There are more than 100,000 words in the English language. The language is spoken by more than 350 million people and is the international language of business, science, aviation, politics, and the media. English is the official language of 50 countries. English is the first language of 375 million people. It is the second language of another 375 million. English is the third language of another 375 million. That's a total of 1.125 billion people whose first, second, or third language is English."} 17 | {"instruction": "Come up with a quick morning routine that you can do in 5-10 minutes.", "input": "", "output": "1. Wake up early and have a glass of lemon water. 2. Take a shower. 3. Do some yoga. 4. Meditate. 5. Read a chapter from a book. 6. Write in a journal. 7. Walk or run for 30 minutes."} 18 | {"instruction": "What is the difference between a computer\u2019s RAM and its CPU?", "input": "", "output": "RAM is where data is stored when the computer is running. CPU is where the computer processes data."} 19 | {"instruction": "Write a short story about someone finding a lost item.", "input": "", "output": "I was walking home when I saw a watch. When I picked it up, I saw the name \"Doe\" on it. I thought, \"This must be the Doe family's watch.\" I ran home, found the number, and called the Doe family. They were so happy to get it back. I was happy to help."} 20 | {"instruction": "What is the best way to learn how to code? What is the best way to learn how to program?", "input": "", "output": "The best way to learn how to code is to start by learning HTML. HTML is the language of the web, and all web pages are written in this language. Once you've mastered HTML, you can move on to other languages like CSS and JavaScript. There are many resources online that can help you learn how to code. A good place to start is the website w3schools.com. This website has a wealth of information about HTML, CSS, and JavaScript. And don't forget to practice! The only way to get better at coding is to actually write code. So start by building a simple web page and then work your way up to more complex projects."} 21 | {"instruction": "What is the difference between a dog and a cat?", "input": "", "output": "Cats are carnivores, meaning they only eat meat. On the other hand, dogs are omnivores, which is why they can eat both meat and vegetables."} 22 | {"instruction": "Which is the best place to go for a relaxing holiday?", "input": "", "output": "When I was a kid, I used to go to the beach with my parents. We would go swimming, build sandcastles, and have picnics. The beach is still my favorite place to go for a relaxing holiday. I love the sound of the waves crashing on the shore and the feeling of the sand between my toes. I also love to watch the sunset over the water. There is something so peaceful about being at the beach. I always feel like I am on vacation when I am there."} 23 | {"instruction": "Create a comic strip about a day in the life of your favorite teacher.", "input": "", "output": "The comic strip would be about the day in the life of a teacher. The teacher is sitting at their desk, grading papers. They are tired and frustrated. The teacher has been grading papers all day and has a stack of them still left to grade. The teacher looks up at the clock and sees that it is 3:00 PM. The teacher sighs and gets up from their desk. The teacher walks out of the room and down the hall. They see a student in the hallway and say, \"Hi, how are you?\" The student says, \"I'm fine. How are you?\" The teacher says, \"I'm tired and frustrated.\" The student says, \"Oh, I'm sorry to hear that. I'm sorry that you're tired and frustrated.\" The teacher says, \"Thank you.\" The teacher walks away and the student says, \"Have a good day.\" The teacher says, \"Thank you. You too.\" The teacher walks back into their room and sits down at their desk. They look at the clock and see that it is 3:30 PM. The teacher sighs and gets up from their desk. They walk out of the room and down the hall. They see another student in the hallway and say, \"Hi, how are you?\" The student says, \"I'm fine. How are you?\" The teacher says, \"I'm tired and frustrated.\" The student says, \"Oh, I'm sorry to hear that. I'm sorry that you're tired and frustrated.\" The teacher says, \"Thank you.\" The teacher walks away and the student says, \"Have a good day.\" The teacher says, \"Thank you. You too.\" The teacher walks back into their room and sits down at their desk. They look at the clock and see that it is 4:00 PM. The teacher sighs and gets up from their desk. The teacher walks out of the room and down the hall. They see another student in the hallway and says, \"Hi, how are you?\" The student says, \"I'm fine. How are you?\" The teacher says, \"I'm tired and frustrated.\" The student says, \"Oh, I'm sorry to hear that. I'm sorry that you're tired and frustrated.\" The teacher says, \"Thank you.\" The teacher walks away and the student says"} 24 | {"instruction": "How will the world be different in 20 years?", "input": "", "output": "In 20 years, the world will be different in a number of ways. First, technology will have progressed significantly, making our lives easier and more efficient. Second, climate change will have begun to take a serious toll on the planet, causing widespread devastation. Finally, the global economy will be much larger, and more people will be able to afford a higher standard of living."} 25 | {"instruction": "What is a good way to keep track of your progress?", "input": "", "output": "Keeping track of your progress is a great way to stay motivated and see how far you\u2019ve come. There are many different ways to do this, but some effective methods include keeping a journal, setting goals, and using tracking apps."} 26 | {"instruction": "What is your best advice for someone who wants to start a blog?", "input": "", "output": "I think that the most important thing to keep in mind when starting a blog is that you need to be passionate about the topic you're writing about. If you're not interested in what you're writing about, it's going to be hard to keep up with it. For example, I had a blog about running for a while, but I ended up stopping because I wasn't as interested in running as I used to be. If you're not interested in what you're writing about, it's going to be hard to keep up with it."} 27 | {"instruction": "What are some things that make you feel happy?", "input": "", "output": "- Spending time with my family. - Going outside on a sunny day. - Watching funny movies or videos. - Listening to music. - Going for a walk or jog. - Reading a good book. - Petting my dog. - Getting a good night's sleep. - Eating a piece of chocolate. - Doing something nice for someone else."} 28 | {"instruction": "Write a script in JavaScript for creating random numbers between 1-50.", "input": "", "output": "var random = Math.floor(Math.random() * 50) + 1;"} 29 | {"instruction": "What are some ways to improve your sleep?", "input": "", "output": "- Create a relaxing bedtime routine. - Avoid using electronics at bedtime. - Get some exercise during the day. - Avoid alcohol and caffeine before bed. - Don't eat a big meal right before bed. - Make sure your bedroom is dark and quiet. - Take a warm bath before bed. - Go to bed at the same time every night. - Get out of bed if you can't sleep."} 30 | {"instruction": "What\u2019s the best way to get a job in the gaming industry?", "input": "", "output": "The best way is to follow your passion. If you love games, then make or mod games. Build a portfolio, and start showing it off. Build a community, and gain recognition for your work. Once people know who you are and what you're capable of, you'll be able to find a job in the industry."} 31 | {"instruction": "What would you do to help a student who is struggling in school?", "input": "", "output": "One of the things I would do to help a student who is struggling in school is to offer to tutor them after school. I've done this before and it has really helped the student improve their grades."} 32 | {"instruction": "What is the best way to learn another language?", "input": "", "output": "1. Find a language partner."} 33 | {"instruction": "What would a planet be like if we were all made out of jello?", "input": "", "output": "If we were made out of jello, we would be a lot softer than we are now. This would make it easier to get around and do things like walk or run. We would also be a lot more squishy, which would be great for cuddling. However, there are some downsides to being made out of jello. For one, we would be a lot more fragile than we are now. This would make it easier to break bones or get hurt in general. We would also be a lot more susceptible to heat, which could be dangerous in hot climates. Overall, being made out of jello would have its pros and cons."} 34 | {"instruction": "What is the most expensive item you have bought?", "input": "", "output": "I bought a car."} 35 | {"instruction": "What is your favorite movie and why?", "input": "", "output": "My favorite movie is \"Titanic\". It is a tragic love story that happened in the past. It touches me a lot and makes me realize that we may not have too much time to love each other. We should cherish the time we have and don't be afraid of being hurt because when we fall in love, we have to be ready to be hurt and to hurt others."} 36 | {"instruction": "How can I learn to appreciate food more?", "input": "", "output": "Some ways to appreciate food more are to take more time to enjoy your meals, cook more, eat with others, and be in the moment while eating."} 37 | {"instruction": "What are the best snacks I can eat to build muscle?", "input": "", "output": "Good snacks for building muscle include rice cakes with peanut butter, apples with nut butter, Greek yogurt with fruit, or a shake made with protein powder and fruit."} 38 | {"instruction": "How can you improve your writing?", "input": "", "output": "- Write, write, write! - Read, read, read! If you want to become a better writer, you have to write a lot. It's as simple as that. You can't make yourself into a great writer by just reading, though that is important, too. - Do research. - Read like a writer. - Practice different types of writing. - Get feedback from others."} 39 | {"instruction": "Is there a difference between a computer\u2019s CPU and its microprocessor?", "input": "", "output": "No, a CPU is a microprocessor."} 40 | {"instruction": "What do you think is the best way to learn about a new topic?", "input": "", "output": "I think the best way to learn about a new topic is to read about it in a book or on the internet, and then discuss it with friends and family."} 41 | {"instruction": "Write a blog post about the best way to study for an exam.", "input": "", "output": "The best way to study for an exam is to make a study plan and stick with it. Start by familiarizing yourself with the material and making sure you understand the concepts. Next, make a schedule and set aside time for studying. Finally, use effective study methods such as flashcards, practice tests, and mnemonics. By following these tips, you can ensure that you are well-prepared for your exam."} 42 | {"instruction": "What are the top 5 things in your life that you would like to change?", "input": "", "output": "1. I want to find a job that I like. 2. I want to learn more about coding. 3. I want to lose some weight. 4. I want to find a better place to live. 5. I want to save more money."} 43 | {"instruction": "What is the best way to get rid of mosquitoes?", "input": "", "output": "Mosquitoes are attracted to the carbon dioxide in our breath. Exhaling more carbon dioxide than usual, will attract more mosquitoes."} 44 | {"instruction": "What is the most exciting thing about this year?", "input": "", "output": "The most exciting thing about this year is that I am going to graduate from college with a degree in business administration."} 45 | {"instruction": "What is the best way to take notes?", "input": "", "output": "Use a 3x5 index card and write down only the most important facts."} 46 | {"instruction": "Write a C program for FizzBuzz.", "input": "", "output": "#include int main() { for (int i = 1; i <= 100; i++) { if (i % 15 == 0) printf(\"FizzBuzz\"); if (i % 3 == 0) printf(\"Fizz\"); if (i % 5 == 0) printf(\"Buzz\"); else printf(\"%d\", i); printf(\"\\n\"); } return 0; }"} 47 | {"instruction": "What is the best way to start a conversation with a stranger?", "input": "", "output": "\"I'm not sure what the best way to start a conversation with a stranger is, but one thing that I've found helpful is to ask questions. People generally like to talk about themselves, so asking someone about their hobbies, interests, or what they do for a living can be a good way to get the ball rolling.\""} 48 | {"instruction": "What is the best way to improve your memory?", "input": "", "output": "The best way to improve your memory is to use it more. You can exercise your memory by playing memory games, doing puzzles, or even by simply trying to remember new things. The more you use your memory, the stronger it will become."} 49 | {"instruction": "What are the best tips for staying happy and healthy?", "input": "", "output": "Here are some tips for staying happy and healthy: 1. Get enough sleep. 2. Eat healthy foods. 3. Exercise regularly. 4. Take time to relax. 5. Connect with others. 6. Do something you enjoy. 7. Be grateful. 8. Be kind to yourself. 9. Have a sense of purpose. 10. Have a positive attitude."} 50 | {"instruction": "Who is your hero? Why?", "input": "", "output": "My hero is my mother. She is a strong, confident woman who always pushes herself to be the best version of herself. She is my role model and I hope to be like her one day."} 51 | {"instruction": "What new skill will you learn this year?", "input": "", "output": "I will learn how to play the piano."} 52 | {"instruction": "What is your favorite joke?", "input": "", "output": "What is the difference between a piano and a fish? You can tune a piano but you can't tuna fish."} 53 | {"instruction": "What is your favorite meal you\u2019ve ever eaten?", "input": "", "output": "My favorite meal is my mother's cooking."} 54 | {"instruction": "Write a creative ending for a horror movie.", "input": "", "output": "A horror movie is a frightening film whose purpose is to evoke feelings of fear, terror, and revulsion through the masterful use of tension, sound, surprise, and other cinematic techniques. Horror films often feature ghost, vampires, werewolves, zombies, cannibals, serial killers, evil children, demons and other monsters. The films feature protagonists who are typically ordinary people who find themselves in extraordinary circumstances. Here are some examples of some good horror movie endings. In one movie, the main character is fighting an evil spirit. He is chased but manages to escape. The spirit's head is chopped off, but it survives. In another movie, the main character is fighting an evil spirit that wants to kill him. He tries to run away, but the spirit follows him. He manages to escape but is killed in a car accident. The spirit survives and kills the main character's family. In the last movie, the main character is fighting an evil spirit that wants to kill him. He tries to run away, but the spirit follows him. He manages to escape but is killed in a car accident. The spirit survives and kills the main character's family."} 55 | {"instruction": "Imagine that you are a teacher and you want to make your own textbook. What topics would you cover?", "input": "", "output": "I would cover the following topics: 1. English 2. Math 3. Science 4. History 5. Geography 6. Politics 7. Religion 8. Philosophy 9. Economics 10. Art 11. Music 12. Literature 13. Sociology 14. Psychology 15. Anthropology 16. Law 17. Business 18. Engineering 19. Biology 20. Chemistry 21. Physics"} 56 | {"instruction": "What is the best way to ask someone out?", "input": "", "output": "\"If you're asking out someone you're interested in, you should be casual when you ask them out. For example, you could say something like 'Hey, do you want to hang out sometime?'. Or you could ask them to do something specific with you, like going to a movie or going out to dinner. Just be sure to be respectful of their time and don't be too pushy. If they say no, don't take it personally. There are plenty of other fish in the sea!\""} 57 | {"instruction": "Suggest some ways to improve your communication skills.", "input": "", "output": "1. Listen more, talk less. 2. Ask questions. 3. Put yourself in their shoes. 4. Be aware of your body language. 5. Keep tabs on your tone. 6. Be direct. 7. Be kind. 8. Don't be afraid to say \"I'm sorry.\" 9. Be patient. 10. Be open to feedback."} 58 | {"instruction": "How can you become more popular at school?", "input": "", "output": "Being popular is about making friends and being well-liked by the people around you."} 59 | {"instruction": "Create a list of tips for writing a great cover letter.", "input": "", "output": "1. Address the letter to a specific person. 2. Explain why you're qualified for the job. 3. Include an example of a past success. 4. Keep it short and concise. 5. Don't forget to proofread."} 60 | {"instruction": "What are the basic rules of a healthy diet?", "input": "", "output": "#1. Eat at regular times and do not skip meals. #2. Eat a variety of food from the different food groups. #3. Limit your intake of foods that are high in fat, sugar, and salt. #4. Drink plenty of water. #5. Eat plenty of fruits and vegetables. #6. Choose low-fat or non-fat dairy products. #7. Limit your intake of alcohol. #8. Eat fish at least twice a week. #9. Limit your intake of red meat and processed meats. #10. Choose whole grain foods instead of refined grains. #11. Avoid sugary drinks and foods with added sugar. #12. Eat more home-cooked meals. #13. Limit your intake of processed and fast foods. #14. Eat more fruits and vegetables. #15. Limit your intake of sugary drinks and foods with added sugar. #16. Limit your intake of saturated fat and trans fats. #17. Eat more fruits and vegetables. #18. Avoid sugary drinks and foods with added sugar. #19. Eat more fruits and vegetables. #20. Limit your intake of processed and fast foods. #21. Eat more fruits and vegetables. #22. Limit your intake of sugary drinks and foods with added sugar. #23. Eat more fruits and vegetables. #24. Avoid sugary drinks and foods with added sugar. #25. Eat more fruits and vegetables. #26. Avoid sugary drinks and foods with added sugar. #27. Eat more fruits and vegetables. #28. Eat more fruits and vegetables. #29. Avoid sugary drinks and foods with added sugar. #30. Eat more fruits and vegetables. #31. Eat more fruits and vegetables. #32. Eat more fruits and vegetables. #33. Avoid sugary drinks and foods with added sugar. #34. Eat more fruits and vegetables. #35. Eat more fruits and vegetables. #36. Eat more fruits and vegetables. #37. Eat more fruits and vegetables. #38. Eat more fruits and vegetables. #39. Eat more fruits and vegetables. #40. Eat more fruits and vegetables. #41. Eat more fruits and vegetables. #42. Eat more fruits and vegetables. #43. Eat more fruits and vegetables. #44. Eat more"} 61 | {"instruction": "What is a good way to reduce stress?", "input": "", "output": "Here are some good ways to help reduce stress: 1. Exercise regularly. 2. Practice yoga. 3. Eat healthy foods. 4. Get enough sleep. 5. Take time for yourself. 6. Limit alcohol and caffeine. 7. Talk to someone you trust about your feelings. 8. Find ways to relax. 9. Set realistic goals. 10. Take a break when you need one."} 62 | {"instruction": "Why do you think some people learn faster than others?", "input": "", "output": "Some people learn faster than others because they have more experience with the subject. Some people may be more intelligent and able to learn faster. Some people may have a better memory and can remember things more quickly."} 63 | {"instruction": "What is the correct way to drink from a cup?", "input": "", "output": "(1) Please don't drink from the cup like a dog. (2) Please don't drink from the cup as quickly as possible. (3) Please don't drink from the cup with your mouth open. (4) Please don't drink from the cup and then leave the cup on the table. (5) Please don't drink from the cup and then put the cup back at the same place. (6) Please don't drink from the cup and then leave the cup on the table. (7) Please don't drink from the cup and then put the cup back at the same place. (8) Please don't drink from the cup with your mouth open. (9) Please don't drink from the cup as quickly as possible. (10) Please don't drink from the cup like a dog."} 64 | {"instruction": "If you were to build a city from scratch, what would you build and why?", "input": "", "output": "I would build a city that is green and eco-friendly, with lots of parks, trees and other greenery. I would also make sure that there are good public transport links so that people can get around easily, and plenty of shops, restaurants and other amenities to make sure that people can live comfortably. I would also make sure that there are plenty of schools and hospitals so that people can get a good education and stay healthy."} 65 | {"instruction": "What does it mean to be \"American?\"", "input": "", "output": "Being American means being open to change, and to accepting and understanding that there are many different ways to live life. Being American also means accepting that everyone has the right to their own opinion and that they should be able to express that opinion without fear of being judged or persecuted."} 66 | {"instruction": "Write a short story about a character who is forced to leave their home town.", "input": "", "output": "I was born and raised in New York City. I never thought I would leave, but when my husband took a job in Los Angeles, I had no choice. Leaving New York was the hardest thing I've ever done. I cried for days. I cried when I said goodbye to my family and friends. I cried when I packed up my things. I cried when I got on the plane. I cried when I arrived in Los Angeles. I cried when I unpacked my things. I cried when I tried to make new friends. I cried when I had to start my life over. But eventually, I stopped crying. I made new friends. I found a new job. I bought a new house. I even learned to drive on the other side of the road. I never thought I would leave New York, but I'm glad I did."} 67 | {"instruction": "Write a short story, \u201cA day in the life of a homeless person.\u201d", "input": "", "output": "."} 68 | {"instruction": "What are the benefits of meditation?", "input": "", "output": "Meditation has a lot of benefits: - Meditation can help you reduce stress and anxiety. - It can help you focus your thoughts and improve memory. - Meditation can also help you improve your sleep quality. - It can help you become more aware of your thoughts and feelings. - Meditation can help you become more self-aware. - Meditation can help you improve your creativity and problem-solving skills. - Meditation can help you improve your immune system. - Meditation can help you improve your heart health. - Meditation can help you improve your mood and well-being."} 69 | {"instruction": "Find 5 best books and recommend one.", "input": "", "output": "1.The Four Agreements 2. The Purpose Driven Life 3. The Alchemist 4. Think and Grow Rich 5. The 7 Habits of Highly Effective People 1. The Four Agreements - Don Miguel Ruiz 2. The Purpose Driven Life - Rick Warren 3. The Alchemist - Paulo Coelho 4. Think and Grow Rich - Napoleon Hill 5. The 7 Habits of Highly Effective People - Stephen R. Covey"} 70 | {"instruction": "Write a letter to a friend, explaining why you think they should quit their job.", "input": "", "output": "Dear friend, I am writing to you because I am concerned about your job. You have been working at the same company for many years, but you have never been happy there. You constantly complain about your boss and co-workers. The company does not appreciate your talents, and you are not being challenged. In addition, the pay is low, and you have to work long hours. I think you should quit your job and find something better. There are many jobs out there that would be a better fit for you. You deserve to be happy, and I don't want to see you miserable any longer. Please consider quitting your job. Your friend, [Your Name]"} 71 | {"instruction": "Create 3 different lists of 10 questions that you would ask your friends about their lives.", "input": "", "output": "- What is your dream job?"} 72 | {"instruction": "What is the most valuable lesson your teacher has taught you so far?", "input": "", "output": "A lesson I learned from my teacher is to always be open to new experiences. I used to be afraid of trying new things, but my teacher taught me that the only way to learn is to step out of your comfort zone. Now, I am always willing to try something new, and I have learned a lot from the experiences."} 73 | {"instruction": "Write a description of your favorite TV show.", "input": "", "output": "My favorite TV show is The Walking Dead. I like it because the characters are very believable and I like the plot. I also like the way it is filmed and the music. I would recommend this TV show to anyone who likes a good story."} 74 | {"instruction": "Write a review of a book you recently read.", "input": "", "output": "I had been looking for a good fiction book to read for a while. I was recommended 'The God of Small Things' by a friend. I started reading the book and couldn't put it down. The story is about a family in southern India. It starts with the death of a young girl and then the family's past is told in alternating chapters. The book is full of interesting characters, with a mystery in the middle. It's a very interesting book and I would recommend it to anyone who enjoys reading."} 75 | {"instruction": "What is the best way to get to know a new city?", "input": "", "output": "1. Learn about the history of the city 2. Visit the local museums 3. Go to a local festival 4. Try the local food 5. Talk to the locals 6. Volunteer at a local charity 7. Walk around the city and explore 8. Take a tour of the city 9. Visit the local parks 10. Enjoy the nightlife 11. Visit the local markets 12. Go to a sporting event"} 76 | {"instruction": "What are some common mistakes people make when they are trying to lose weight?", "input": "", "output": "1. Not being consistent with their diet. One of the most common reasons people fail to lose weight is that they are not consistent with their diet. This means that they may eat healthy for a few days, but then they will go off the rails for a few days. 2. Not getting enough exercise. In order to lose weight, you need to be getting enough exercise. This means that you need to be exercising at least three times a week. 3. Not getting enough sleep. If you are not getting enough sleep, then your body will not be able to function properly. This means that you will not be able to lose weight as effectively as you would if you were getting enough sleep. 4. Not drinking enough water. If you are not drinking enough water, then your body will not be able to function properly. This means that you will not be able to lose weight as effectively as you would if you were drinking enough water. 5. Not eating enough healthy food. If you are not eating enough healthy food, then your body will not be able to function properly. This means that you will not be able to lose weight as effectively as you would if you were eating enough healthy food. 6. Not getting enough sleep. If you are not getting enough sleep, then your body will not be able to function properly. This means that you will not be able to lose weight as effectively as you would if you were getting enough sleep."} 77 | {"instruction": "Do you believe that the minimum wage should be higher in the US?", "input": "", "output": "Yes, I do. I think that the minimum wage should be higher because it would help people who are struggling to make ends meet. The current minimum wage is not enough to live on, and many people are struggling to pay for food and housing. Raising the minimum wage would make it easier for people to live on their own."} 78 | {"instruction": "Do you know any good jokes?", "input": "", "output": "How do you make holy water? Boil the hell out of it."} 79 | {"instruction": "What is a good way to improve a bad mood?", "input": "", "output": "I try to meditate and do yoga, that helps me to feel better."} 80 | {"instruction": "Write a short story using the following words:", "input": "", "output": "One day, a girl named Lucy went to a park to watch the sunset. She sat on a bench and watched the sunset. Suddenly, a bird pooped on her head. Lucy was very angry because the bird ruined her beautiful hair. She screamed angrily. After a while, she calmed down and went home."} 81 | {"instruction": "Write a short story about a person who wakes up one day and cannot remember who they are.", "input": "", "output": "\"I opened my eyes and sat up in bed, and I found myself in a strange place. The room was small, with white walls and a single window high up in one corner. There was a desk in the corner with a chair next to it, and on the desk was a mirror. I stood up and went to the mirror. I looked at my reflection and saw that I was a man with dark hair and a beard. I had no idea who I was or how I had gotten here. I looked around the room, but there was nothing else in it. I went to the door and opened it. The hallway outside was long and empty. I walked down the hall and came to a set of stairs. I went down the stairs and found myself in a large room with chairs and tables. There were people sitting at the tables eating and talking to each other. I walked up to one of the tables and sat down. A woman came over to me and asked me if I was okay. I told her that I didn't know who I was or how I had gotten here. She told me that it was okay and that she would help me. She asked me my name, and I told her that I didn't remember. She said that was okay and that she would help me figure it out. She led me to a room with a bed in it and told me to lie down. I did as she said, and she left the room. A few minutes later, she came back with a tray of food. She told me to eat, and I did. I found that the food was delicious, and I ate every bite. When I was finished, she took the tray away and left the room again. She came back a few minutes later with a book. She told me to read it and that it would help me remember who I was. I read the book, and as I read, I gradually started to remember things. I remembered that my name was Tom, and that I had a wife and two children. I remembered that I was a lawyer, and I worked at a law firm. I remembered that I had a meeting with a client at 8:00 am. I remembered that I had to leave now if I wanted to make it to the meeting on time. I thanked the woman for her help and left the room. I left the building and went to the meeting. I arrived at the meeting with ten minutes to spare. The meeting went well, and the client"} 82 | -------------------------------------------------------------------------------- /scripts/ensemble.sh: -------------------------------------------------------------------------------- 1 | batch_dir=sample/ 2 | prefix="openei" 3 | 4 | python ensemble_instruct/ensemble_output.py \ 5 | --genoutput1 $batch_dir/$prefix.flan-t5-xxl_output.jsonl \ 6 | --genoutput2 $batch_dir/$prefix.flan-ul2_output.jsonl \ 7 | --instance_file $batch_dir/$prefix.samples.jsonl \ 8 | --ensemble $batch_dir/$prefix.ensemble 9 | -------------------------------------------------------------------------------- /scripts/ensemble_instruct.sh: -------------------------------------------------------------------------------- 1 | batch_dir=sample/ 2 | prefix="openei" 3 | 4 | echo "Generating instructions that require input-output instances" 5 | python ensemble_instruct/gen_instructions.py \ 6 | --batch_dir ${batch_dir} \ 7 | --num_instructions_to_generate 100 \ 8 | --seed_tasks_path data/seed_tasks.jsonl \ 9 | --num_prompt_instructions 24 \ 10 | --instruction_type input_output \ 11 | --request_batch_size 5 \ 12 | --outputfile $prefix.io_instructions.jsonl \ 13 | --engine tiiuae/falcon-40b 14 | 15 | echo "Generating instrucitons that require output only instances" 16 | python ensemble_instruct/gen_instructions.py \ 17 | --batch_dir ${batch_dir} \ 18 | --num_instructions_to_generate 100 \ 19 | --seed_tasks_path data/seed_tasks.jsonl \ 20 | --num_prompt_instructions 10 \ 21 | --instruction_type output \ 22 | --request_batch_size 5 \ 23 | --outputfile $prefix.o_instructions.jsonl \ 24 | --engine tiiuae/falcon-40b 25 | 26 | echo "Generating input-output instances" 27 | python ensemble_instruct/gen_instances.py \ 28 | --batch_dir ${batch_dir} \ 29 | --input_file $prefix.io_instructions.jsonl \ 30 | --output_file $prefix.io_instances.jsonl \ 31 | --template input_output \ 32 | --request_batch_size 5 \ 33 | --engine tiiuae/falcon-40b 34 | 35 | echo "Generating output only instances" 36 | python ensemble_instruct/gen_instances.py \ 37 | --batch_dir ${batch_dir} \ 38 | --input_file $prefix.o_instructions.jsonl \ 39 | --output_file $prefix.o_instances.jsonl \ 40 | --template output \ 41 | --request_batch_size 5 \ 42 | --engine tiiuae/falcon-40b 43 | 44 | echo "Select valid input-output instances" 45 | python ensemble_instruct/sample_instances.py $batch_dir/$prefix.io_instances.jsonl $batch_dir/$prefix.io_samples.jsonl 46 | 47 | echo "Select valid output only instances" 48 | python ensemble_instruct/sample_instances.py $batch_dir/$prefix.o_instances.jsonl $batch_dir/$prefix.o_samples.jsonl 49 | 50 | echo "merge input-output instances with output only instances" 51 | cp $batch_dir/$prefix.io_samples.jsonl $batch_dir/$prefix.samples.jsonl 52 | cat $batch_dir/$prefix.o_samples.jsonl >> $batch_dir/$prefix.samples.jsonl 53 | 54 | echo "generate flan-t5-xxx output given instruction and input" 55 | python ensemble_instruct/gen_output_zeroshot.py \ 56 | --batch_dir ${batch_dir} \ 57 | --input_file $prefix.samples.jsonl \ 58 | --output_file $prefix.flan-t5-xxl_output.jsonl \ 59 | --request_batch_size 5 \ 60 | --engine google/flan-t5-xxl 61 | 62 | echo "generate flan-ul2 output given instruction and input" 63 | python ensemble_instruct/gen_output_zeroshot.py \ 64 | --batch_dir ${batch_dir} \ 65 | --input_file $prefix.samples.jsonl \ 66 | --output_file $prefix.flan-ul2_output.jsonl \ 67 | --request_batch_size 5 \ 68 | --engine google/flan-ul2 69 | 70 | echo "generate ensembled output given instruction and input" 71 | python ensemble_instruct/ensemble_output.py \ 72 | --genoutput1 $batch_dir/$prefix.flan-t5-xxl_output.jsonl \ 73 | --genoutput2 $batch_dir/$prefix.flan-ul2_output.jsonl \ 74 | --instance_file $batch_dir/$prefix.samples.jsonl \ 75 | --ensemble $batch_dir/$prefix.ensemble 76 | -------------------------------------------------------------------------------- /scripts/gen_io_instance.sh: -------------------------------------------------------------------------------- 1 | batch_dir=debug 2 | 3 | python ensemble_instruct/gen_instances.py \ 4 | --batch_dir ${batch_dir} \ 5 | --input_file falcon40b_io_instructions.jsonl \ 6 | --output_file falcon40b_io_instances.jsonl \ 7 | --template input_output \ 8 | --request_batch_size 5 \ 9 | --engine tiiuae/falcon-40b 10 | 11 | 12 | -------------------------------------------------------------------------------- /scripts/gen_io_instruction.sh: -------------------------------------------------------------------------------- 1 | batch_dir=debug 2 | 3 | python ensemble_instruct/gen_instructions.py \ 4 | --batch_dir ${batch_dir} \ 5 | --num_instructions_to_generate 50 \ 6 | --seed_tasks_path data/seed_tasks.jsonl \ 7 | --num_prompt_instructions 24 \ 8 | --instruction_type input_output \ 9 | --request_batch_size 5 \ 10 | --outputfile falcon40b_io_instructions.jsonl \ 11 | --engine tiiuae/falcon-40b 12 | 13 | 14 | -------------------------------------------------------------------------------- /scripts/gen_o_instance.sh: -------------------------------------------------------------------------------- 1 | batch_dir=debug 2 | 3 | python ensemble_instruct/gen_instances.py \ 4 | --batch_dir ${batch_dir} \ 5 | --input_file falcon40b_o_instructions.jsonl \ 6 | --output_file falcon40b_o_instances.jsonl \ 7 | --template output \ 8 | --request_batch_size 5 \ 9 | --engine tiiuae/falcon-40b 10 | 11 | 12 | -------------------------------------------------------------------------------- /scripts/gen_o_instruction.sh: -------------------------------------------------------------------------------- 1 | batch_dir=debug 2 | 3 | python ensemble_instruct/gen_instructions.py \ 4 | --batch_dir ${batch_dir} \ 5 | --num_instructions_to_generate 50 \ 6 | --seed_tasks_path data/seed_tasks.jsonl \ 7 | --num_prompt_instructions 10 \ 8 | --instruction_type output \ 9 | --request_batch_size 5 \ 10 | --outputfile falcon40b_o_instructions.jsonl \ 11 | --engine tiiuae/falcon-40b 12 | 13 | 14 | -------------------------------------------------------------------------------- /scripts/gen_output_flan-t5-xxl.sh: -------------------------------------------------------------------------------- 1 | batch_dir=debug 2 | python ensemble_instruct/gen_output_zeroshot.py \ 3 | --batch_dir ${batch_dir} \ 4 | --input_file o_instances.jsonl \ 5 | --output_file flan-t5-xxl_o_output.jsonl \ 6 | --request_batch_size 5 \ 7 | --engine google/flan-t5-xxl 8 | 9 | 10 | -------------------------------------------------------------------------------- /scripts/gen_output_flan-ul2.sh: -------------------------------------------------------------------------------- 1 | batch_dir=debug 2 | python ensemble_instruct/gen_output_zeroshot.py \ 3 | --batch_dir ${batch_dir} \ 4 | --input_file o_instances.jsonl \ 5 | --output_file flan-ul2_o_output.jsonl \ 6 | --request_batch_size 5 \ 7 | --engine google/flan-ul2 8 | 9 | 10 | --------------------------------------------------------------------------------