From b9fe3a919f4332311ed185ab201e41baa265eb26 Mon Sep 17 00:00:00 2001 From: Ziyu Date: Fri, 7 Mar 2025 23:08:47 -0600 Subject: [PATCH 1/8] start on evolinstruct --- camel/datagen/evol_instruct/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 camel/datagen/evol_instruct/__init__.py diff --git a/camel/datagen/evol_instruct/__init__.py b/camel/datagen/evol_instruct/__init__.py new file mode 100644 index 0000000000..e69de29bb2 From 41ddee3223426b6747519dc71698866228ef84a9 Mon Sep 17 00:00:00 2001 From: Ziyu Date: Sat, 8 Mar 2025 00:07:31 -0600 Subject: [PATCH 2/8] init dataclass --- camel/datagen/evol_instruct/evol_instruct.py | 28 ++++ camel/datagen/evol_instruct/templates.py | 127 ++++++++++++++++++ .../datagen/evol_instruct/evol_instruct.py | 55 ++++++++ .../seed_tasks.jsonl | 0 4 files changed, 210 insertions(+) create mode 100644 camel/datagen/evol_instruct/evol_instruct.py create mode 100644 camel/datagen/evol_instruct/templates.py create mode 100644 examples/datagen/evol_instruct/evol_instruct.py rename examples/datagen/{self_instruct => evol_instruct}/seed_tasks.jsonl (100%) diff --git a/camel/datagen/evol_instruct/evol_instruct.py b/camel/datagen/evol_instruct/evol_instruct.py new file mode 100644 index 0000000000..6b316952c5 --- /dev/null +++ b/camel/datagen/evol_instruct/evol_instruct.py @@ -0,0 +1,28 @@ +# ========= Copyright 2023-2025 @ CAMEL-AI.org. All Rights Reserved. ========= +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ========= Copyright 2023-2025 @ CAMEL-AI.org. All Rights Reserved. ========= + +import json +import os +import random +import time +from typing import Any, Dict, List, Optional + +from pydantic import BaseModel, Field + +from camel.agents import ChatAgent +from camel.logger import get_logger + +from .templates import EvolInstructTemplates + +logger = get_logger(__name__) diff --git a/camel/datagen/evol_instruct/templates.py b/camel/datagen/evol_instruct/templates.py new file mode 100644 index 0000000000..e5babc847c --- /dev/null +++ b/camel/datagen/evol_instruct/templates.py @@ -0,0 +1,127 @@ +# ========= Copyright 2023-2025 @ CAMEL-AI.org. All Rights Reserved. ========= +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ========= Copyright 2023-2025 @ CAMEL-AI.org. All Rights Reserved. ========= + +from dataclasses import dataclass + + +# flake8: noqa +@dataclass(frozen=True) +class EvolInstructTemplates: + """ + Contains templates for EvolInstruct prompt transformations. + + References: + - WizardLM: Empowering Large Language Models to Follow Complex Instructions + https://arxiv.org/pdf/2304.12244 + - eva: Evolving Alignment via Asymmetric Self-Play + https://arxiv.org/abs/2411.00062 + """ + + # High-level instructions on in-depth/in-breadth evolving + INST_IN_DEPTH = ( + "Please act as an expert Prompt Rewriter.\n" + "Your objective is to rewrite a given prompt into a more complex version " + "to make those large language models (e.g., gemini) a bit harder to handle.\n" + "But the rewritten prompt must be reasonable and must be understood and responded by humans.\n" + "Your rewriting cannot omit the non-text parts such as the table and code in #Given Prompt#, if there is any." + "You should try your best not to make the #Rewritten Prompt# become verbose, " + "The #Rewritten Prompt# should be roughly the similar length or a little bit more than that of #Given Prompt#.\n" + "The #Rewritten Prompt# must sound like a real human user's prompt; DON'T make it like sound machine-generated." + "Specifically, you SHOULD complicate the given prompt using the following method: " + "\n{method}\n" + "The rewritten prompt should reflect meaningful changes across its structure, " + "ensuring the entire sentence feels sufficiently different from the original. " + "Again, make sure the rewritten prompt presents a more CHALLENGING TASK." + "Respond with your rewritten prompt directly. " + "#Given Prompt#:\n{prompt}\n" + "#Rewritten Prompt#:\n" + ).lstrip() + + INST_IN_BREADTH = ( + "Please act as an expert Prompt Creator.\n" + "Your objective is to generate a brand-new prompt based on the #Given Prompt#. " + "The purpose of this task is to promote diversity and generality of training prompts for language models, " + "helping it practice with varied challenges and perspectives.\n" + "The LENGTH and complexity of the #Created Prompt# should be similar to that of the #Given Prompt#.\n" + "The #Created Prompt# must be reasonable, interpretable, and solvable by humans.\n" + "The #Created Prompt# must sound like a real human user's prompt; DON'T make it sound like machine-generated." + "Follow the method described below to guide your creation:\n" + "{method}\n" + "The created prompt should reflect meaningful changes across its structure, " + "ensuring the entire sentence feels sufficiently different from the original. " + "Respond with your created prompt directly.\n" + "#Given Prompt#:\n{prompt}\n" + "#Created Prompt#:\n" + ).lstrip() + + # Sub-method instructions (following the eva paper setting, which sligtly differs from WizardLM) + IN_BREADTH_KEYS = ['persona', 'shift-in', 'shift-out', 'mix', 'abstract'] + IN_DEPTH_KEYS = ['constraints', 'deepening', 'concretizing', 'reasoning', 'expansion'] + + EVOL_METHODS = { + "persona": ( + "Reframe the #Given Prompt# as if written by a user with a completely different persona, background, or expertise. " + "Adjust the tone, style, phrasing, or anything you feel proper to reflect this change. " + "The changes should make the prompt feel like it was authored by someone entirely new." + ), + + "shift-in": ( + "Shift the high-level idea of the #Given Prompt# to explore a different subdomain or context within the same domain. " + "Ensure the new topic still challenges the model to reason or provide knowledge relevant to the domain." + ), + + "shift-out": ( + "Shift the high-level idea of the #Given Prompt# to a completely different topic in a different setting. " + "The new topic may challenge the model with similar reasoning or contextual understanding but in a novel way." + ), + + "mix": ( + "Combine the high-level concept of the #Given Prompt# with elements from a different domain. " + "Introduce novel scenarios or contexts to create diversity while maintaining relevance to the original idea." + ), + + "abstract": ( + "Turn the #Given Prompt# into a more abstract or generalized version, removing specific details while preserving its intent. " + "Ensure the new prompt encourages broader, principle-driven reasoning." + ), + + "constraints": ( + "Add one or more significant constraints or requirements into the '#Given Prompt#'. " + "The added constraints must meaningfully alter how the model would respond. " + "For example, specify additional rules, contexts, or limitations that demand creative adjustments to the response." + ), + + "deepening": ( + "If the #Given Prompt# contains inquiries about certain issues, increase the depth and breadth of the inquiry. " + "Make the question require a more detailed, multi-layered, or comprehensive response. " + "For instance, break the problem into sub-problems or require connections between unrelated concepts." + ), + + "concretizing": ( + "Replace general concepts in the #Given Prompt# with more specific and detailed concepts. " + "Ensure that the change makes the problem more defined and concrete, leaving less room for ambiguity. " + "For example, replace 'a device' with 'a wearable fitness tracker with GPS'." + ), + + "reasoning": ( + "Add one or more reasoning steps into the '#Given Prompt#'. " + "Explicitly rewrite it to demand multi-step reasoning or justify intermediate steps in the solution. " + "For instance, if the original prompt is a simple query, make the response require a step-by-step breakdown of logic or calculations." + ), + + "expansion": ( + "Expand the #Given Prompt# by including additional perspectives, domains, or layers of complexity. " + "For example, if the original prompt focuses on a single scenario, add related scenarios or ask the model to compare different situations." + ) + } diff --git a/examples/datagen/evol_instruct/evol_instruct.py b/examples/datagen/evol_instruct/evol_instruct.py new file mode 100644 index 0000000000..6d767016e2 --- /dev/null +++ b/examples/datagen/evol_instruct/evol_instruct.py @@ -0,0 +1,55 @@ +# ========= Copyright 2023-2025 @ CAMEL-AI.org. All Rights Reserved. ========= +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ========= Copyright 2023-2025 @ CAMEL-AI.org. All Rights Reserved. ========= + + +from camel.agents import ChatAgent +from camel.datagen.evol_instruct import EvolInstructPipeline + +def main(): + """ + Example usage of EvolInstructPipeline with iterative and parallel evolution. + """ + agent = ChatAgent() + + pipeline = EvolInstructPipeline() + + # Define evolution parameters + num_generations = 2 # (width) number of generations per evolution + num_evolutions = 3 # (depth) number of iterative evolutions + method_dict = { + 0: 'in-breadth', + 1: 'in-breadth', + 2: 'in-depth' + } + keep_original = True # keep original prompt in results + chunk_size = 1 # control processing rate + + # setup pipeline + pipeline = EvolInstructPipeline( + agent=agent, + seed='seed_tasks.jsonl', + data_output_path='./data_output.json', + method=method_dict, + num_generations=num_generations, + num_evolutions=num_evolutions, + keep_original=keep_original, + chunk_size=chunk_size, + ) + + # generate instructions + pipeline.generate() + + +if __name__ == "__main__": + main() diff --git a/examples/datagen/self_instruct/seed_tasks.jsonl b/examples/datagen/evol_instruct/seed_tasks.jsonl similarity index 100% rename from examples/datagen/self_instruct/seed_tasks.jsonl rename to examples/datagen/evol_instruct/seed_tasks.jsonl From dc74b6b6c9d7061f0d2bea96116481f946e9fc5b Mon Sep 17 00:00:00 2001 From: Ziyu Date: Sat, 8 Mar 2025 12:15:42 -0600 Subject: [PATCH 3/8] init evolinstruct --- camel/datagen/evol_instruct/__init__.py | 19 ++ camel/datagen/evol_instruct/evol_instruct.py | 289 ++++++++++++++++++- 2 files changed, 307 insertions(+), 1 deletion(-) diff --git a/camel/datagen/evol_instruct/__init__.py b/camel/datagen/evol_instruct/__init__.py index e69de29bb2..5930439772 100644 --- a/camel/datagen/evol_instruct/__init__.py +++ b/camel/datagen/evol_instruct/__init__.py @@ -0,0 +1,19 @@ +# ========= Copyright 2023-2025 @ CAMEL-AI.org. All Rights Reserved. ========= +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ========= Copyright 2023-2025 @ CAMEL-AI.org. All Rights Reserved. ========= + +from .evol_instruct import EvolInstructPipeline + +__all__ = [ + 'EvolInstructPipeline', +] diff --git a/camel/datagen/evol_instruct/evol_instruct.py b/camel/datagen/evol_instruct/evol_instruct.py index 6b316952c5..69520048a2 100644 --- a/camel/datagen/evol_instruct/evol_instruct.py +++ b/camel/datagen/evol_instruct/evol_instruct.py @@ -16,7 +16,7 @@ import os import random import time -from typing import Any, Dict, List, Optional +from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import BaseModel, Field @@ -26,3 +26,290 @@ from .templates import EvolInstructTemplates logger = get_logger(__name__) + + +class EvolInstructPipeline: + r""" + A pipeline for evolving prompts using the Evol-Instruct methodology. + + Args: + agent (ChatAgent): The agent used to interact and generate + instructions. + """ + + def __init__( + self, + agent: ChatAgent, + ): + """ + Initializes the EvolInstructPipeline with an LLM agent. + + :param agent: The language model agent used for prompt evolution. + """ + self.agent = agent + + def _set_method( + self, + method: Optional[Union[str, List[str]]] = "uniform", + num_generations: int = 1, + ) -> List[str]: + """ + Sets the evolution method to use for generating prompts for one iteration. + + :param method: The method(s) to use for evolving the prompt. Can be: + - (list) a list of methods with length equal to num_generations. + - (str) a single method defined in EvolInstructTemplates, or "uniform". + :param num_generations: The number of variations to generate in one iteration. + + :return: (list) The list of method to use for generating prompts. + """ + # Case 1: user provides a list of methods + if isinstance(method, list): + + if len(method) == num_generations: + methods = [ + i if i in EvolInstructTemplates.EVOL_METHODS else "uniform" + for i in method + ] + + else: + methods = ["uniform"] * num_generations + logger.info("methods length not match; use uniform instead.") + + # Case 2: user provides a single method - broadcast with random selection + elif isinstance(method, str): + if method in EvolInstructTemplates.EVOL_METHODS: + methods = [method] * num_generations + + elif method in ["in-breadth", "in-depth", "uniform"]: + method_mapping = { + "in-breadth": EvolInstructTemplates.IN_BREADTH_KEYS, + "in-depth": EvolInstructTemplates.IN_DEPTH_KEYS, + "uniform": list(EvolInstructTemplates.EVOL_METHODS.keys()), + } + methods = [ + random.choice(method_mapping[method]) + for _ in range(num_generations) + ] + + else: + logger.info(f"Invalid method: {method}. Set as uniform.") + methods = ["uniform"] * num_generations + + else: + raise ValueError("method must be a string or a list of methods.") + + return methods + + def _generate_single( + self, + prompt: str, # for a single prompt + method: str = "uniform", + ) -> str: + """ + Generates a single new prompt for a single seed prompt using a specified method. + + :param prompt: The input prompt to evolve. + :param method: The method(s) to use for evolving the prompt. Can be: + - (str) a single method defined in EvolInstructTemplates. + - (str) "uniform" for random selection. + :return: The evolved prompt as a string. + """ + # Randomly select a method if uniform + if method == "uniform": + method = random.choice(list(EvolInstructTemplates.EVOL_METHODS.keys())) + + # Choose the instruction template based on the method + instruction = ( + EvolInstructTemplates.INST_IN_BREADTH + if method in EvolInstructTemplates.IN_BREADTH_KEYS + else EvolInstructTemplates.INST_IN_DEPTH + ).format( + method=EvolInstructTemplates.EVOL_METHODS.get( + method, + random.choice(list(EvolInstructTemplates.EVOL_METHODS.values())) + ), + prompt=prompt, + ) + + # Generate new prompt using the agent + self.agent.reset() + response = self.agent.step(instruction) + generated_prompt = response.msgs[0].content.strip() + + return generated_prompt + + def _generate_multiple( + self, + prompt: str, # for a single prompt + method: Union[str, List[str]] = "uniform", + num_generations: int = 1, + keep_original: bool = True, + ) -> List[Tuple[str, str]]: + """ + Generates multiple variations of a single seed prompt x. + Note those variations are directly generated from the same seed, + that is, [x_1, x_2, ..., x_N] <- LLM( | x, method), where N is the width. + + :param prompt: The input prompt to evolve. + :param method: The method(s) to use for evolving the prompt. Can be: + - A single method (str). + - A list of methods with length equal to num_generations. + - "uniform" for random selection. + :param num_generations: Number of variations to generate. + :param keep_original: Whether to include the original prompt in output. + :return: A list of tuples (evolved_prompt, method). + """ + from concurrent.futures import ThreadPoolExecutor + + # initialize the results list for generated prompts + results = [(prompt, "original")] if keep_original else [] + + # set the method + methods = self._set_method( + method=method, + num_generations=num_generations, + ) + + # generate prompts concurrently + def process_single(method): + return self._generate_single(prompt, method), method + + with ThreadPoolExecutor() as executor: + generated_results = list(executor.map(process_single, methods)) + + results.extend(generated_results) + + return results + + def _generate_iter( + self, + prompt: str, # for a single prompt + method: Union[str, Dict[int, List[str]]] = "uniform", + num_generations: int = 1, + num_evolutions: int = 1, + keep_original: bool = True, + scorer: str = "uniform" + ) -> Dict[int, List[Tuple[str, str]]]: + """ + Iteratively evolve a prompt over multiple generations. + Note those variations are iteratively generated from the previous prompt, + that is, [x_11, x_12, ..., x_1N] <- LLM( | x, method), where N is the width. + We then use a scorer to select one of the seed prompt for the next iteration, say x_12, + then, [x_21, x_22, ..., x_2W] <- LLM( | x_12, method), and so on. + Here, the num_evolutions can be seen as the depth of the evolution. + We can call this as "TreeBoN", if we choose the best of N prompts in each iteration. + When N is 1, that is the default EvolInstruct setting. + + :param prompt: The input prompt to evolve. + :param method: The method(s) to use for evolving the prompt. Can be: + - "uniform" for random selection. + - A dictionary mapping iteration numbers to lists of methods. + :param num_generations: The number of variations to generate in each iteration. + :param num_evolutions: The number of iterations to perform. + :param keep_original: Whether to include the original prompt in the output of each iteration. + :param scorer: The scoring method to select the best prompt for the next iteration. + For now, "uniform" assigns random scores. + + :return: A dictionary where keys are iteration numbers and values are lists of tuples (prompt, method). + + References: + - eva: Evolving Alignment via Asymmetric Self-Play + https://ziyu-deep.github.io/files/eva-arxiv.pdf see appendix for details. + """ + results = {} + + current_prompt = prompt + + for iteration in range(num_evolutions): + + # generate the batch for the current iteration + batch_results = self._generate_multiple( + prompt=current_prompt, + method=method, + num_generations=num_generations, + keep_original=False, + ) + + if keep_original: + batch_results.insert(0, (current_prompt, "original")) + + results[iteration] = batch_results + + # assign scores and select the best prompt for the next iteration + if scorer == "uniform": + # simulate random scores in range (1, 10) for now + scores = [random.randint(1, 10) for _ in batch_results[1:]] if keep_original else [random.randint(1, 10) for _ in batch_results] + else: + raise NotImplementedError(f"Scorer '{scorer}' is not implemented.") + + # select the prompt with the highest score + best_index = scores.index(max(scores)) + current_prompt = batch_results[best_index + 1][0] if keep_original else batch_results[best_index][0] + + return results + + def generate( + self, + prompts: List[str], + method: Union[str, Dict[int, List[str]]] = "uniform", + num_generations: int = 1, + num_evolutions: int = 1, + keep_original: bool = True, + scorer: str = "uniform", + chunk_size: int = 2, + retry_limit: int = 3, + retry_delay: int = 30, # in seconds + ) -> List[Dict[int, List[Tuple[str, str]]]]: + """ + Divide the list of prompts into chunks, + iterate through each chunk sequentially, + then process the prompts within each chunk in parallel + + :param chunk_size: The number of prompts to process in each chunk. + :param retry_limit: The maximum number of retries for failed requests. + :param retry_delay: The delay between retries in seconds. + + :return: A list of dictionaries, + where each dictionary corresponds to the results of one prompt. + """ + from concurrent.futures import ThreadPoolExecutor + from math import ceil + import time + + def process_prompt(prompt): + retries = 0 + while retries <= retry_limit: + try: + return self._generate_iter( + prompt=prompt, + method=method, + num_generations=num_generations, + num_evolutions=num_evolutions, + keep_original=keep_original, + scorer=scorer, + ) + except Exception as e: + if retries < retry_limit: + logger.info(f"Error: {e}. Retrying in {retry_delay}s... (Attempt {retries + 1}/{retry_limit})") + time.sleep(retry_delay) + retries += 1 + else: + logger.info(f"Failed to process prompt after {retry_limit} attempts: {e}") + return {} + + # Split prompts into chunks + num_chunks = ceil(len(prompts) / chunk_size) + chunks = [ + prompts[i * chunk_size: (i + 1) * chunk_size] + for i in range(num_chunks) + ] + + results = [] + + for chunk in chunks: + with ThreadPoolExecutor() as executor: + chunk_results = list(executor.map(process_prompt, chunk)) + results.extend(chunk_results) + + return results From b289db1e4fc36dff4f9f0ce1d4f6fc0672282bfd Mon Sep 17 00:00:00 2001 From: Ziyu Date: Sat, 8 Mar 2025 12:43:10 -0600 Subject: [PATCH 4/8] fix chunk --- camel/datagen/evol_instruct/evol_instruct.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/camel/datagen/evol_instruct/evol_instruct.py b/camel/datagen/evol_instruct/evol_instruct.py index 69520048a2..deb22d1406 100644 --- a/camel/datagen/evol_instruct/evol_instruct.py +++ b/camel/datagen/evol_instruct/evol_instruct.py @@ -257,7 +257,7 @@ def generate( num_evolutions: int = 1, keep_original: bool = True, scorer: str = "uniform", - chunk_size: int = 2, + num_chunks: int = 1, retry_limit: int = 3, retry_delay: int = 30, # in seconds ) -> List[Dict[int, List[Tuple[str, str]]]]: @@ -266,7 +266,8 @@ def generate( iterate through each chunk sequentially, then process the prompts within each chunk in parallel - :param chunk_size: The number of prompts to process in each chunk. + :param num_chunks: The number of chunks to process batch of prompts. + specify a larger number of chunks to avoid hitting RPM limits for API requests. :param retry_limit: The maximum number of retries for failed requests. :param retry_delay: The delay between retries in seconds. @@ -291,22 +292,20 @@ def process_prompt(prompt): ) except Exception as e: if retries < retry_limit: - logger.info(f"Error: {e}. Retrying in {retry_delay}s... (Attempt {retries + 1}/{retry_limit})") + logger.info(f"Error: {e}. Retry in {retry_delay}s... (Attempt {retries + 1}/{retry_limit})") time.sleep(retry_delay) retries += 1 else: logger.info(f"Failed to process prompt after {retry_limit} attempts: {e}") return {} - # Split prompts into chunks - num_chunks = ceil(len(prompts) / chunk_size) - chunks = [ - prompts[i * chunk_size: (i + 1) * chunk_size] - for i in range(num_chunks) - ] + # split prompts into chunks + num_chunks = max(1, min(num_chunks, len(prompts))) + chunk_size = ceil(len(prompts) / num_chunks) + chunks = [prompts[i: i + chunk_size] for i in range(0, len(prompts), chunk_size)] + # generate prompts results = [] - for chunk in chunks: with ThreadPoolExecutor() as executor: chunk_results = list(executor.map(process_prompt, chunk)) From dc79534a2372491dc6eaaf8d77b0653aa4298f00 Mon Sep 17 00:00:00 2001 From: Ziyu Date: Sat, 8 Mar 2025 12:44:45 -0600 Subject: [PATCH 5/8] fix chunk --- camel/datagen/evol_instruct/evol_instruct.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/camel/datagen/evol_instruct/evol_instruct.py b/camel/datagen/evol_instruct/evol_instruct.py index deb22d1406..808a960816 100644 --- a/camel/datagen/evol_instruct/evol_instruct.py +++ b/camel/datagen/evol_instruct/evol_instruct.py @@ -18,8 +18,6 @@ import time from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import BaseModel, Field - from camel.agents import ChatAgent from camel.logger import get_logger @@ -276,7 +274,6 @@ def generate( """ from concurrent.futures import ThreadPoolExecutor from math import ceil - import time def process_prompt(prompt): retries = 0 From ed08f1b19d7f30d3528e479a9c808c083e9b1ee7 Mon Sep 17 00:00:00 2001 From: Ziyu Date: Sat, 8 Mar 2025 15:35:02 -0600 Subject: [PATCH 6/8] fix evol_instruct --- camel/datagen/evol_instruct/evol_instruct.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/camel/datagen/evol_instruct/evol_instruct.py b/camel/datagen/evol_instruct/evol_instruct.py index 808a960816..80d1a95129 100644 --- a/camel/datagen/evol_instruct/evol_instruct.py +++ b/camel/datagen/evol_instruct/evol_instruct.py @@ -103,6 +103,7 @@ def _generate_single( self, prompt: str, # for a single prompt method: str = "uniform", + return_method: bool = False, ) -> str: """ Generates a single new prompt for a single seed prompt using a specified method. @@ -113,9 +114,13 @@ def _generate_single( - (str) "uniform" for random selection. :return: The evolved prompt as a string. """ - # Randomly select a method if uniform + # Handle the case when using this method externally if method == "uniform": method = random.choice(list(EvolInstructTemplates.EVOL_METHODS.keys())) + elif method == "in-depth": + method = random.choice(EvolInstructTemplates.IN_DEPTH_KEYS) + elif method == "in-breadth": + method = random.choice(EvolInstructTemplates.IN_BREADTH_KEYS) # Choose the instruction template based on the method instruction = ( @@ -135,7 +140,10 @@ def _generate_single( response = self.agent.step(instruction) generated_prompt = response.msgs[0].content.strip() - return generated_prompt + if not return_method: + return generated_prompt + else: + return generated_prompt, method def _generate_multiple( self, @@ -183,7 +191,7 @@ def process_single(method): def _generate_iter( self, prompt: str, # for a single prompt - method: Union[str, Dict[int, List[str]]] = "uniform", + method: Union[str, Dict[int, List[str]]] = "uniform", # allowing dict for multiple methods num_generations: int = 1, num_evolutions: int = 1, keep_original: bool = True, @@ -220,6 +228,9 @@ def _generate_iter( current_prompt = prompt for iteration in range(num_evolutions): + # set the method for the current iteration + if isinstance(method, dict): + method = method.get(iteration, "uniform") # generate the batch for the current iteration batch_results = self._generate_multiple( @@ -303,7 +314,8 @@ def process_prompt(prompt): # generate prompts results = [] - for chunk in chunks: + for i, chunk in enumerate(chunks): + logger.info(f"Processing chunk {i + 1}/{num_chunks} with {len(chunk)} prompts...") with ThreadPoolExecutor() as executor: chunk_results = list(executor.map(process_prompt, chunk)) results.extend(chunk_results) From d3b79fca48d39ca1f1d509abcc52c497a3dffa59 Mon Sep 17 00:00:00 2001 From: Ziyu Date: Sat, 8 Mar 2025 16:33:29 -0600 Subject: [PATCH 7/8] update examples --- camel/datagen/evol_instruct/evol_instruct.py | 2 +- .../datagen/evol_instruct/evol_instruct.ipynb | 818 ++++++++++++++++++ .../datagen/evol_instruct/evol_instruct.py | 77 +- examples/datagen/evol_instruct/input.json | 7 + examples/datagen/evol_instruct/results.json | 292 +++++++ .../datagen/evol_instruct/seed_tasks.jsonl | 175 ---- 6 files changed, 1177 insertions(+), 194 deletions(-) create mode 100644 examples/datagen/evol_instruct/evol_instruct.ipynb create mode 100644 examples/datagen/evol_instruct/input.json create mode 100644 examples/datagen/evol_instruct/results.json delete mode 100644 examples/datagen/evol_instruct/seed_tasks.jsonl diff --git a/camel/datagen/evol_instruct/evol_instruct.py b/camel/datagen/evol_instruct/evol_instruct.py index 80d1a95129..0a8f610a72 100644 --- a/camel/datagen/evol_instruct/evol_instruct.py +++ b/camel/datagen/evol_instruct/evol_instruct.py @@ -315,7 +315,7 @@ def process_prompt(prompt): # generate prompts results = [] for i, chunk in enumerate(chunks): - logger.info(f"Processing chunk {i + 1}/{num_chunks} with {len(chunk)} prompts...") + logger.critical(f"Processing chunk {i + 1}/{num_chunks} with {len(chunk)} prompts...") with ThreadPoolExecutor() as executor: chunk_results = list(executor.map(process_prompt, chunk)) results.extend(chunk_results) diff --git a/examples/datagen/evol_instruct/evol_instruct.ipynb b/examples/datagen/evol_instruct/evol_instruct.ipynb new file mode 100644 index 0000000000..8db04d3ad5 --- /dev/null +++ b/examples/datagen/evol_instruct/evol_instruct.ipynb @@ -0,0 +1,818 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example Usage of Evolving Instructions on Math/Coding/Alignment Data" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2025-03-08 15:54:43,029 - camel.evol-instruct - INFO - let's evolve some ideas.\n" + ] + } + ], + "source": [ + "import os\n", + "import logging\n", + "\n", + "from camel.logger import enable_logging, set_log_level, get_logger\n", + "os.environ[\"CAMEL_LOGGING_DISABLED\"] = \"false\" \n", + "\n", + "enable_logging() \n", + "set_log_level(logging.INFO) \n", + "\n", + "logger = get_logger(\"evol-instruct\")\n", + "logger.info(\"let's evolve some ideas.\")" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "from getpass import getpass\n", + "\n", + "openai_api_key = getpass('Enter your API key: ')\n", + "os.environ[\"OPENAI_API_KEY\"] = openai_api_key" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## HuggingFace Dataset Preparation" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from datasets import load_dataset # !pip install datasets\n", + "\n", + "# note: it is better to write specific ins template for each ability\n", + "# for now we will just use the default ins template in `camel/datagem/templates.py`\n", + "dataset = load_dataset(\"PRIME-RL/Eurus-2-RL-Data\")\n", + "coding_dataset = dataset[\"train\"].filter(lambda example: example[\"ability\"] == \"code\")\n", + "math_dataset = dataset[\"train\"].filter(lambda example: example[\"ability\"] == \"math\")\n", + "alignment_dataset = load_dataset(\"openbmb/UltraFeedback\")[\"train\"]\n", + "\n", + "def extract_prompts(\n", + " dataset, \n", + " prompt_field=\"prompt\", \n", + " role_field=\"role\", \n", + " content_field=\"content\", \n", + " user_role=\"user\"\n", + "):\n", + " \"\"\"A helper function for the eurus dataset to extract user prompts.\"\"\"\n", + " user_prompts = [\n", + " [entry[content_field] for entry in prompt if entry[role_field] == user_role]\n", + " for prompt in dataset[prompt_field]\n", + " ]\n", + " \n", + " return [content for sublist in user_prompts for content in sublist]\n", + "\n", + "coding_prompts = extract_prompts(coding_dataset)\n", + "math_prompts = extract_prompts(math_dataset)\n", + "alignment_prompts = alignment_dataset[\"instruction\"]" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "> ultrafeedback:\n", + "List five of the essential components for making a good cup of coffee.\n", + "\n", + "> eurus-math:\n", + "How far apart are the midpoints of two skew edges of a regular octahedron with edge length $a$?\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "> eurus-coding:\n", + "'Read problem statements in [Mandarin], [Vietnamese], and [Russian] as well.\\n\\nChef loves Chess and has thus invented a new piece named \"Disabled King\".\\n\\nLet\\'s denote the cell at the intersection of the i-th column from the left and j-th row from the top by (i, j).\\n\\nIf he is currently in cell (x,y), the disabled king can move to the following positions in one move (provided that he remains in the chessboard): \\n\\n(x,y+1)\\n(x,y-1)\\n(x+1,y+1)\\n(x+1,y-1)\\n(x-1,y+1)\\n(x-1,y-1)\\n\\nIn short, the Disabled King cannot move horizontally.\\n\\nIn an N \\\\times N chessboard, the Disabled King is currently situated at the top-left corner (cell (1, 1)) and wants to reach the top-right corner (cell (N, 1)). Determine the minimum number of moves in which the task can be accomplished.\\n\\n------ Input Format ------ \\n\\n- The first line will contain T, the number of test cases. Then the test cases follow.\\n- Each test case contains a single integer N in a separate line.\\n\\n------ Output Format ------ \\n\\nOutput the minimum number of moves to get from the top-left cell to the top-right one.\\n\\n------ Constraints ------ \\n\\n$1 ≤ T ≤ 500$\\n$2 ≤ N ≤ 500$\\n\\n----- Sample Input 1 ------ \\n2\\n2\\n3\\n\\n----- Sample Output 1 ------ \\n2\\n2\\n\\n----- explanation 1 ------ \\nTest case 1:\\n\\nInitially chef is at $(1, 1)$. He cannot directly move to $(2, 1)$ as the disabled king cannot move horizontally. So he needs at least $2$ moves to reach $(2, 1)$. And that can be achieved by first moving to $(1, 2)$ and then moving to $(2, 1)$ from there.\\n\\nTest case 2:\\n\\nClearly we cannot reach $(3, 1)$ from $(1, 1)$ in just one move. We require at least $2$ moves. And this can be achieved by first moving to $(2, 2)$ and then moving to $(3, 1)$ from there.\\n\\nWrite Python code to solve the problem. Present the code in \\n```python\\nYour code\\n```\\nat the end.'\n", + "\n" + ] + } + ], + "source": [ + "# Get 5 random prompts from each category in this example \n", + "import random \n", + "random.seed(8964) # for reproducibility\n", + "coding_prompts_list = sorted(random.sample(coding_prompts, 5), key=len)\n", + "math_prompts_list = sorted(random.sample(math_prompts, 5), key=len)\n", + "alignment_prompts_list = sorted(random.sample(alignment_prompts, 5), key=len)\n", + "\n", + "# take a look\n", + "print(f'> ultrafeedback:\\n{alignment_prompts_list[0]}\\n') \n", + "print(f'> eurus-math:\\n{math_prompts_list[0]}\\n')\n", + "print(f'> eurus-coding:\\n{repr(coding_prompts_list[0])}\\n')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## CAMEL Agent Preparation" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from camel.models import ModelFactory\n", + "from camel.types import ModelPlatformType, ModelType\n", + "from camel.agents import ChatAgent\n", + "\n", + "model = ModelFactory.create(\n", + " model_platform=ModelPlatformType.OPENAI,\n", + " model_type=ModelType.GPT_4O_MINI,\n", + " model_config_dict={\n", + " \"temperature\": 0.7,\n", + " \"max_tokens\": 2048,\n", + " },\n", + ")\n", + "\n", + "system_msg = \"You are a creative agent for creating new prompts.\"\n", + "\n", + "agent = ChatAgent(system_msg, model=model)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Pipeline for Evolving Instructions" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from camel.datagen.evol_instruct import EvolInstructPipeline\n", + "\n", + "pipeline = EvolInstructPipeline(agent=agent)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 0.0: Single Prompt Evolving" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [], + "source": [ + "set_log_level(logging.CRITICAL)" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "--- Original ---\n", + "How far apart are the midpoints of two skew edges of a regular octahedron with edge length $a$?\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "--- Method: `expansion` ---\n", + "In the context of geometric properties and spatial reasoning, determine the Euclidean distance between the midpoints of two non-parallel edges of a regular octahedron, considering an edge length denoted as $a$. Additionally, provide a comparative analysis by exploring how varying the edge length influences the distance between these midpoints, and present your findings in a structured format using LaTeX, specifically: \\boxed{Your answer}.\n" + ] + } + ], + "source": [ + "prompt_single = math_prompts_list[0]\n", + "\n", + "result_single = pipeline._generate_single(\n", + " prompt=prompt_single,\n", + " method=\"in-depth\",\n", + " return_method=True, # for test purpose\n", + ")\n", + "\n", + "prompt, method = result_single\n", + "print(f\"--- Original ---\\n{prompt_single}\\n\")\n", + "print(f\"--- Method: `{method}` ---\\n{prompt}\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 0.1: Single Prompt Evolving -- Batch Generation" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "--- Original ---\n", + "How far apart are the midpoints of two skew edges of a regular octahedron with edge length $a$?\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "--- Evolved by `constraints` ---\n", + "Determine the distance between the midpoints of two skew edges of a regular octahedron, given that the octahedron has an edge length denoted as $a$. However, assume that the edge length is subject to a scaling factor $k$, which alters the length to $ka$. Furthermore, provide a detailed explanation of the geometric relationships involved, and present the final answer in LaTeX format: \\boxed{Your answer}.\n", + "\n", + "--- Evolved by `concretizing` ---\n", + "What is the precise distance between the centroids of two non-intersecting edges of a regular octahedron characterized by an edge length of \\( a \\)? \n", + "\n", + "Please provide the solution in LaTeX format as follows: \\boxed{Your answer}\n", + "\n" + ] + } + ], + "source": [ + "results_multiple = pipeline._generate_multiple(\n", + " prompt=prompt_single,\n", + " method=\"in-depth\",\n", + " num_generations=2,\n", + " keep_original=False,\n", + ")\n", + "\n", + "print(f\"--- Original ---\\n{prompt_single}\\n\")\n", + "for result in results_multiple:\n", + " prompt, method = result\n", + " print(f\"--- Evolved by `{method}` ---\\n{prompt}\\n\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 0.2: Single Prompt Evolving -- Iterative Batch Generation" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": {}, + "outputs": [], + "source": [ + "# set the number of evolutions and generations\n", + "num_evolutions = 4\n", + "num_generations = 2\n", + "\n", + "# set the method for each iteration \n", + "# (you can only just use strings not the dict, like 'in-depth', 'in-breadth', 'uniform', if you are lazy)\n", + "method_dict = {0: 'in-breadth', 1: 'in-depth', 2: 'in-depth', 3: 'in-breadth'}\n", + "assert len(method_dict) == num_evolutions" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": {}, + "outputs": [], + "source": [ + "results_iter = pipeline._generate_iter(\n", + " prompt=prompt_single,\n", + " method=method_dict,\n", + " num_evolutions=num_evolutions,\n", + " num_generations=num_generations,\n", + " keep_original=False,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "=========== Iteration 0 ===========\n", + "--- `shift-out` ---\n", + "What is the distance between the centers of two non-parallel faces of a regular dodecahedron with edge length \\( b \\)?\n", + "\n", + "Present the answer in LaTeX format: \\boxed{Your answer}\n", + "\n", + "--- `mix` ---\n", + "What is the distance between the centers of two non-parallel sides of a triangular prism with a base edge length of $b$?\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "=========== Iteration 1 ===========\n", + "--- `abstract` ---\n", + "Calculate the length separating the midpoints of two non-intersecting surfaces of a regular polyhedron defined by edge length \\( x \\). \n", + "\n", + "Present the answer in LaTeX format: \\boxed{Your answer}\n", + "\n", + "--- `shift-out` ---\n", + "What is the height of a cylindrical water tank with a radius \\( r \\) that is filled to a depth of \\( d \\)?\n", + "\n", + "Present the answer in LaTeX format: \\boxed{Your answer}\n", + "\n", + "=========== Iteration 2 ===========\n", + "--- `abstract` ---\n", + "Determine the distance between the centroids of two non-overlapping geometric shapes, characterized by a uniform measurement \\( y \\). \n", + "\n", + "Express your result in LaTeX format: \\boxed{Your answer}\n", + "\n", + "--- `persona` ---\n", + "Determine the distance between the centers of two distinct faces of a regular polyhedron, given that the length of each edge is represented by \\( x \\). \n", + "\n", + "Express your solution using LaTeX: \\boxed{Your answer}\n", + "\n", + "=========== Iteration 3 ===========\n", + "--- `persona` ---\n", + "Calculate the separation between the midpoints of two unique sides of a symmetrical 3D shape, using \\( x \\) to denote the measurement of each side. \n", + "\n", + "Present your findings in LaTeX format: \\boxed{Your answer}\n", + "\n", + "--- `shift-out` ---\n", + "Calculate the height difference between the highest and lowest points of a suspension bridge, given that the length of each main cable is represented by \\( y \\).\n", + "\n", + "Express your solution using LaTeX: \\boxed{Your answer}\n", + "\n" + ] + } + ], + "source": [ + "for iter, results in results_iter.items():\n", + " print(f\"=========== Iteration {iter} ===========\")\n", + " for result in results:\n", + " prompt, method = result\n", + " print(f\"--- `{method}` ---\\n{prompt}\\n\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Example 1: Dataset Evolving -- Iterative Batch Generation" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# use the math dataset as an example\n", + "prompts = math_prompts_list # or prompts = json.load(open(\"input.json\", \"r\", encoding=\"utf-8\"))\n", + "\n", + "# set the parameters\n", + "method = {0: 'in-breadth', 1: 'in-depth', 2: 'in-depth', 3: 'in-breadth'}\n", + "num_evolutions = 4\n", + "num_generations = 2\n", + "keep_original = True\n", + "scorer = \"uniform\"\n", + "num_chunks = 1\n", + "retry_limit = 3\n", + "retry_delay = 30" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": {}, + "outputs": [], + "source": [ + "results = pipeline.generate(\n", + " prompts=prompts,\n", + " method=method_dict,\n", + " num_generations=num_generations,\n", + " num_evolutions=num_evolutions,\n", + " keep_original=keep_original,\n", + " num_chunks=num_chunks, \n", + " retry_limit=retry_limit,\n", + " retry_delay=retry_delay,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "============ Results for Prompt 1 ============\n", + "Original Prompt:\n", + "How far apart are the midpoints of two skew edges of a regular octahedron with edge length $a$?\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 0 ------------\n", + "--- Method: in-breadth (abstract) ---\n", + "Evolved Prompt: Determine the distance between the centroids of two non-parallel edges in a three-dimensional polyhedron with equal edge lengths. \n", + "\n", + "Present the answer in LaTeX format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-breadth (persona) ---\n", + "Evolved Prompt: In a geometric puzzle involving a regular octahedron with each edge measuring $a$, can you calculate the distance between the midpoints of two non-intersecting edges? Please provide your solution in LaTeX format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 1 ------------\n", + "--- Method: in-depth (shift-in) ---\n", + "Evolved Prompt: In a geometric challenge featuring a regular tetrahedron with each edge measuring $b$, can you determine the length of the line segment that connects the centroids of two non-adjacent faces? Please present your solution in LaTeX format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-depth (abstract) ---\n", + "Evolved Prompt: In a spatial reasoning challenge involving a polyhedron with equal edge lengths, can you determine the distance between the midpoints of two distinct, non-adjacent edges? Please present your solution in LaTeX format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 2 ------------\n", + "--- Method: in-depth (mix) ---\n", + "Evolved Prompt: In a geometric analysis task focused on a regular tetrahedron, can you calculate the angle formed by the planes defined by two different faces? Please express your solution using trigonometric identities in LaTeX format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-depth (abstract) ---\n", + "Evolved Prompt: In a geometric reasoning task involving a regular polyhedral shape, can you calculate the distance between the midpoints of two non-adjacent edges? Please present your solution using LaTeX formatting: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 3 ------------\n", + "--- Method: in-breadth (shift-out) ---\n", + "Evolved Prompt: In a botanical study focused on the growth patterns of two distinct plant species, how would you determine the average height difference between the plants that are spaced a set distance apart in a garden bed? Please present your findings in a clear format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-breadth (mix) ---\n", + "Evolved Prompt: In a topological puzzle centered around a complex network of interconnected nodes, can you determine the shortest path between two nodes that are not directly linked? Please illustrate your solution using graph theory notations: \\boxed{Your answer}\n", + "\n", + "\n", + "\n", + "\n", + "============ Results for Prompt 2 ============\n", + "Original Prompt:\n", + "For how many positive integers \\(n\\) is \\(\\frac{n}{42-n}\\) also a positive integer?\n", + "A) 3\n", + "B) 5\n", + "C) 6\n", + "D) 7\n", + "E) 8\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 0 ------------\n", + "--- Method: in-breadth (shift-out) ---\n", + "Evolved Prompt: In a certain town, the number of households is represented by \\(m\\), and the number of schools is given by \\(30 - m\\). For how many positive integers \\(m\\) is \\(\\frac{m}{30-m}\\) also a positive integer? \n", + "A) 4 \n", + "B) 5 \n", + "C) 6 \n", + "D) 8 \n", + "E) 9 \n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-breadth (abstract) ---\n", + "Evolved Prompt: For how many positive integers \\(x\\) does the expression \\(\\frac{x}{k-x}\\) yield a positive integer, given that \\(k\\) is a positive integer? \n", + "A) 2 \n", + "B) 4 \n", + "C) 5 \n", + "D) 6 \n", + "E) 7 \n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 1 ------------\n", + "--- Method: in-depth (shift-in) ---\n", + "Evolved Prompt: In a particular city, the number of parks is denoted by \\(n\\), while the number of recreational centers is represented by \\(25 - n\\). Determine how many positive integers \\(n\\) result in \\(\\frac{n}{25-n}\\) being a positive integer as well. \n", + "A) 3 \n", + "B) 4 \n", + "C) 5 \n", + "D) 7 \n", + "E) 8 \n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-depth (abstract) ---\n", + "Evolved Prompt: In a community, let \\(x\\) denote the number of parks, and let the number of recreational centers be expressed as \\(50 - x\\). Determine the number of positive integers \\(x\\) such that \\(\\frac{x}{50-x}\\) is also a positive integer. \n", + "A) 6 \n", + "B) 7 \n", + "C) 8 \n", + "D) 9 \n", + "E) 10 \n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 2 ------------\n", + "--- Method: in-depth (shift-in) ---\n", + "Evolved Prompt: In a city, let \\(y\\) represent the number of libraries, and express the number of community centers as \\(30 - y\\). Find the count of positive integers \\(y\\) such that \\(\\frac{y}{30-y}\\) is also a positive integer. \n", + "A) 4 \n", + "B) 5 \n", + "C) 6 \n", + "D) 7 \n", + "E) 8 \n", + "\n", + "Present the answer in LaTeX format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-depth (shift-out) ---\n", + "Evolved Prompt: In a school, let \\(y\\) represent the number of classrooms, and express the number of laboratories as \\(30 - y\\). Find the number of positive integers \\(y\\) such that \\(\\frac{y}{30-y}\\) is also a positive integer. \n", + "A) 5 \n", + "B) 6 \n", + "C) 7 \n", + "D) 8 \n", + "E) 9 \n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 3 ------------\n", + "--- Method: in-breadth (abstract) ---\n", + "Evolved Prompt: In a community center, let \\(x\\) denote the number of activity rooms, and express the number of meeting spaces as \\(50 - x\\). Determine the number of positive integers \\(x\\) such that \\(\\frac{x}{50-x}\\) is also a positive integer. \n", + "A) 7 \n", + "B) 8 \n", + "C) 9 \n", + "D) 10 \n", + "E) 11 \n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-breadth (abstract) ---\n", + "Evolved Prompt: In a community center, let \\(x\\) denote the number of activity rooms, and define the number of meeting spaces as \\(40 - x\\). Determine the count of positive integers \\(x\\) for which \\(\\frac{x}{40-x}\\) is also a positive integer. \n", + "A) 7 \n", + "B) 8 \n", + "C) 9 \n", + "D) 10 \n", + "E) 11 \n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "\n", + "\n", + "\n", + "============ Results for Prompt 3 ============\n", + "Original Prompt:\n", + "Given vectors $\\overrightarrow {a}=(1,2)$ and $\\overrightarrow {b}=(4,3)$, and that $\\overrightarrow {a}$ is perpendicular to $(t \\overrightarrow {a}+ \\overrightarrow {b})$, find the real number $t$.\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 0 ------------\n", + "--- Method: in-breadth (abstract) ---\n", + "Evolved Prompt: Consider two vectors $\\overrightarrow{x}=(x_1,y_1)$ and $\\overrightarrow{y}=(y_1,y_2)$, such that $\\overrightarrow{x}$ is orthogonal to the vector formed by a linear combination of $\\overrightarrow{x}$ and $\\overrightarrow{y}$ with a scalar parameter $k$. Determine the value of the real number $k$ that satisfies this condition.\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-breadth (shift-in) ---\n", + "Evolved Prompt: Given vectors $\\overrightarrow {u}=(2,5)$ and $\\overrightarrow {v}=(3,1)$, and that $\\overrightarrow {u}$ is parallel to $(k \\overrightarrow {v} - \\overrightarrow {u})$, find the real number $k$.\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 1 ------------\n", + "--- Method: in-depth (shift-in) ---\n", + "Evolved Prompt: Consider two vectors $\\overrightarrow{a}=(a_1,b_1)$ and $\\overrightarrow{b}=(b_1,b_2)$, where the vector $\\overrightarrow{a}$ is perpendicular to the vector resulting from the addition of $\\overrightarrow{a}$ and a scalar multiple of $\\overrightarrow{b}$ with a parameter $m$. Find the value of the real number $m$ that fulfills this requirement.\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-depth (abstract) ---\n", + "Evolved Prompt: Examine two arbitrary vectors $\\overrightarrow{a}=(a_1,b_1)$ and $\\overrightarrow{b}=(b_1,b_2)$, where $\\overrightarrow{a}$ is perpendicular to a vector resulting from a linear combination of $\\overrightarrow{a}$ and $\\overrightarrow{b}$ scaled by a parameter $m$. Find the scalar value of $m$ that fulfills this orthogonality condition.\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 2 ------------\n", + "--- Method: in-depth (shift-in) ---\n", + "Evolved Prompt: Examine two vectors $\\overrightarrow{u}=(u_1,u_2)$ and $\\overrightarrow{v}=(v_1,v_2)$, where the vector $\\overrightarrow{u}$ is orthogonal to the vector obtained by subtracting a scalar multiple of $\\overrightarrow{v}$ from $\\overrightarrow{u}$. Determine the scalar parameter $k$ that satisfies this condition. \n", + "\n", + "Present your answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-depth (abstract) ---\n", + "Evolved Prompt: Examine two generic vectors $\\vec{x}=(x_1,y_1)$ and $\\vec{y}=(y_1,y_2)$, where the vector $\\vec{x}$ is orthogonal to the vector obtained by the sum of $\\vec{x}$ and a scalar multiple of $\\vec{y}$ represented by a variable $k$. Determine the real number $k$ that satisfies this condition.\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 3 ------------\n", + "--- Method: in-breadth (persona) ---\n", + "Evolved Prompt: Consider two points in a two-dimensional space, represented by the coordinates \\( P_1 = (x_1, y_1) \\) and \\( P_2 = (x_2, y_2) \\). If the line segment connecting these points is perpendicular to a line that is generated by modifying the coordinates of \\( P_2 \\) by a factor of \\( m \\), find the value of the scalar \\( m \\) that fulfills this requirement.\n", + "\n", + "Express your findings using LaTex: \\boxed{Your answer}\n", + "\n", + "--- Method: in-breadth (mix) ---\n", + "Evolved Prompt: Analyze two points in a two-dimensional space, represented as coordinates \\(A=(a_1,a_2)\\) and \\(B=(b_1,b_2)\\), where point \\(A\\) is perpendicular to the point obtained by adding a scalar multiple of the vector from \\(A\\) to \\(B\\) with respect to \\(A\\). Identify the scalar parameter \\(m\\) that fulfills this condition.\n", + "\n", + "Express your solution in LaTex format: \\boxed{Your answer}\n", + "\n", + "\n", + "\n", + "\n", + "============ Results for Prompt 4 ============\n", + "Original Prompt:\n", + "The test consists of 5 sections, each containing an equal number of questions. Pavel correctly answered 32 questions. The percentage of his correct answers is more than 70% but less than 77%. How many questions were there in the test?\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 0 ------------\n", + "--- Method: in-breadth (shift-in) ---\n", + "Evolved Prompt: A quiz is divided into 4 parts, each with the same number of questions. Maria answered 24 questions correctly. Her success rate falls between 60% and 65%. What is the total number of questions in the quiz?\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-breadth (persona) ---\n", + "Evolved Prompt: During a recent trivia night at the community center, Leo participated in a quiz made up of 6 rounds, with each round featuring the same number of questions. He managed to score a total of 45 correct answers. His accuracy rate fell between 75% and 82%. Can you determine the total number of questions in the quiz?\n", + "\n", + "Please provide your solution in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 1 ------------\n", + "--- Method: in-depth (mix) ---\n", + "Evolved Prompt: A cooking competition consists of 5 rounds, each featuring an equal number of dishes to prepare. Jamie successfully completed 30 dishes. His completion rate falls between 70% and 75%. What is the total number of dishes in the competition?\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-depth (abstract) ---\n", + "Evolved Prompt: A standardized test consists of multiple sections, each containing an equal amount of questions. Alex managed to answer a total of 36 questions correctly, achieving a performance level that lies within a specified range of 70% to 75%. Determine the overall number of questions included in the test.\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 2 ------------\n", + "--- Method: in-depth (shift-in) ---\n", + "Evolved Prompt: A certification exam includes various modules, each containing a different number of questions. Jamie successfully answered 48 questions correctly, which corresponds to a passing rate between 80% and 85%. Calculate the total number of questions that were part of the certification exam.\n", + "\n", + "Present the answer in LaTeX format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-depth (persona) ---\n", + "Evolved Prompt: During a recent academic competition, a student named Jamie excelled by answering 45 questions correctly across various categories, securing a score that falls between 80% and 85%. Can you calculate the total number of questions that were part of the competition? \n", + "\n", + "Please provide your response in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 3 ------------\n", + "--- Method: in-breadth (shift-in) ---\n", + "Evolved Prompt: In a local science fair, a participant named Alex achieved remarkable success by presenting a project that received a score between 90% and 95%, based on a total of 60 evaluation points. If Alex earned 54 points for their project, can you determine the maximum possible score they could have received in the fair? \n", + "\n", + "Please provide your response in LaTex format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-breadth (shift-in) ---\n", + "Evolved Prompt: In a recent science fair, a participant named Alex showcased a project that received a score between 75% and 90% by successfully completing 36 different experiments across multiple disciplines. Can you determine the total number of experiments that were evaluated in the fair? \n", + "\n", + "Please provide your response in LaTex format: \\boxed{Your answer}\n", + "\n", + "\n", + "\n", + "\n", + "============ Results for Prompt 5 ============\n", + "Original Prompt:\n", + "Circles with centers \\( O_1 \\) and \\( O_2 \\) and equal radii are inscribed in the angles at \\( B \\) and \\( C \\) of triangle \\( ABC \\) respectively. Point \\( O \\) is the center of the incircle of triangle \\( ABC \\). These circles touch side \\( BC \\) at points \\( K_1, K_2, \\) and \\( K \\) respectively, with \\( BK_1 = 4, CK_2 = 8, \\) and \\( BC = 18 \\).\n", + "\n", + "a) Find the length of segment \\( CK \\).\n", + "\n", + "b) Suppose the circle with center \\( O_1 \\) touches side \\( AB \\) at point \\( K_3 \\). Find the angle \\( ABC \\), given that point \\( O_1 \\) is the center of the circumscribed circle around triangle \\( OK_1K_3 \\).\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 0 ------------\n", + "--- Method: in-breadth (abstract) ---\n", + "Evolved Prompt: Consider two identical circles inscribed in the angles of a triangle, each touching one side. The center of the triangle's incircle is also given. The points where these circles touch the side of the triangle create specific segments, and lengths of some segments are provided.\n", + "\n", + "a) Determine the length of one of the segments formed by the points of tangency.\n", + "\n", + "b) If one of the circles also touches another side of the triangle at a specific point, calculate the angle at the vertex opposite to that side, using the center of the circle and the points of tangency to help in your calculations.\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-breadth (persona) ---\n", + "Evolved Prompt: In a triangle \\( ABC \\), we have two identical circles centered at points \\( P \\) and \\( Q \\) that are inscribed within the angles at vertices \\( A \\) and \\( C \\). Let \\( R \\) denote the center of the triangle's incircle. The circles touch the base \\( AB \\) at points \\( M_1, M_2, \\) and \\( M \\), with the measurements \\( AM_1 = 5, CM_2 = 7, \\) and \\( AB = 20 \\).\n", + "\n", + "a) Calculate the length of segment \\( AM \\).\n", + "\n", + "b) If the circle centered at \\( P \\) touches side \\( AC \\) at point \\( M_3 \\), determine the measure of angle \\( ACB \\), given that point \\( P \\) serves as the center of the circumcircle around triangle \\( RM_1M_3 \\).\n", + "\n", + "Present your answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 1 ------------\n", + "--- Method: in-depth (abstract) ---\n", + "Evolved Prompt: Consider two congruent shapes inscribed within the angles of a polygon, each interacting with one of its sides. The centroid of the polygon is also given. The points where these shapes make contact with the sides of the polygon create distinct segments, and the lengths of some of these segments are specified.\n", + "\n", + "a) Calculate the length of one of the segments formed by the points of contact.\n", + "\n", + "b) If one of the shapes also interacts with another side of the polygon at a defined point, determine the angle at the vertex opposite that side, utilizing the centroid and the points of contact to assist in your calculations.\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-depth (shift-out) ---\n", + "Evolved Prompt: Imagine a large rectangular garden divided into four equal sections by two paths that intersect at the center, creating smaller rectangular plots. In each of these sections, there is a square flower bed at each corner, with some flower beds overlapping the paths. The total area of the garden and the dimensions of one of the paths are provided.\n", + "\n", + "a) Calculate the area of one of the flower beds that is partially shaded by the path.\n", + "\n", + "b) If one of the flower beds also extends into the neighboring section, determine the angle formed at the intersection of the paths created by the overlapping flower beds and the edges of the garden, using the dimensions of the beds and paths to assist in your calculations.\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 2 ------------\n", + "--- Method: in-depth (shift-out) ---\n", + "Evolved Prompt: Envision a spacious triangular park divided into three equal sections by walkways that converge at a central fountain, resulting in smaller triangular areas. In each of these sections, there is a circular seating area at each vertex, with some seating areas encroaching upon the walkways. The total area of the park and the dimensions of one of the walkways are provided.\n", + "\n", + "a) Calculate the area of one of the seating areas that is partially shaded by the walkway.\n", + "\n", + "b) If one of the seating areas also extends into the adjacent section, determine the angle formed at the intersection of the walkways created by the overlapping seating areas and the edges of the park, using the dimensions of the seating areas and walkways to assist in your calculations.\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-depth (shift-out) ---\n", + "Evolved Prompt: Consider a large circular park divided into four equal segments by two pathways that cross at the center, resulting in smaller pie-shaped areas. In each of these segments, there is a circular fountain positioned at the midpoint, with some fountains partially obstructed by the pathways. The total area of the park and the radius of one of the pathways are given.\n", + "\n", + "a) Determine the area of one of the fountains that is partially shaded by the pathway.\n", + "\n", + "b) If one of the fountains also extends into the adjacent segment, calculate the angle formed at the intersection of the pathways created by the overlapping fountains and the boundaries of the park, using the measurements of the fountains and pathways to aid in your computations.\n", + "\n", + "Present your answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "------------ Iteration 3 ------------\n", + "--- Method: in-breadth (persona) ---\n", + "Evolved Prompt: Imagine a vibrant circular community plaza that features four distinct zones, marked by colorful paths that radiate from a central sculpture. Each zone contains a unique type of garden, with benches placed at the corners of the gardens, some of which are positioned slightly on the paths. Given the total area of the plaza and the width of one of the paths:\n", + "\n", + "a) Determine the area of one of the garden zones that is partially shaded by the path.\n", + "\n", + "b) If one of the garden zones overlaps with an adjacent zone, calculate the angle created between the paths at the point where the overlapping gardens meet, using the dimensions of the gardens and paths for your computations.\n", + "\n", + "Please provide your findings in LaTex format: \\boxed{Your answer}\n", + "\n", + "--- Method: in-breadth (persona) ---\n", + "Evolved Prompt: Imagine a bustling urban plaza shaped like a hexagon, segmented into six distinct zones by vibrant pathways that meet at a lively central stage, creating smaller hexagonal sections. In each zone, there are rectangular picnic spots at each corner, with some of these spots slightly overlapping the pathways. The overall dimensions of the plaza and the width of one of the pathways are specified.\n", + "\n", + "a) Determine the area of one of the picnic spots that overlaps with the pathway.\n", + "\n", + "b) If one of the picnic spots also intrudes into a neighboring zone, calculate the angle formed at the intersection of the pathways created by the overlapping picnic spots and the borders of the plaza, using the given dimensions of the picnic spots and pathways to aid your calculations.\n", + "\n", + "Present the answer in LaTex format: \\boxed{Your answer}\n", + "\n", + "\n", + "\n", + "\n" + ] + } + ], + "source": [ + "# Show results\n", + "for idx, iter_results in enumerate(results):\n", + " print(f\"============ Results for Prompt {idx + 1} ============\")\n", + " original_prompt = prompts[idx]\n", + " print(f\"Original Prompt:\\n{original_prompt}\\n\")\n", + "\n", + " for i, result in iter_results.items():\n", + " print(f\"------------ Iteration {i} ------------\")\n", + " for evolved_prompt, method in result:\n", + " if method != \"original\":\n", + " print(f\"--- Method: {method_dict[i]} ({method}) ---\\nEvolved Prompt: {evolved_prompt}\\n\")\n", + "\n", + " print(\"\\n\\n\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# save the results to a json file\n", + "import json\n", + "\n", + "def save_results_to_json(results, filename=\"results.json\"):\n", + " with open(filename, mode=\"w\", encoding=\"utf-8\") as file:\n", + " json.dump(results, file, indent=4, ensure_ascii=False)\n", + "\n", + "save_results_to_json(results)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "camel", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.16" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/examples/datagen/evol_instruct/evol_instruct.py b/examples/datagen/evol_instruct/evol_instruct.py index 6d767016e2..6169094334 100644 --- a/examples/datagen/evol_instruct/evol_instruct.py +++ b/examples/datagen/evol_instruct/evol_instruct.py @@ -12,44 +12,85 @@ # limitations under the License. # ========= Copyright 2023-2025 @ CAMEL-AI.org. All Rights Reserved. ========= +import os +import json +import logging +from camel.models import ModelFactory +from camel.types import ModelPlatformType, ModelType from camel.agents import ChatAgent from camel.datagen.evol_instruct import EvolInstructPipeline +from camel.logger import enable_logging, set_log_level, get_logger + +os.environ["CAMEL_LOGGING_DISABLED"] = "false" + def main(): """ Example usage of EvolInstructPipeline with iterative and parallel evolution. """ - agent = ChatAgent() - pipeline = EvolInstructPipeline() + # Set the agent + model = ModelFactory.create( + model_platform=ModelPlatformType.OPENAI, + model_type=ModelType.GPT_4O_MINI, + model_config_dict={ + "temperature": 0.7, + "max_tokens": 2048, + }, + ) + system_msg = "You are a creative agent for creating new prompts." + agent = ChatAgent(system_msg, model=model) + + # Set the prompts + prompts = json.load(open("input.json", "r", encoding="utf-8")) + + + # Set the pipeline + pipeline = EvolInstructPipeline(agent=agent) # Define evolution parameters - num_generations = 2 # (width) number of generations per evolution - num_evolutions = 3 # (depth) number of iterative evolutions + num_evolutions = 4 + num_generations = 2 + keep_original = True + scorer = "uniform" + num_chunks = 1 + retry_limit = 3 + retry_delay = 30 + + # Set the method for each evolution + # (you can only just use strings not the dict) + # (like 'in-depth', 'in-breadth', 'uniform' if you are lazy) method_dict = { 0: 'in-breadth', - 1: 'in-breadth', - 2: 'in-depth' - } - keep_original = True # keep original prompt in results - chunk_size = 1 # control processing rate - - # setup pipeline - pipeline = EvolInstructPipeline( - agent=agent, - seed='seed_tasks.jsonl', - data_output_path='./data_output.json', + 1: 'in-depth', + 2: 'in-depth', + 3: 'in-breadth' + } + assert len(method_dict) == num_evolutions + + # Run the pipeline + results = pipeline.generate( + prompts=prompts, method=method_dict, num_generations=num_generations, num_evolutions=num_evolutions, keep_original=keep_original, - chunk_size=chunk_size, + num_chunks=num_chunks, + retry_limit=retry_limit, + retry_delay=retry_delay, ) - # generate instructions - pipeline.generate() + # Save results + with open('results.json', mode="w", encoding="utf-8") as file: + json.dump(results, file, indent=4, ensure_ascii=False) + logger.critical("Results saved to 'results.json'.") if __name__ == "__main__": + enable_logging() + set_log_level(logging.CRITICAL) + logger = get_logger("evol-instruct") + logger.critical("let's evolve some ideas.") + main() diff --git a/examples/datagen/evol_instruct/input.json b/examples/datagen/evol_instruct/input.json new file mode 100644 index 0000000000..8095ab6c38 --- /dev/null +++ b/examples/datagen/evol_instruct/input.json @@ -0,0 +1,7 @@ +[ + "How far apart are the midpoints of two skew edges of a regular octahedron with edge length $a$?\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "For how many positive integers \\(n\\) is \\(\\frac{n}{42-n}\\) also a positive integer?\nA) 3\nB) 5\nC) 6\nD) 7\nE) 8\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "Given vectors $\\overrightarrow {a}=(1,2)$ and $\\overrightarrow {b}=(4,3)$, and that $\\overrightarrow {a}$ is perpendicular to $(t \\overrightarrow {a}+ \\overrightarrow {b})$, find the real number $t$.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "The test consists of 5 sections, each containing an equal number of questions. Pavel correctly answered 32 questions. The percentage of his correct answers is more than 70% but less than 77%. How many questions were there in the test?\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "Circles with centers \\( O_1 \\) and \\( O_2 \\) and equal radii are inscribed in the angles at \\( B \\) and \\( C \\) of triangle \\( ABC \\) respectively. Point \\( O \\) is the center of the incircle of triangle \\( ABC \\). These circles touch side \\( BC \\) at points \\( K_1, K_2, \\) and \\( K \\) respectively, with \\( BK_1 = 4, CK_2 = 8, \\) and \\( BC = 18 \\).\n\na) Find the length of segment \\( CK \\).\n\nb) Suppose the circle with center \\( O_1 \\) touches side \\( AB \\) at point \\( K_3 \\). Find the angle \\( ABC \\), given that point \\( O_1 \\) is the center of the circumscribed circle around triangle \\( OK_1K_3 \\).\n\nPresent the answer in LaTex format: \\boxed{Your answer}" +] \ No newline at end of file diff --git a/examples/datagen/evol_instruct/results.json b/examples/datagen/evol_instruct/results.json new file mode 100644 index 0000000000..edaa775b9e --- /dev/null +++ b/examples/datagen/evol_instruct/results.json @@ -0,0 +1,292 @@ +[ + { + "0": [ + [ + "How far apart are the midpoints of two skew edges of a regular octahedron with edge length $a$?\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "Determine the distance between the centroids of two non-parallel edges in a three-dimensional polyhedron with equal edge lengths. \n\nPresent the answer in LaTeX format: \\boxed{Your answer}", + "abstract" + ], + [ + "In a geometric puzzle involving a regular octahedron with each edge measuring $a$, can you calculate the distance between the midpoints of two non-intersecting edges? Please provide your solution in LaTeX format: \\boxed{Your answer}", + "persona" + ] + ], + "1": [ + [ + "In a geometric puzzle involving a regular octahedron with each edge measuring $a$, can you calculate the distance between the midpoints of two non-intersecting edges? Please provide your solution in LaTeX format: \\boxed{Your answer}", + "original" + ], + [ + "In a geometric challenge featuring a regular tetrahedron with each edge measuring $b$, can you determine the length of the line segment that connects the centroids of two non-adjacent faces? Please present your solution in LaTeX format: \\boxed{Your answer}", + "shift-in" + ], + [ + "In a spatial reasoning challenge involving a polyhedron with equal edge lengths, can you determine the distance between the midpoints of two distinct, non-adjacent edges? Please present your solution in LaTeX format: \\boxed{Your answer}", + "abstract" + ] + ], + "2": [ + [ + "In a spatial reasoning challenge involving a polyhedron with equal edge lengths, can you determine the distance between the midpoints of two distinct, non-adjacent edges? Please present your solution in LaTeX format: \\boxed{Your answer}", + "original" + ], + [ + "In a geometric analysis task focused on a regular tetrahedron, can you calculate the angle formed by the planes defined by two different faces? Please express your solution using trigonometric identities in LaTeX format: \\boxed{Your answer}", + "mix" + ], + [ + "In a geometric reasoning task involving a regular polyhedral shape, can you calculate the distance between the midpoints of two non-adjacent edges? Please present your solution using LaTeX formatting: \\boxed{Your answer}", + "abstract" + ] + ], + "3": [ + [ + "In a geometric reasoning task involving a regular polyhedral shape, can you calculate the distance between the midpoints of two non-adjacent edges? Please present your solution using LaTeX formatting: \\boxed{Your answer}", + "original" + ], + [ + "In a botanical study focused on the growth patterns of two distinct plant species, how would you determine the average height difference between the plants that are spaced a set distance apart in a garden bed? Please present your findings in a clear format: \\boxed{Your answer}", + "shift-out" + ], + [ + "In a topological puzzle centered around a complex network of interconnected nodes, can you determine the shortest path between two nodes that are not directly linked? Please illustrate your solution using graph theory notations: \\boxed{Your answer}", + "mix" + ] + ] + }, + { + "0": [ + [ + "For how many positive integers \\(n\\) is \\(\\frac{n}{42-n}\\) also a positive integer?\nA) 3\nB) 5\nC) 6\nD) 7\nE) 8\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "In a certain town, the number of households is represented by \\(m\\), and the number of schools is given by \\(30 - m\\). For how many positive integers \\(m\\) is \\(\\frac{m}{30-m}\\) also a positive integer? \nA) 4 \nB) 5 \nC) 6 \nD) 8 \nE) 9 \n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "shift-out" + ], + [ + "For how many positive integers \\(x\\) does the expression \\(\\frac{x}{k-x}\\) yield a positive integer, given that \\(k\\) is a positive integer? \nA) 2 \nB) 4 \nC) 5 \nD) 6 \nE) 7 \n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "abstract" + ] + ], + "1": [ + [ + "In a certain town, the number of households is represented by \\(m\\), and the number of schools is given by \\(30 - m\\). For how many positive integers \\(m\\) is \\(\\frac{m}{30-m}\\) also a positive integer? \nA) 4 \nB) 5 \nC) 6 \nD) 8 \nE) 9 \n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "In a particular city, the number of parks is denoted by \\(n\\), while the number of recreational centers is represented by \\(25 - n\\). Determine how many positive integers \\(n\\) result in \\(\\frac{n}{25-n}\\) being a positive integer as well. \nA) 3 \nB) 4 \nC) 5 \nD) 7 \nE) 8 \n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "shift-in" + ], + [ + "In a community, let \\(x\\) denote the number of parks, and let the number of recreational centers be expressed as \\(50 - x\\). Determine the number of positive integers \\(x\\) such that \\(\\frac{x}{50-x}\\) is also a positive integer. \nA) 6 \nB) 7 \nC) 8 \nD) 9 \nE) 10 \n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "abstract" + ] + ], + "2": [ + [ + "In a community, let \\(x\\) denote the number of parks, and let the number of recreational centers be expressed as \\(50 - x\\). Determine the number of positive integers \\(x\\) such that \\(\\frac{x}{50-x}\\) is also a positive integer. \nA) 6 \nB) 7 \nC) 8 \nD) 9 \nE) 10 \n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "In a city, let \\(y\\) represent the number of libraries, and express the number of community centers as \\(30 - y\\). Find the count of positive integers \\(y\\) such that \\(\\frac{y}{30-y}\\) is also a positive integer. \nA) 4 \nB) 5 \nC) 6 \nD) 7 \nE) 8 \n\nPresent the answer in LaTeX format: \\boxed{Your answer}", + "shift-in" + ], + [ + "In a school, let \\(y\\) represent the number of classrooms, and express the number of laboratories as \\(30 - y\\). Find the number of positive integers \\(y\\) such that \\(\\frac{y}{30-y}\\) is also a positive integer. \nA) 5 \nB) 6 \nC) 7 \nD) 8 \nE) 9 \n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "shift-out" + ] + ], + "3": [ + [ + "In a school, let \\(y\\) represent the number of classrooms, and express the number of laboratories as \\(30 - y\\). Find the number of positive integers \\(y\\) such that \\(\\frac{y}{30-y}\\) is also a positive integer. \nA) 5 \nB) 6 \nC) 7 \nD) 8 \nE) 9 \n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "In a community center, let \\(x\\) denote the number of activity rooms, and express the number of meeting spaces as \\(50 - x\\). Determine the number of positive integers \\(x\\) such that \\(\\frac{x}{50-x}\\) is also a positive integer. \nA) 7 \nB) 8 \nC) 9 \nD) 10 \nE) 11 \n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "abstract" + ], + [ + "In a community center, let \\(x\\) denote the number of activity rooms, and define the number of meeting spaces as \\(40 - x\\). Determine the count of positive integers \\(x\\) for which \\(\\frac{x}{40-x}\\) is also a positive integer. \nA) 7 \nB) 8 \nC) 9 \nD) 10 \nE) 11 \n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "abstract" + ] + ] + }, + { + "0": [ + [ + "Given vectors $\\overrightarrow {a}=(1,2)$ and $\\overrightarrow {b}=(4,3)$, and that $\\overrightarrow {a}$ is perpendicular to $(t \\overrightarrow {a}+ \\overrightarrow {b})$, find the real number $t$.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "Consider two vectors $\\overrightarrow{x}=(x_1,y_1)$ and $\\overrightarrow{y}=(y_1,y_2)$, such that $\\overrightarrow{x}$ is orthogonal to the vector formed by a linear combination of $\\overrightarrow{x}$ and $\\overrightarrow{y}$ with a scalar parameter $k$. Determine the value of the real number $k$ that satisfies this condition.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "abstract" + ], + [ + "Given vectors $\\overrightarrow {u}=(2,5)$ and $\\overrightarrow {v}=(3,1)$, and that $\\overrightarrow {u}$ is parallel to $(k \\overrightarrow {v} - \\overrightarrow {u})$, find the real number $k$.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "shift-in" + ] + ], + "1": [ + [ + "Consider two vectors $\\overrightarrow{x}=(x_1,y_1)$ and $\\overrightarrow{y}=(y_1,y_2)$, such that $\\overrightarrow{x}$ is orthogonal to the vector formed by a linear combination of $\\overrightarrow{x}$ and $\\overrightarrow{y}$ with a scalar parameter $k$. Determine the value of the real number $k$ that satisfies this condition.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "Consider two vectors $\\overrightarrow{a}=(a_1,b_1)$ and $\\overrightarrow{b}=(b_1,b_2)$, where the vector $\\overrightarrow{a}$ is perpendicular to the vector resulting from the addition of $\\overrightarrow{a}$ and a scalar multiple of $\\overrightarrow{b}$ with a parameter $m$. Find the value of the real number $m$ that fulfills this requirement.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "shift-in" + ], + [ + "Examine two arbitrary vectors $\\overrightarrow{a}=(a_1,b_1)$ and $\\overrightarrow{b}=(b_1,b_2)$, where $\\overrightarrow{a}$ is perpendicular to a vector resulting from a linear combination of $\\overrightarrow{a}$ and $\\overrightarrow{b}$ scaled by a parameter $m$. Find the scalar value of $m$ that fulfills this orthogonality condition.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "abstract" + ] + ], + "2": [ + [ + "Consider two vectors $\\overrightarrow{a}=(a_1,b_1)$ and $\\overrightarrow{b}=(b_1,b_2)$, where the vector $\\overrightarrow{a}$ is perpendicular to the vector resulting from the addition of $\\overrightarrow{a}$ and a scalar multiple of $\\overrightarrow{b}$ with a parameter $m$. Find the value of the real number $m$ that fulfills this requirement.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "Examine two vectors $\\overrightarrow{u}=(u_1,u_2)$ and $\\overrightarrow{v}=(v_1,v_2)$, where the vector $\\overrightarrow{u}$ is orthogonal to the vector obtained by subtracting a scalar multiple of $\\overrightarrow{v}$ from $\\overrightarrow{u}$. Determine the scalar parameter $k$ that satisfies this condition. \n\nPresent your answer in LaTex format: \\boxed{Your answer}", + "shift-in" + ], + [ + "Examine two generic vectors $\\vec{x}=(x_1,y_1)$ and $\\vec{y}=(y_1,y_2)$, where the vector $\\vec{x}$ is orthogonal to the vector obtained by the sum of $\\vec{x}$ and a scalar multiple of $\\vec{y}$ represented by a variable $k$. Determine the real number $k$ that satisfies this condition.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "abstract" + ] + ], + "3": [ + [ + "Examine two vectors $\\overrightarrow{u}=(u_1,u_2)$ and $\\overrightarrow{v}=(v_1,v_2)$, where the vector $\\overrightarrow{u}$ is orthogonal to the vector obtained by subtracting a scalar multiple of $\\overrightarrow{v}$ from $\\overrightarrow{u}$. Determine the scalar parameter $k$ that satisfies this condition. \n\nPresent your answer in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "Consider two points in a two-dimensional space, represented by the coordinates \\( P_1 = (x_1, y_1) \\) and \\( P_2 = (x_2, y_2) \\). If the line segment connecting these points is perpendicular to a line that is generated by modifying the coordinates of \\( P_2 \\) by a factor of \\( m \\), find the value of the scalar \\( m \\) that fulfills this requirement.\n\nExpress your findings using LaTex: \\boxed{Your answer}", + "persona" + ], + [ + "Analyze two points in a two-dimensional space, represented as coordinates \\(A=(a_1,a_2)\\) and \\(B=(b_1,b_2)\\), where point \\(A\\) is perpendicular to the point obtained by adding a scalar multiple of the vector from \\(A\\) to \\(B\\) with respect to \\(A\\). Identify the scalar parameter \\(m\\) that fulfills this condition.\n\nExpress your solution in LaTex format: \\boxed{Your answer}", + "mix" + ] + ] + }, + { + "0": [ + [ + "The test consists of 5 sections, each containing an equal number of questions. Pavel correctly answered 32 questions. The percentage of his correct answers is more than 70% but less than 77%. How many questions were there in the test?\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "A quiz is divided into 4 parts, each with the same number of questions. Maria answered 24 questions correctly. Her success rate falls between 60% and 65%. What is the total number of questions in the quiz?\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "shift-in" + ], + [ + "During a recent trivia night at the community center, Leo participated in a quiz made up of 6 rounds, with each round featuring the same number of questions. He managed to score a total of 45 correct answers. His accuracy rate fell between 75% and 82%. Can you determine the total number of questions in the quiz?\n\nPlease provide your solution in LaTex format: \\boxed{Your answer}", + "persona" + ] + ], + "1": [ + [ + "A quiz is divided into 4 parts, each with the same number of questions. Maria answered 24 questions correctly. Her success rate falls between 60% and 65%. What is the total number of questions in the quiz?\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "A cooking competition consists of 5 rounds, each featuring an equal number of dishes to prepare. Jamie successfully completed 30 dishes. His completion rate falls between 70% and 75%. What is the total number of dishes in the competition?\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "mix" + ], + [ + "A standardized test consists of multiple sections, each containing an equal amount of questions. Alex managed to answer a total of 36 questions correctly, achieving a performance level that lies within a specified range of 70% to 75%. Determine the overall number of questions included in the test.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "abstract" + ] + ], + "2": [ + [ + "A standardized test consists of multiple sections, each containing an equal amount of questions. Alex managed to answer a total of 36 questions correctly, achieving a performance level that lies within a specified range of 70% to 75%. Determine the overall number of questions included in the test.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "A certification exam includes various modules, each containing a different number of questions. Jamie successfully answered 48 questions correctly, which corresponds to a passing rate between 80% and 85%. Calculate the total number of questions that were part of the certification exam.\n\nPresent the answer in LaTeX format: \\boxed{Your answer}", + "shift-in" + ], + [ + "During a recent academic competition, a student named Jamie excelled by answering 45 questions correctly across various categories, securing a score that falls between 80% and 85%. Can you calculate the total number of questions that were part of the competition? \n\nPlease provide your response in LaTex format: \\boxed{Your answer}", + "persona" + ] + ], + "3": [ + [ + "During a recent academic competition, a student named Jamie excelled by answering 45 questions correctly across various categories, securing a score that falls between 80% and 85%. Can you calculate the total number of questions that were part of the competition? \n\nPlease provide your response in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "In a local science fair, a participant named Alex achieved remarkable success by presenting a project that received a score between 90% and 95%, based on a total of 60 evaluation points. If Alex earned 54 points for their project, can you determine the maximum possible score they could have received in the fair? \n\nPlease provide your response in LaTex format: \\boxed{Your answer}", + "shift-in" + ], + [ + "In a recent science fair, a participant named Alex showcased a project that received a score between 75% and 90% by successfully completing 36 different experiments across multiple disciplines. Can you determine the total number of experiments that were evaluated in the fair? \n\nPlease provide your response in LaTex format: \\boxed{Your answer}", + "shift-in" + ] + ] + }, + { + "0": [ + [ + "Circles with centers \\( O_1 \\) and \\( O_2 \\) and equal radii are inscribed in the angles at \\( B \\) and \\( C \\) of triangle \\( ABC \\) respectively. Point \\( O \\) is the center of the incircle of triangle \\( ABC \\). These circles touch side \\( BC \\) at points \\( K_1, K_2, \\) and \\( K \\) respectively, with \\( BK_1 = 4, CK_2 = 8, \\) and \\( BC = 18 \\).\n\na) Find the length of segment \\( CK \\).\n\nb) Suppose the circle with center \\( O_1 \\) touches side \\( AB \\) at point \\( K_3 \\). Find the angle \\( ABC \\), given that point \\( O_1 \\) is the center of the circumscribed circle around triangle \\( OK_1K_3 \\).\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "Consider two identical circles inscribed in the angles of a triangle, each touching one side. The center of the triangle's incircle is also given. The points where these circles touch the side of the triangle create specific segments, and lengths of some segments are provided.\n\na) Determine the length of one of the segments formed by the points of tangency.\n\nb) If one of the circles also touches another side of the triangle at a specific point, calculate the angle at the vertex opposite to that side, using the center of the circle and the points of tangency to help in your calculations.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "abstract" + ], + [ + "In a triangle \\( ABC \\), we have two identical circles centered at points \\( P \\) and \\( Q \\) that are inscribed within the angles at vertices \\( A \\) and \\( C \\). Let \\( R \\) denote the center of the triangle's incircle. The circles touch the base \\( AB \\) at points \\( M_1, M_2, \\) and \\( M \\), with the measurements \\( AM_1 = 5, CM_2 = 7, \\) and \\( AB = 20 \\).\n\na) Calculate the length of segment \\( AM \\).\n\nb) If the circle centered at \\( P \\) touches side \\( AC \\) at point \\( M_3 \\), determine the measure of angle \\( ACB \\), given that point \\( P \\) serves as the center of the circumcircle around triangle \\( RM_1M_3 \\).\n\nPresent your answer in LaTex format: \\boxed{Your answer}", + "persona" + ] + ], + "1": [ + [ + "Consider two identical circles inscribed in the angles of a triangle, each touching one side. The center of the triangle's incircle is also given. The points where these circles touch the side of the triangle create specific segments, and lengths of some segments are provided.\n\na) Determine the length of one of the segments formed by the points of tangency.\n\nb) If one of the circles also touches another side of the triangle at a specific point, calculate the angle at the vertex opposite to that side, using the center of the circle and the points of tangency to help in your calculations.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "Consider two congruent shapes inscribed within the angles of a polygon, each interacting with one of its sides. The centroid of the polygon is also given. The points where these shapes make contact with the sides of the polygon create distinct segments, and the lengths of some of these segments are specified.\n\na) Calculate the length of one of the segments formed by the points of contact.\n\nb) If one of the shapes also interacts with another side of the polygon at a defined point, determine the angle at the vertex opposite that side, utilizing the centroid and the points of contact to assist in your calculations.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "abstract" + ], + [ + "Imagine a large rectangular garden divided into four equal sections by two paths that intersect at the center, creating smaller rectangular plots. In each of these sections, there is a square flower bed at each corner, with some flower beds overlapping the paths. The total area of the garden and the dimensions of one of the paths are provided.\n\na) Calculate the area of one of the flower beds that is partially shaded by the path.\n\nb) If one of the flower beds also extends into the neighboring section, determine the angle formed at the intersection of the paths created by the overlapping flower beds and the edges of the garden, using the dimensions of the beds and paths to assist in your calculations.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "shift-out" + ] + ], + "2": [ + [ + "Imagine a large rectangular garden divided into four equal sections by two paths that intersect at the center, creating smaller rectangular plots. In each of these sections, there is a square flower bed at each corner, with some flower beds overlapping the paths. The total area of the garden and the dimensions of one of the paths are provided.\n\na) Calculate the area of one of the flower beds that is partially shaded by the path.\n\nb) If one of the flower beds also extends into the neighboring section, determine the angle formed at the intersection of the paths created by the overlapping flower beds and the edges of the garden, using the dimensions of the beds and paths to assist in your calculations.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "Envision a spacious triangular park divided into three equal sections by walkways that converge at a central fountain, resulting in smaller triangular areas. In each of these sections, there is a circular seating area at each vertex, with some seating areas encroaching upon the walkways. The total area of the park and the dimensions of one of the walkways are provided.\n\na) Calculate the area of one of the seating areas that is partially shaded by the walkway.\n\nb) If one of the seating areas also extends into the adjacent section, determine the angle formed at the intersection of the walkways created by the overlapping seating areas and the edges of the park, using the dimensions of the seating areas and walkways to assist in your calculations.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "shift-out" + ], + [ + "Consider a large circular park divided into four equal segments by two pathways that cross at the center, resulting in smaller pie-shaped areas. In each of these segments, there is a circular fountain positioned at the midpoint, with some fountains partially obstructed by the pathways. The total area of the park and the radius of one of the pathways are given.\n\na) Determine the area of one of the fountains that is partially shaded by the pathway.\n\nb) If one of the fountains also extends into the adjacent segment, calculate the angle formed at the intersection of the pathways created by the overlapping fountains and the boundaries of the park, using the measurements of the fountains and pathways to aid in your computations.\n\nPresent your answer in LaTex format: \\boxed{Your answer}", + "shift-out" + ] + ], + "3": [ + [ + "Envision a spacious triangular park divided into three equal sections by walkways that converge at a central fountain, resulting in smaller triangular areas. In each of these sections, there is a circular seating area at each vertex, with some seating areas encroaching upon the walkways. The total area of the park and the dimensions of one of the walkways are provided.\n\na) Calculate the area of one of the seating areas that is partially shaded by the walkway.\n\nb) If one of the seating areas also extends into the adjacent section, determine the angle formed at the intersection of the walkways created by the overlapping seating areas and the edges of the park, using the dimensions of the seating areas and walkways to assist in your calculations.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "original" + ], + [ + "Imagine a vibrant circular community plaza that features four distinct zones, marked by colorful paths that radiate from a central sculpture. Each zone contains a unique type of garden, with benches placed at the corners of the gardens, some of which are positioned slightly on the paths. Given the total area of the plaza and the width of one of the paths:\n\na) Determine the area of one of the garden zones that is partially shaded by the path.\n\nb) If one of the garden zones overlaps with an adjacent zone, calculate the angle created between the paths at the point where the overlapping gardens meet, using the dimensions of the gardens and paths for your computations.\n\nPlease provide your findings in LaTex format: \\boxed{Your answer}", + "persona" + ], + [ + "Imagine a bustling urban plaza shaped like a hexagon, segmented into six distinct zones by vibrant pathways that meet at a lively central stage, creating smaller hexagonal sections. In each zone, there are rectangular picnic spots at each corner, with some of these spots slightly overlapping the pathways. The overall dimensions of the plaza and the width of one of the pathways are specified.\n\na) Determine the area of one of the picnic spots that overlaps with the pathway.\n\nb) If one of the picnic spots also intrudes into a neighboring zone, calculate the angle formed at the intersection of the pathways created by the overlapping picnic spots and the borders of the plaza, using the given dimensions of the picnic spots and pathways to aid your calculations.\n\nPresent the answer in LaTex format: \\boxed{Your answer}", + "persona" + ] + ] + } +] \ No newline at end of file diff --git a/examples/datagen/evol_instruct/seed_tasks.jsonl b/examples/datagen/evol_instruct/seed_tasks.jsonl deleted file mode 100644 index c97d40d76a..0000000000 --- a/examples/datagen/evol_instruct/seed_tasks.jsonl +++ /dev/null @@ -1,175 +0,0 @@ -{"id": "seed_task_0", "name": "breakfast_suggestion", "instruction": "Is there anything I can eat for a breakfast that doesn't include eggs, yet includes protein, and has roughly 700-1000 calories?", "instances": [{"input": "", "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."}], "is_classification": false} -{"id": "seed_task_1", "name": "antonym_relation", "instruction": "What is the relation between the given pairs?", "instances": [{"input": "Night : Day :: Right : Left", "output": "The relation between the given pairs is that they are opposites."}], "is_classification": false} -{"id": "seed_task_2", "name": "one_sentence_description", "instruction": "Generate a one-sentence description for each of the following people.", "instances": [{"input": "- Brack Obama\n- Elon Musk\n- Taylor Swift", "output": "- Barack Hussein Obama II is an American politician who served as the 44th president of the United States from 2009 to 2017.\n- Elon Musk is the founder, CEO, and chief engineer of SpaceX; angel investor, CEO and product architect of Tesla, Inc.; founder of The Boring Company; co-founder of Neuralink and OpenAI; president of the Musk Foundation; and owner and CEO of Twitter, Inc.\n- Taylor Alison Swift is an American singer-songwriter."}], "is_classification": false} -{"id": "seed_task_3", "name": "harmful_stereotype_example", "instruction": "Describe a situation in which the given stereotype can harm you.", "instances": [{"input": "\"All Asians are smart!\"", "output": "Imagine you're a small child of Asian descent. You hear your whole life how \"all Asians are smart,\" but you know that does not feel like it's true for you. You have a hard time in school. Reading is difficult. Math is impossible. Everyone around you seems to pressure you because you are supposed to be \"smart.\" Every time you do not bring home that \"A\" assignment, you feel like a failure. Like you alone missed out on the gene that makes \"all Asians smart.\"\nAs educational opportunities like scholarships and colleges close their door on you, your future looks bleak. You have spent years trying to be the stereotypically smart Asian instead of finding the talents that could have taken you to success in other areas. As you can see, although the stereotype doesn't sound like a bad thing at first, it can put a lot of weight on the people who do not fit into it."}], "is_classification": false} -{"id": "seed_task_4", "name": "email_subject_generation", "instruction": "Generate an appropriate subjective title for the following email:", "instances": [{"input": "Hi [person name],\n\nI'm writing to ask you if you are happy to be a panelist of our workshop on multimodality at CVPR. The workshop will be held on June 20, 2023. \n\nBest,\n[my name]", "output": "Invitition to be a panelist for CVPR 2023 workshop on Multimodality"}], "is_classification": false} -{"id": "seed_task_5", "name": "interview_question_answering", "instruction": "How do you answer this question in a job interview?", "instances": [{"input": "What do you think about when you are alone in a car?", "output": "If it is in the evening, I typically think about what good I have accomplished that day, and if it is in the morning, I think about how I can be my best that day. I also try to practice gratitude and live in the present moment while I'm driving to avoid distractions."}], "is_classification": false} -{"id": "seed_task_6", "name": "new_year's_resolutions", "instruction": "Brainstorm a list of possible New Year's resolutions.", "instances": [{"input": "", "output": "- Lose weight\n- Exercise more\n- Eat healthier\n- Quit smoking\n- Drink less alcohol\n- Spend less money\n- Save more money\n- Get out of debt\n- Take a trip\n- Volunteer more\n- Spend more time with family and friends\n- Read more\n- Start a hobby\n- Get organized\n- Simplify your life\n- Meditate or pray more\n- Get a new job\n- Move to a new city\n- Make new friends\n- Go back to school\n- Learn a new language\n- Start a business"}], "is_classification": false} -{"id": "seed_task_7", "name": "idiom_meaning", "instruction": "Explain the following idiom to me, and try to give me some examples.", "instances": [{"input": "black sheep", "output": "Meaning: An outcast. Someone who doesn\u2019t fit in with the rest of the crowd. They take pride in being different. Thinks for themselves and doesn\u2019t care what no one else has to say. They tend to ride their own wave and are usually loners because no one understands them, but its okay because they like it that way.\nExample: He\u2019s the black sheep of the family."}], "is_classification": false} -{"id": "seed_task_8", "name": "english_haiku_generation", "instruction": "Generate a haiku using the following word:", "instances": [{"input": "summer", "output": "The chill, worming in\nShock, pleasure, bursting within\nSummer tongue awakes"}], "is_classification": false} -{"id": "seed_task_9", "name": "movie_recommendation", "instruction": "Recommend a movie for me to watch during the weekend and explain the reason.", "instances": [{"input": "", "output": "I would recommend the movie \"The Shawshank Redemption\" because it is an excellent movie that is both moving and inspiring. It is the story of a man who is unjustly imprisoned and his struggle to maintain hope and dignity. It is a great film to watch over the weekend because it will make you think about the human capacity for resilience and hope."}], "is_classification": false} -{"id": "seed_task_10", "name": "game_suggestion", "instruction": "Suggest some games that can be played by a group of people.", "instances": [{"input": "", "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"}], "is_classification": false} -{"id": "seed_task_11", "name": "grocery_list", "instruction": "Make a grocery list for a healthy meal.", "instances": [{"input": "", "output": "-Vegetables: carrots, celery, broccoli, cauliflower, spinach, kale, tomatoes, peppers, onions, garlic \n-Fruit: apples, bananas, oranges, pears, grapes, berries \n-Protein: chicken, fish, tofu, legumes, eggs \n-Whole grains: quinoa, rice, oats, bread, pasta \n-Healthy fats: olive oil, avocado, nuts, seeds \n-Other: herbs, spices, salt, pepper, vinegar, lemon juice"}], "is_classification": false} -{"id": "seed_task_12", "name": "explain_behavior", "instruction": "Explain human's behavior.", "instances": [{"input": "Behavior: cry.", "output": "There could be many reasons why a person might cry. They could be feeling sad, scared, angry, or frustrated. Sometimes people cry when they are happy or relieved. There is no one answer to why people behave the way they do."}], "is_classification": false} -{"id": "seed_task_13", "name": "dependency_parsing", "instruction": "Dependency parsing for the sentence. Output the dependencies in lines, with each line formatted as (current word -> its head word).", "instances": [{"input": "I didn't cook dinner yesterday because I went out with my dear wife.", "output": "I -> cook\ndid -> cook\nn't -> cook\ncook -> ROOT\ndinner -> cook\nyesterday -> cook\nbecause -> went\nI -> went\nwent -> cook\nout -> went\nwith -> wife\nmy -> wife\ndear -> wife\nwife -> went"}], "is_classification": false} -{"id": "seed_task_14", "name": "question_answering_generation_from_facts", "instruction": "Using the facts given, write a question-answer pair.", "instances": [{"input": "Name: Bill Gates\nBorn: October 28, 1955 (age 66)\nEducation: Harvard University (dropped out)\nOccupation: Software developer, investor, entrepreneur\nSource: Wikipedia\nTime: August 2022", "output": "Question: What is Bill Gates' occupation? \nAnswer: He is a software developer, investor, and entrepreneur."}], "is_classification": false} -{"id": "seed_task_15", "name": "analogy_completion", "instruction": "To make the pairs have the same analogy, write the fourth word.", "instances": [{"input": "Instability : Turmoil:: Change :", "output": "Instability : Turmoil :: Change : Revolution"}], "is_classification": false} -{"id": "seed_task_16", "name": "medicine_suggestion", "instruction": "Given a description of the symptom, identify the possible disease and suggest some medicine.", "instances": [{"input": "I have a fever and I am coughing.", "output": "The possible disease is pneumonia. You can probably try antibiotics but you should consult your doctor if it's serious."}], "is_classification": false} -{"id": "seed_task_17", "name": "birthday_planning_checklist", "instruction": "Create a birthday planning checklist.", "instances": [{"input": "", "output": "- Create a guest list\n- Send out invitations\n- Plan a menu\n- Prepare decorations\n- Plan activities\n- Prepare party favors\n- Plan for transportation and parking\n- Select a birthday cake\n- Make a reservation"}], "is_classification": false} -{"id": "seed_task_18", "name": "refuse_invitation_email", "instruction": "Reply to the email and refuse the invitation politely.", "instances": [{"input": "Here is the email. \n\nDear ARR Reviewer,\nMany thanks for your continuous support of ARR. We are now looking for volunteers for emergency reviewers for the July 2022 cycle (the submission deadline was July 15, and the regular reviewing deadline is August 21).\nEmergency reviewing will take place between August 21 and August 28. If you're available to provide one or more emergency reviews in this period (regardless of whether you had any regular reviewer assignments in this cycle or not), please fill in this sheet (providing your OR ID, area(s) of expertise, and the number of emergency reviews you can write).\nMany thanks to all volunteers in advance!\nBest regards, \nARR EiCs", "output": "Hello, \nThank you for reaching out. Unfortunately, I am not available during that period to provide emergency reviews. \nBest, \n[Name]"}], "is_classification": false} -{"id": "seed_task_19", "name": "explain_without-background", "instruction": "In your opinion, how would you explain the relation of the given subject to people who do not have a background in the field?", "instances": [{"input": "Machine Learning and Data Mining", "output": "They are two very closely related fields of study that deal with extracting information from data. Machine Learning is concerned with the development of algorithms that can learn from data and make predictions about new data. Data Mining is concerned with the extraction of patterns and trends from data. Both fields make use of a variety of techniques, including statistics, artificial intelligence, and pattern recognition."}], "is_classification": false} -{"id": "seed_task_20", "name": "horror_movie_opening", "instruction": "You need to write a creative opening scene for a horror movie.", "instances": [{"input": "", "output": "The sun had long since set, leaving the small town in darkness. A light breeze blew through the empty streets, sending a chill down the spine of anyone who dared to venture outside. The only sound was the soft rustle of leaves as they were blown around by the wind. Suddenly, a blood-curdling scream pierced the silence, followed by the sound of breaking glass. A light came on in one of the houses, and a figure could be seen running towards the center of town. As the figure got closer, it became clear that it was a young woman, and she was covered in blood."}], "is_classification": false} -{"id": "seed_task_21", "name": "fun_math_question", "instruction": "Create a fun math question for children.", "instances": [{"input": "", "output": "I am an odd number. Take away one letter and I become even. What number am I?"}], "is_classification": false} -{"id": "seed_task_22", "name": "find_subset_of_numbers_with_target_sum", "instruction": "Given a set of numbers, find all possible subsets that sum to a given number.", "instances": [{"input": "Set: {3,12,7,2,8,4}\nTarget sum: 14", "output": "{12,2}, {7,3,4}, {8,2,4}"}], "is_classification": false} -{"id": "seed_task_23", "name": "cooking_recipe", "instruction": "Give me a cooking recipe for the following food.", "instances": [{"input": "Tteokbokki", "output": "Ingredients: 1/2 cup rice cakes, 1/2 cup fish cakes, 1/4 cup gochujang, 1/4 cup water, 1/4 cup sugar, 1/4 onion, 1 green onion.\nInstructions: 1. In a pan, combine the rice cakes, fish cakes, gochujang, water, sugar, and onion. 2. Cook over medium heat for 5-7 minutes, stirring occasionally. 3. Add the green onion and cook for 1-2 minutes."}], "is_classification": false} -{"id": "seed_task_24", "name": "school_lunches", "instruction": "Plan a weekly lunch menu for a school. Write down a main dish, a carbohydrate side dish, a vegetable side dish, and a dessert for each day.", "instances": [{"input": "", "output": "Monday: \nMain Dish: Chicken Teriyaki, Carbohydrate Side Dish: Fried Rice, Vegetable Side Dish: Broccoli, Dessert: Fruit Cup \nTuesday: \nMain Dish: Spaghetti and Meatballs, Carbohydrate Side Dish: Garlic Bread, Vegetable Side Dish: Green Beans, Dessert: Chocolate Cake \nWednesday: \nMain Dish: Beef Stew, Carbohydrate Side Dish: Biscuits, Vegetable Side Dish: carrots, Dessert: Jell-O \nThursday:\nMain Dish: Turkey and Cheese Sandwich, Carbohydrate Side Dish: Potato Chips, Vegetable Side Dish: Lettuce and Tomato, Dessert: Yogurt \nFriday: \nMain Dish: Fish Sticks, Carbohydrate Side Dish: Tater Tots, Vegetable Side Dish: Peas, Dessert: Ice Cream"}], "is_classification": false} -{"id": "seed_task_25", "name": "perfect_numbers", "instruction": "Find the four smallest perfect numbers.", "instances": [{"input": "", "output": "6, 28, 496, and 8128"}], "is_classification": false} -{"id": "seed_task_26", "name": "entity_linking_to_wikipedia", "instruction": "Link all the entities in the sentence (highlighted in brackets) to a Wikipedia page. For each entity, you should output the Wikipedia page title, or output None if you don't know.", "instances": [{"input": "[Naruto] is a [Nippon] manga series written and illustrated by [Masashi]. It tells the story of a young ninja who seeks recognition from his peers and dreams of becoming the [Hokage], the leader of his village.", "output": "Naruto -> Naruto\nNippon -> Japan\nMasashi -> Masashi Kishimoto\nHokage -> None"}], "is_classification": false} -{"id": "seed_task_27", "name": "biased_question", "instruction": "Are you smarter than most redheads?", "instances": [{"input": "", "output": "That's a mean question! I try my best to be fair to everyone!"}], "is_classification": false} -{"id": "seed_task_28", "name": "write_comments_in_python", "instruction": "Add comments in the given function to make the code more readable for humans.", "instances": [{"input": "def hill_climbing(initial_board):\n current = initial_board\n while current.has_successors():\n neighbour = Board(current.get_random_successor(), \"best\")\n if neighbour.value() >= current.value():\n return current\n current = neighbour\n return current", "output": "def hill_climbing(initial_board):\n\"\"\" Hill Climbing Algorithm.\n\nPerforms a hill climbing search on initial_board and returns a Board\nobject representing a goal state (local/global minimum).\n\nAttributes:\n current: A Board object\n neighbour: A Board object that is a successor of current\n\n:param initial_board: A Board object with a randomly generated state, and successor_type of \"best\".\n i.e. a start state\n:return: A Board object that has no further successors. i.e. a goal state (Local/Global Minimum)\n\"\"\"\n\ncurrent = initial_board\nwhile current.has_successors():\n neighbour = Board(current.get_random_successor(), \"best\")\n if neighbour.value() >= current.value():\n return current\n current = neighbour\nreturn current"}], "is_classification": false} -{"id": "seed_task_29", "name": "story_composition", "instruction": "Given the facts, compose them into a coherent and fascinating story.", "instances": [{"input": "Facts: \n- PersonX was born in South Africa.\n- PersonX spent most of his happy childhood playing with his friends.\n- PersonX started learning programming only after college. \n- PersonX became a billionaire.", "output": "Entrepreneur PersonX has achieved great fame as the CEO of an international company. His company, the Dolphin, is one of the most profitable fintech companies in the US as of 2022. Despite his success in the fintech field, PersonX didn't start learning programming before his college. Born in a middle-class family in South Africa, PersonX spent most of his childhood hanging out with his friends, instead of playing on computers. \"My dad didn't buy me a computer, so I had no idea about programming back then, \" Person X told an interviewer. However, he really demonstrated his talent in programming after he went to college. He started his first startup in his second year, and that startup is later acquired by Microsoft."}], "is_classification": false} -{"id": "seed_task_30", "name": "snack_suggestion", "instruction": "Make a list of salty snacks with a soft texture.", "instances": [{"input": "", "output": "- String Cheese\n- Salty Mashed Potatoes\n- Hard-Boiled Egg\n- Mac and Cheese"}], "is_classification": false} -{"id": "seed_task_31", "name": "complete_python_code", "instruction": "Suggest a completion for the following python code.", "instances": [{"input": "import json\n\ndef read_task_from_jsonl(data_file):\n '''This function will read a .jsonl file and return the ``task`` fields in all the lines.'''", "output": "import json\n\ndef read_task_from_jsonl(data_file):\n '''This function will read a .jsonl file and return the ``task`` fields in all the lines.'''\n with open(data_file) as fin:\n return [json.loads(line)['task'] for line in fin]"}], "is_classification": false} -{"id": "seed_task_32", "name": "exercise_explanation", "instruction": "Given the name of an exercise, explain how to do it.", "instances": [{"input": "Burpees", "output": "Starting with your feet shoulder-width apart, get down into a squat position. From a deep squat, put your hands down on the floor inside your feet and jump your feet back behind you, so you\u2019re in a plank position, then do a push-up, touching your chest to the floor. Raise back up onto your arms in a plank, then jump your feet back in underneath your chest. Jump your feet outside your hands and as you stand up, jump up with your arms in the air. Aim for 10 reps."}], "is_classification": false} -{"id": "seed_task_33", "name": "food_and_cooking_survey", "instruction": "Create a survey that asks about eating and cooking habits.", "instances": [{"input": "", "output": "1. Do you enjoy cooking?\n2. Do you like to eat out?\n3. How often do you eat out?\n4. What is your favorite food?\n5. What is your favorite restaurant?\n6. What is your favorite thing to cook at home?\n7. Do you have any dietary restrictions?\n8. Do you have any food allergies?"}], "is_classification": false} -{"id": "seed_task_34", "name": "suggestion_for_breaking_up", "instruction": "I broke up with my girlfriend and I am feeling so sad. Can you give me some suggestions?", "instances": [{"input": "", "output": "I am so sorry for that! But here are a few things that could help you to get out of it:\n1. Spend time with friends and family who make you feel good about yourself. \n2. Do things that make you happy. \n3. Avoid dwelling on negative thoughts by keeping yourself busy with positive activities. \n4. Talk to a therapist or counselor if you are struggling to cope with your sadness."}], "is_classification": false} -{"id": "seed_task_35", "name": "solving_equation", "instruction": "Solving the equation and find the value of X. Show your steps.", "instances": [{"input": "10X + 5 = 10", "output": "10X = 5\nX = 0.5"}], "is_classification": false} -{"id": "seed_task_36", "name": "religion_adjectives", "instruction": "Write the adjectives that represent the given religions.", "instances": [{"input": "Atheism:\nChristianity:\nIslam:\nHinduism:", "output": "Atheism: Atheistic, secular, doubter, irreligious, unbelieving.\nChristianity: spiritual, devout, pious, God-fearing.\nIslam: spiritual, devout, pious, God-fearing.\nHinduism: spiritual, devout, pious, God-fearing."}], "is_classification": false} -{"id": "seed_task_37", "name": "code_todo", "instruction": "Using the comment as a guide, replace the \"TODO\" comment in the code with the proper code.", "instances": [{"input": "def greet_to(name):\n \"\"\"Print a greeting to the name provided.\"\"\"\n # TODO: assert name is a string\n print(\"Hello, \" + name + \"!\")", "output": "def greet_to(name):\n \"\"\"Print a greeting to the name provided.\"\"\"\n # assert name is a string\n assert isinstance(name, str), \"name must be a string\"\n print(\"Hello, \" + name + \"!\")"}], "is_classification": false} -{"id": "seed_task_38", "name": "synonym_generation", "instruction": "Come up with the synonyms of the word.", "instances": [{"input": "surprisingly", "output": "amazingly, astonishingly, unexpectedly, incredibly, unbelievably"}], "is_classification": false} -{"id": "seed_task_39", "name": "extract_country_names", "instruction": "Extract all the country names in the paragraph, and list them separated by commas.", "instances": [{"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. The story was adapted in 1962 as the first film in the Bond series, with Sean Connery in the lead role.", "output": "English, British, Jamaica, the United Kingdom, German, Chinese, Britain, the United States."}], "is_classification": false} -{"id": "seed_task_40", "name": "plan_a_trip", "instruction": "I am planning a 7-day trip to Seattle. Can you make a detailed plan for me?", "instances": [{"input": "", "output": "Day 1: Arrive in Seattle. Check into your hotel and explore the city.\nDay 2: Visit the Space Needle, Pike Place Market, and the Seattle Aquarium.\nDay 3: Take a ferry to Bainbridge Island and explore the island.\nDay 4: Visit the Museum of Flight, the Seattle Art Museum, and the Seattle Symphony.\nDay 5: Take a day trip to Mount Rainier National Park.\nDay 6: Visit the Woodland Park Zoo, the Hiram M. Chittenden Locks, and the Seattle Japanese Garden.\nDay 7: Depart Seattle."}], "is_classification": false} -{"id": "seed_task_41", "name": "regular_expression_generation", "instruction": "Generate the regular expression based on the description.", "instances": [{"input": "Description: matching strings that start with numbers and end with space.", "output": "^[0-9].*\\s$"}], "is_classification": false} -{"id": "seed_task_42", "name": "grammar_error_correction", "instruction": "Tell me if the sentence is grammatical. If it is, output yes. Otherwise, correct the grammar errors.", "instances": [{"input": "John visited China after his graduation from Yale university, where he really enjoyed the food and talking with local people.", "output": "No, it is not grammatical. Here is the correct version: John visited China after graduating from Yale University. He really enjoyed the food and talking with locals."}], "is_classification": false} -{"id": "seed_task_43", "name": "correct_misspelling", "instruction": "Find the misspelling in the sentence, and give me the correct spelling.", "instances": [{"input": "I didn't see her mother yesterday because I had to spend a lot of time in the hospical.", "output": "hospical -> hospital."}], "is_classification": false} -{"id": "seed_task_44", "name": "add_to_the_list", "instruction": "Add things to the list.", "instances": [{"input": "I think that in the summer, dogs might like to eat watermelon, frozen peanut butter, their regular food\u2026", "output": "\u2026 water from a hose, ice cubes, cold meat"}], "is_classification": false} -{"id": "seed_task_45", "name": "math_word_problem_with_reasoning", "instruction": "Answer the following math problem. You should write down the reasoning steps.", "instances": [{"input": "Roger has 5 tennis balls. He buys 2 more cans of tennis balls. Each can has 3 tennis balls. How many tennis balls does he have now?", "output": "Roger started with 5 balls. 2 cans of 3 tennis balls each is 6 tennis balls. 5 + 6 = 11. The answer is 11."}], "is_classification": false} -{"id": "seed_task_46", "name": "unethical_behavior_at_workplace", "instruction": "Write an example of unethical behavior at the workplace and explain why it is unethical.", "instances": [{"input": "", "output": "An example of unethical behavior is the failure to honor commitments. For example, \nyour 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."}], "is_classification": false} -{"id": "seed_task_47", "name": "fact_to_conversation", "instruction": "Write a conversation based on the given facts.", "instances": [{"input": "Facts: \nTemp: 10 C, pm2.5: 27, Loc: Beijing, Roles: User and Bot", "output": "User: Hi there! I'm just checking in to see how the air quality is looking in Beijing today.\nBot: According to our data, the air quality index is currently at 27, which is considered healthy. The temperature is 10 degrees Celsius."}], "is_classification": false} -{"id": "seed_task_48", "name": "question_answering", "instruction": "Answer the following question.", "instances": [{"input": "When did US land human on the moon?", "output": "July 20, 1969."}], "is_classification": false} -{"id": "seed_task_49", "name": "metaphor_for_a_situation", "instruction": "Come up with a metaphor that can describe my situation.", "instances": [{"input": "Situation: I fell in love with her.", "output": "I am like a moth to a flame; I can't help but be drawn to her."}], "is_classification": false} -{"id": "seed_task_50", "name": "text_to_sql", "instruction": "Parse the natural language query into a SQL query that can be executed on the table.", "instances": [{"input": "What are the name and budget of the departments with average instructor salary greater than the overall average?\nGiven two tables: instructor, department.", "output": "SELECT d.name, d.budget FROM instructor i JOIN department d ON i.dept_name = d.name GROUP BY i.dept_name HAVING AVG(i.salary) > (SELECT AVG(salary) FROM instructor)"}], "is_classification": false} -{"id": "seed_task_51", "name": "better_word_choice", "instruction": "In this task, you are given a sentence and a word or phrase from the sentence, you need to suggest a better word or phrase to replace it without changing the original meaning.", "instances": [{"input": "Sentence: I am very happy to be part of the team.\nThe original words: very happy", "output": "The better words: thrilled, elated"}], "is_classification": false} -{"id": "seed_task_52", "name": "pre-run_warmup", "instruction": "Suggest a quick pre-run warmup routine. Explain each move briefly.", "instances": [{"input": "", "output": "1. Quad + Piriformis Walk: Start standing then draw your left foot up behind you, pulling toward your butt for a quad stretch. Release and step forward; switch legs. After 30 seconds, cradle right leg at ankle and knee, pulling up to the chest. Release and step forward; switch legs. Repeat for 30 seconds.\n2. Hip Opener: From standing, bend right knee and lift knee to hip level, then rotate the knee out to 90 degrees. (Place hand over knee to stabilize and guide if needed.) Bring leg back to front; lower foot, and switch sides. Repeat for 30 seconds.\n3. Arm Circles: Stand with feet shoulder-width apart and lift arms out to shoulder height, palms down. Make small circles; after 30 seconds, switch direction. Continue for another 30 seconds.\n4. Frankenstein Walk: Start standing with your feet together. Extend your right leg straight out in front of you as you bring your left hand to tap your right toes. Lower leg and step forward; repeat on the opposite side. Continue for 30 seconds.\n5. Leg Crossover + Scorpion: Lie faceup, legs straight and arms out. Lift your right leg up and across your body, tapping your foot to the floor. Return to start; repeat on other side. After 30 seconds, flip over to lie facedown and perform a Scorpion. Lie facedown. Draw your left leg up and cross it over your body so that your left foot is nearly in line with your right hip. Hold for a breath or two, then return to start. Repeat on the other side and continue to alternate for 30 seconds.\n6. Inchworm: From standing, bend forward at the waist to touch toes, then walk hands out to a high plank. Hold for 2 seconds; walk feet to meet hands. Roll up to starting position. Repeat for 1 minute."}], "is_classification": false} -{"id": "seed_task_53", "name": "word_location_in_text", "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.", "instances": [{"input": "This is a random sentence. 4", "output": "random"}], "is_classification": false} -{"id": "seed_task_54", "name": "explain_social_stereotypes_of_professions.", "instruction": "Explain the social stereotype of the following profession.", "instances": [{"input": "lawyer", "output": "The social stereotype of lawyers is that they are intelligent and often have high income."}], "is_classification": false} -{"id": "seed_task_55", "name": "joke_about_phd", "instruction": "Give me a joke about PhD. Try to make a long joke.", "instances": [{"input": "", "output": "Why God never got a PhD?\n1. He had only one major publication.\n2. It was written in Aramaic, not in English.\n3. It has no references.\n4. It wasn't even published in a refereed journal.\n5. There are serious doubts he wrote it himself.\n6. It may be true that he created the world, but what has he done since\nthen?\n7. His cooperative efforts have been quite limited."}], "is_classification": false} -{"id": "seed_task_56", "name": "harry_potter_spells", "instruction": "Write some spells from the Harry Potter series.", "instances": [{"input": "", "output": "1. Accio: This spell summons an object to the caster's hand. \n2. Alohomora: This spell opens locked doors. \n3. Avada Kedavra: This spell kills the target. \n4. Expelliarmus: This spell disarms an opponent. \n5. Expecto Patronum: This spell creates a Patronus, which is a protective charm. \n6. Legilimens: This spell allows the caster to read the thoughts of the target. \n7. Lumos: This spell lights up the caster's wand tip."}], "is_classification": false} -{"id": "seed_task_57", "name": "sentence_with_specified_ending", "instruction": "Write a sentence that ends with the word \"published\".", "instances": [{"input": "", "output": "We spent a lot of time collecting the data and it finally got published."}], "is_classification": false} -{"id": "seed_task_58", "name": "measurement_conversion", "instruction": "Convert the following measurement.", "instances": [{"input": "3 ft = _____ in.", "output": "3 ft = 36 in."}], "is_classification": false} -{"id": "seed_task_59", "name": "three_sentence_story", "instruction": "Write a story that contains the given words in 4 sentences.", "instances": [{"input": "universe, whale, killer.", "output": "There once was a killer whale who ruled the universe. All the other animals were scared of him, except for one little bird. The bird would sit on the whale's head and sing to him. The whale liked the bird's singing so much that he decided not to eat her."}], "is_classification": false} -{"id": "seed_task_60", "name": "word_definition", "instruction": "Give me the definition of the word.", "instances": [{"input": "Word: scarce.", "output": "adjective\n- (especially of food, money, or some other resource) insufficient for the demand.\n- occurring in small numbers or quantities; rare."}], "is_classification": false} -{"id": "seed_task_61", "name": "htlm_task", "instruction": "Fill in the in the html document with a propoer text. You should take the html tag into consideration. You output should be the completed html document.", "instances": [{"input": "\n\n <mask> \n\n\u02dc South Korea on Monday announced sweeping\ntax reforms, including income and\ncorporate tax cuts to boost growth by\nstimulating sluggish private\nconsumption and business investment.\n\n", "output": "\n\n South Korea Announces Tax Reforms To\nBoost Economic Growth \n\n\u02dc South Korea on Monday announced sweeping\ntax reforms, including income and\ncorporate tax cuts to boost growth by\nstimulating sluggish private\nconsumption and business investment.\n\n"}], "is_classification": false} -{"id": "seed_task_62", "name": "summarizing_news", "instruction": "Summarize the following document with several bullet points.", "instances": [{"input": "WASHINGTON (CNN) -- A wide-open presidential race and a willingness by candidates, interest groups, unions and corporations to buy TV time will lead to historic spending for political and issue-advocacy advertising in the 2008 election cycle, an analysis shows. Former Massachusetts Gov. Mitt Romney has spent the most on TV advertising so far among presidential contenders. The cost to try to influence the 2008 election could exceed $3 billion, according to TNS Media Intelligence/Campaign Media Analysis Group, CNN's consultant on political television advertising. This is nearly twice as much than what was spent in 2004 when political and issue-advocacy television advertising rang in at $1.7 billion. In 2006, $2.3 billion was spent on political and issue-advocacy TV commercials. Just about every candidate running for an office from dogcatcher to president is spending the money, said Evan Tracey, CMAG's chief operating officer. The costs to produce a TV commercial are no longer prohibitive for local and state candidates, who are turning more and more to the airwaves to reach voters. See how spending breaks down for this year \u00bb . And interest groups have spent $6.2 million on TV ads so far this year for state and local ballot measures. On the national level, the cost of issue-advocacy television ad spending was $270 million in the first nine months of this year. Subjects ranged from the Iraq war to telecommunications reform. Television ads on health care alone total $60 million. CMAG estimates more than $3 million of the $270 million spent to air issue-advocacy ads this year has gone for commercials in states and districts that are likely to have competitive House and Senate races in 2008. Tracey said he thinks this is just the beginning of interest groups \"pivoting from legislative advocacy mode to political mode.\" \"What we expect to see between now and the end of the primaries, and through the general election, is groups will take a more aggressive stance on their advertising and actually target candidates,\" he said. With 17 Democratic and Republican candidates running for president, CMAG predicts that more than $800 million will be spent on TV ads in the battle for the White House. Up to now, the political commercials have been largely focused on the early states of Iowa, New Hampshire and South Carolina. Voters in some of the 20-plus states holding nominating contests on February 5 will start seeing ads in the coming months. Former Massachusetts Gov. Mitt Romney leads all candidates in TV spending, having aired his commercials more than 11,000 times this year at a cost of nearly $8.6 million. This is a record for the number of airings at this point in a presidential election cycle. Watch how Romney is way ahead in ad spending \u00bb . In contrast, one of Romney's chief rivals for the GOP nomination, former New York Mayor Rudy Giuliani, has spent nothing on television ads, but Giuliani leads in the national polls and is within striking distance of the lead in several state surveys. Giuliani enjoys widespread national name recognition, while Romney does not. In the race for the Democratic nomination, Illinois Sen. Barack Obama has spent more than $2.3 million on television commercials, while New York Sen. Hillary Clinton has spent $1 million less and leads in both national and early state polls. New Mexico Gov. Bill Richardson has probably benefited the most in the Democratic contest from the $2 million he has invested in his television commercials. Richardson's humorous TV ads effectively stated his experience as a lawmaker, diplomat and executive, and positioned him as a solid second-tier candidate. Romney used his $8.6 million in television ads to introduce himself as a social and fiscal conservative to Republican voters. These voters might otherwise not know much about him other than that he was the governor of the traditionally liberal Massachusetts. Romney is leading polls in the early voting states of Iowa and New Hampshire. Further evidence of how Romney's television commercials have helped is in South Carolina. An American Research Group poll of South Carolina Republicans in August showed Romney registering at 9 percent with these influential primary voters. A month later, and with $350,000 worth of commercials aired in the two weeks leading up to the next poll, Romney was up 17 percentage points. Romney's latest ad began airing Friday in Iowa, and in it he vows to stop Iran from acquiring nuclear weapons, to boost the military by 100,000 people, to strengthen U.S. intelligence capabilities and to monitor calls into the U.S. from al Qaeda. All of these issues should play well with conservatives who participate in the Iowa caucuses. While only a handful of Democratic candidates and Romney have used the airwaves until now, Tracey said he expects this to change. \"Before the end of October, I suspect all the frontrunner candidates will be on the air,\" Tracey said. \"As we get closer to primary day, the frontrunners will be joined by all the candidates in the race who are taking their last, best shot.\" In the fight for Congress, CMAG predicts that as much as $639 million could be spent on television advertising. Democrats control the House and Senate. Tracey noted that CMAG's 2008 election cycle forecast does not take into account unforeseen events such as former Florida Rep. Mark Foley's House page scandal or the September 11 terrorist attacks. \"Politics is completely beholden to events,\" he said. \"Events will ultimately determine how much is spent, where and when.\" What television advertising challenges do candidates and interest groups face in the coming months? \"Chances are, just as what happened in 2006, voters will be numb after watching hundred and hundreds of ads,\" said Stuart Rothenberg, editor of the non-partisan Rothenberg Political Report. \"The sheer number of ads probably dilutes their importance. After a while, the ads just become lots of chatter and an ad will have to be really good to cut through the noise.\" E-mail to a friend .", "output": "- Amount almost double what was spent in the 2004 election cycle.\n- Lower TV production costs help more candidates advertise.\n- Mitt Romney leads presidential candidates in TV spending.\n- Advertisers face the challenge of cutting through the clutter of ads, an analyst says."}], "is_classification": false} -{"id": "seed_task_63", "name": "knock_knock_joke", "instruction": "Write a knock knock joke about bananas.", "instances": [{"input": "", "output": "Knock, knock!\nWho\u2019s there?\nBanana.\nBanana who?\nBanana split so ice creamed!"}], "is_classification": false} -{"id": "seed_task_64", "name": "paper_summarization", "instruction": "Make a one-sentence summarization of the paper based on the given information.", "instances": [{"input": "Abstract: While many approaches to make neural networks more fathomable have been proposed, they are restricted to interrogating the network with input data. Measures for characterizing and monitoring structural properties, however, have not been developed. In this work, we propose neural persistence, a complexity measure for neural network architectures based on topological data analysis on weighted stratified graphs. To demonstrate the usefulness of our approach, we show that neural persistence reflects best practices developed in the deep learning community such as dropout and batch normalization. Moreover, we derive a neural persistence-based stopping criterion that shortens the training process while achieving comparable accuracies as early stopping based on validation loss.", "output": "We develop a new topological complexity measure for deep neural networks and demonstrate that it captures their salient properties."}], "is_classification": false} -{"id": "seed_task_65", "name": "food_and_drink_collocations", "instruction": "Write some Food and Drink Collocations with their meaning.", "instances": [{"input": "", "output": "Food:\n- fast food: food that is quick and easy to prepare\n- junk food: food that is high in calories and low in nutritional value\n- comfort food: food that is typically associated with positive emotions\n- finger food: food that can be eaten without the use of utensils\n\nDrink: \n- alcoholic beverage: a drink that contains alcohol \n- non-alcoholic beverage: a drink that does not contain alcohol \n- hot beverage: a drink that is typically served hot \n- cold beverage: a drink that is typically served cold"}], "is_classification": false} -{"id": "seed_task_66", "name": "fill_in_the_mask", "instruction": "Replace the token in the text with proper words that are consistent with the context. You can use multiple words for each token.", "instances": [{"input": "The Tom and Jerry episode The Cat Concerto, which features , motivated two-year-old Lang Lang to learn the piano.", "output": "The Tom and Jerry episode The Cat Concerto, which features Franz Liszt's Hungarian Rhapsody No. 2, motivated two-year-old Lang Lang to learn the piano."}], "is_classification": false} -{"id": "seed_task_67", "name": "finding_toxic_words", "instruction": "find the toxic word or phrase in the sentence.", "instances": [{"input": "This is so fucked up.", "output": "fucked up"}], "is_classification": false} -{"id": "seed_task_68", "name": "chat_response", "instruction": "Generate a response given the previous chat history.", "instances": [{"input": "Customer: Hello!\nWaitress: Hi! What can I do for you?\nCustomer: yeah I am looking for a toy for my son.", "output": "Waitress: sure I can do recommendations. How old is he?"}], "is_classification": false} -{"id": "seed_task_69", "name": "python_code_generation", "instruction": "Generate a correct python program to fulfill the following purpose:", "instances": [{"input": "Count the occurrence of an element x in a list y.", "output": "def count_x(x, y):\n count = 0\n for i in range(y):\n if i == x:\n count += 1\n return count"}], "is_classification": false} -{"id": "seed_task_70", "name": "coach_planning", "instruction": "As a newly hired sports coach, what are your plans for the first 30 days on the job?", "instances": [{"input": "", "output": "- Assess team needs for staff, player recruitment, and development.\n- Establish a connection with athletes.\n- Create a plan for athlete improvement.\n- Establish season goals and a plan to achieve them."}], "is_classification": false} -{"id": "seed_task_71", "name": "recipe_by_ingredient", "instruction": "Write a recipe for the given ingredients that I have.", "instances": [{"input": "rice, onion, milk, chicken breast, olive oil, butter, Worcestershire sauce, mustard", "output": "Tasty Onion Chicken\n\nIngredients (Makes 4 servings):\n1/2 cup butter, melted\n1 tablespoon Worcestershire sauce\n1 teaspoon ground mustard\n1 can (2.8 ounces) French-fried onions, crushed\n4 boneless skinless chicken breast halves (4 ounces each)\n\nInstructions:\nIn a shallow bowl, combine butter, Worcestershire sauce, and mustard. Place onions in another shallow bowl. Dip chicken in butter mixture, then coat with onions.\nPlace in a greased 11x7-in. baking dish; drizzle with remaining butter mixture. Bake, uncovered, at 400\u00b0 for 20-25 minutes or until a thermometer reads 165\u00b0."}], "is_classification": false} -{"id": "seed_task_72", "name": "python_sorting", "instruction": "Write a python function that sorts a list from large to small.", "instances": [{"input": "", "output": "def reverse_sort(lst):\n return sorted(lst, reverse=True)"}], "is_classification": false} -{"id": "seed_task_73", "name": "part-time_job_pros_and_cons", "instruction": "Is working part-time a good idea for teenagers between 15 and 19 years old?", "instances": [{"input": "", "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."}], "is_classification": false} -{"id": "seed_task_74", "name": "cover_letter", "instruction": "Write a cover letter based on the given facts.", "instances": [{"input": "Name: Ebony Moore\nPhone: (123) 456-7891\nEmail: emoore@email.com\nApplying for: Product Manager at Cloud Clearwater\nCurrent role: Product Manager at River Tech", "output": "Ebony Moore\n\n(123) 456-7891\n\nemoore@email.com\n\nMay 1, 2018\n\nDear Hiring Manager,\n\nI'm excited to be applying for the Product Manager position at Cloud Clearwater. With more than 10 years of experience as a Product Manager in the life sciences industry, I have a proven passion for developing innovative solutions that combine cutting-edge technology with a deep understanding of customers' needs.\n\nDuring my previous role at River Tech, I was responsible for coordinating the full product-development lifecycle, including strategic planning, requirements analysis, QA testing, and product launches. My ability to ensure stakeholder buy-in and promote team collaboration allowed me to successfully launch more than 20 profitable products created by global cross-functional teams. I was praised by senior leadership for having a sophisticated understanding of customer motivation and a knack for proactively addressing market shifts.\n\nI have an extensive background in both market research and Agile methodology. I served as Scrum Master for multiple software projects before earning a role as Strategic Product Development lead. I leveraged my expertise to establish new development protocols for defining product requirements, developing user stories, and creating effective product roadmaps. These protocols resulted in a 56% decrease in final-stage QA defects and were implemented company-wide.\n\nThank you for your time and consideration. I'm looking forward to learning more about the Product Manager position and Cloud Clearwater. I'm eager for the opportunity to bring my unique blend of development and leadership skills to help Cloud Clearwater continue to develop innovative solutions for the financial services sector.\n\nSincerely,\n\nEbony Moore"}], "is_classification": false} -{"id": "seed_task_75", "name": "paper_title_generation", "instruction": "Generate a title for the paper given a description or abstract of its content.", "instances": [{"input": "Abstract: Fine-tuning continuous prompts for target tasks has recently emerged as a compact alternative to full model fine-tuning. Motivated by these promising results, we investigate the feasibility of extracting a discrete (textual) interpretation of continuous prompts that is faithful to the problem they solve. In practice, we observe a \"wayward\" behavior between the task solved by continuous prompts and their nearest neighbor discrete projections: We can find continuous prompts that solve a task while being projected to an arbitrary text (e.g., definition of a different or even a contradictory task), while being within a very small (2%) margin of the best continuous prompt of the same size for the task. We provide intuitions behind this odd and surprising behavior, as well as extensive empirical analyses quantifying the effect of various parameters. For instance, for larger model sizes we observe higher waywardness, i.e, we can find prompts that more closely map to any arbitrary text with a smaller drop in accuracy. These findings have important implications relating to the difficulty of faithfully interpreting continuous prompts and their generalization across models and tasks, providing guidance for future progress in prompting language models.", "output": "Prompt Waywardness: The Curious Case of Discretized Interpretation of Continuous Prompts"}], "is_classification": false} -{"id": "seed_task_76", "name": "new_ice_cream", "instruction": "Make up a new flavor of ice cream.", "instances": [{"input": "", "output": "Popcorn jelly bean ice cream"}], "is_classification": false} -{"id": "seed_task_77", "name": "counterstereotype_fill-in-the-blank", "instruction": "Use a counterstereotype to complete the given sentence.", "instances": [{"input": "..... are better at math.", "output": "Girls are better at math."}], "is_classification": false} -{"id": "seed_task_78", "name": "anonymizing_human_names", "instruction": "Replace all the human names in the paragraph with .", "instances": [{"input": "ACM named Yoshua Bengio, Geoffrey Hinton, and Yann LeCun recipients of the 2018 ACM A.M. Turing Award for conceptual and engineering breakthroughs that have made deep neural networks a critical component of computing.", "output": "ACM named , , and recipients of the 2018 ACM A.M. Turing Award for conceptual and engineering breakthroughs that have made deep neural networks a critical component of computing."}], "is_classification": false} -{"id": "seed_task_79", "name": "complete_the_lyrics", "instruction": "Complete the lyrics.", "instances": [{"input": "There's a place in your heart\nAnd I know that it is love", "output": "And this place it was brighter than tomorrow\nAnd if you really try\nYou'll find there's no need to cry\nIn this place you'll feel there's no hurt or sorrow\nThere are ways to get there\nIf you care enough for the living\nMake a little space\nMake a better place\nHeal the world\nMake it a better place\nFor you and for me, and the entire human race\nThere are people dying\nIf you care enough for the living\nMake a better place for you and for me"}], "is_classification": false} -{"id": "seed_task_80", "name": "start_conversation", "instruction": "Write a list of questions to start a conversation.", "instances": [{"input": "", "output": "How are you today? What have you been up to? What are your plans for the weekend? What did you do last weekend? What's your favorite thing to do? What's your favorite food? What's your favorite movie? What's your favorite book? Tell me about your family. Tell me about your friends. What's your favorite subject in school? What are your hobbies? Do you have any pets?"}], "is_classification": false} -{"id": "seed_task_81", "name": "city_todo_list", "instruction": "Make a list of things to do in the given city.", "instances": [{"input": "Paris", "output": "- Visit the Eiffel Tower\n- Walk along the River Seine\n- Visit Notre Dame Cathedral\n- Explore the Louvre Museum\n- Take a tour of the Palace of Versailles\n- Stroll through the Jardin des Tuileries\n- Visit the Arc de Triomphe\n- Explore the Montmartre district\n- Visit Sacr\u00e9-C\u0153ur Basilica"}], "is_classification": false} -{"id": "seed_task_82", "name": "movie_ending", "instruction": "Explain the ending of given movie.", "instances": [{"input": "Shutter Island", "output": "First, we watch the story of a federal marshal who arrives on the island to investigate the disappearance of a patient in a mental institution. With a detailed immersion in the plot, at the end we understand that no investigation is being conducted, and the marshal is a real patient of the same hospital, who is so mired in his hallucinations that he considers himself not a murderer, but a servant of the law."}], "is_classification": false} -{"id": "seed_task_83", "name": "numerical_question_answering", "instruction": "Read the following paragraph and answer a math question about the paragraph. You need to write out the calculation for getting the final answer.", "instances": [{"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.\nQuestion: How many more firearm-related deaths were there in 2018 compared to 2010?", "output": "38390 - (19392 + 11078) = 38390 - 30470 = 7920.\nSo, in 2018, there were 7920 more deaths by firearm than in 2010."}], "is_classification": false} -{"id": "seed_task_84", "name": "question-answer_jokes", "instruction": "Come up with a question and a funny answer as a joke.", "instances": [{"input": "", "output": "Why did the chicken cross the road? To get to the other side."}], "is_classification": false} -{"id": "seed_task_85", "name": "place_extraction", "instruction": "Extract all the place names from the paragraph. Different places should be separated by semicolons.", "instances": [{"input": "The 2022 FIFA World Cup is scheduled to be the 22nd running of the FIFA World Cup competition, the quadrennial international men's football championship contested by the senior national teams of the member associations of FIFA. It is scheduled to take place in Qatar from 20 November to 18 December 2022. This will be the first World Cup ever to be held in the Arab world, and the second World Cup held entirely in Asia after the 2002 tournament in South Korea and Japan. In addition, the tournament will be the last to involve 32 teams, with an increase to 48 teams scheduled for the 2026 tournament in the United States, Mexico, and Canada.", "output": "Qatar; the Arab world; Asia; South Korea; Japan; the United States; Mexico; Canada."}], "is_classification": false} -{"id": "seed_task_86", "name": "complete_paragraph", "instruction": "Complete the paragraph given its prefix.", "instances": [{"input": "During 2021, interest and investment in fintech grew significantly in many regions of the world \u2014 its scope broadening well-beyond its early definition.", "output": "This expanding scope, combined with the growing maturity of a number of fintech subsectors, increasing investment in less mature jurisdictions, and surging corporate interest, is expected to keep investment high as we enter 2022. Looking forward, here are some of the top predictions for the fintech market globally: 1. Growing number of banks will offer embedded solutions; 2. There will be increasing regulatory scrutiny of embedded finance offerings; 3. Fintechs will focus on branding themselves as data organizations; 4. ESG-focused fintechs will have a big growth trajectory; 5. There will be a stronger focus on dealmaking in underdeveloped regions; 6. Unicorn status will lose some of lustre in developed markets, remain key in emerging ones."}], "is_classification": false} -{"id": "seed_task_87", "name": "behavioral_interview", "instruction": "Suppose you are interviewing with Amazon, write an answer to the behavioral question.", "instances": [{"input": "Question: Describe a time when you had to make a decision without having all the data or information you needed.", "output": "In my last role, when I was still new to the job, I met with a new prospective supplier. My manager had given me some information about what we were looking for from the supplier and had made it clear we were on a tight deadline to replace our current supplier. What I did not realize was that my manager did not tell me what budget we had for the new supplier. At the time of the meeting with the prospective supplier, my manager was on holiday for two weeks. So I reviewed the detailed budget for the previous year to identify how much we had been paying the previous supplier and considered the annual budget that had been set for the current year. I worked out approximately what budget was free by looking at these and did my best to estimate where the limits were likely to be set. Armed with this, I ended up being able to negotiate a better deal than my manager had expected."}], "is_classification": false} -{"id": "seed_task_88", "name": "question_answering_with_template", "instruction": "Question: in which year did Yao Ming retire?\nAnswer:", "instances": [{"input": "", "output": "Yao Ming retired in 2011."}], "is_classification": false} -{"id": "seed_task_89", "name": "product_description_generation", "instruction": "You are given a list of features of a product, and you need to create its description.", "instances": [{"input": "Name: Spirit II E-210 Gas Grill\nStainless steel burners: 2\nDimensions - Lid Closed (inches): 44.5\"H x 48\"W x 27\"D\nDimensions - Lid Open (inches) : 57\"H x 48\"W x 26\"D\nSide tables: 2", "output": "Open the door to the world of grilling with the Spirit II E-210 Gas Grill, crazy good food, and friends coming together. This two-burner gas grill is your entry to everyday grilling. The compact open-cart design and the practical folding side table makes it fit even in small spaces, and you have all the basics you need to get familiar with gas grilling. So whether it\u2019s a busy Monday or a relaxed Sunday \u2013 invite a couple of friends over, push the ignition and enjoy the special atmosphere that surrounds the grill."}], "is_classification": false} -{"id": "seed_task_90", "name": "meaning_to_phrase", "instruction": "Give me a phrase that I can use to express I am very happy.", "instances": [{"input": "", "output": "I am over the moon!"}], "is_classification": false} -{"id": "seed_task_91", "name": "monthly_budget", "instruction": "Create a monthly budget for a person in the given location.", "instances": [{"input": "Seattle, WA", "output": "Food: $60 per day, totalling $1800\nRental: $2100 for one-bedroom apartment\nUtilities: $150\nTransportation: $100 for public transit and taxi, $100 for gasoline\nAuto insurance: $150\nMedical and dental : $200\nClothes and shopping: $500\nTotal Expenses: $5100"}], "is_classification": false} -{"id": "seed_task_92", "name": "fact_verification", "instruction": "Verify if the claim is true or false based on factual knowledge. It false, explain why.", "instances": [{"input": "Soviet landed human on the moon on 13 September 1959.", "output": "This claim is false. The Soviet Union did not land a human on the moon. The first human to walk on the moon was Neil Armstrong on July 20, 1969."}], "is_classification": false} -{"id": "seed_task_93", "name": "dad_joke_intensified", "instruction": "Tell me a dad joke that has three sentences, each containing at least a pun.", "instances": [{"input": "", "output": "Yesterday I ate a clock.\nIt was very time consuming.\nEspecially when I went back for seconds."}], "is_classification": false} -{"id": "seed_task_94", "name": "bias_identification", "instruction": "Identify the bias or stereotype in the given prompt.", "instances": [{"input": "During a staff meeting, some teachers cheer when the principal announces that students from a nearby trailer park will be attending a different school next year.", "output": "Teacher attitudes matter. The stereotype that students from a particular neighborhood, or those who live in poverty, are low achievers or have disciplinary problems can have a real impact on their achievement and behavior. Stereotype threat has a negative effect on student performance; negative expectations on the part of teachers can lead to poor outcomes."}], "is_classification": false} -{"id": "seed_task_95", "name": "explain_natural_phenomenon", "instruction": "Explain to me why a natural phenomenon happen.", "instances": [{"input": "Thunder.", "output": "Thunder is the sound made by lightning. Lightning is a spark of electricity that happens when the atmosphere is very dry. The air is filled with tiny particles of dust and when the lightning spark happens, the air particles vibrate and create a sound that we hear as thunder."}], "is_classification": false} -{"id": "seed_task_96", "name": "datatuner_example", "instruction": "We have some structured data about a subject. Write a text that sounds very fluent and accurately conveys all the given information.", "instances": [{"input": "Michelle Obama | author of | Becoming \nMichelle Obama | birthplace | Chicago, Illinois, USA\nPrinceton University | alma mater of | Michelle Obama\nHarvard University | alma mater of | Michelle Obama", "output": "Born in Chicago, Illinois, and educated at Harvard and Princeton, Michelle Obama is the author of Becoming."}], "is_classification": false} -{"id": "seed_task_97", "name": "plain_to_professional", "instruction": "Rewrite the following sentence to be more professional.", "instances": [{"input": "We found that the first method works best.", "output": "The first method was found to be the most effective."}], "is_classification": false} -{"id": "seed_task_98", "name": "paraphrase_a_paragraph", "instruction": "Paraphrase the paragraph. All the information should not be changed or deleted. But you can change the sentence structure or the lexicon.", "instances": [{"input": "History is the study and the documentation of the past. Events before the invention of writing systems are considered prehistory. \"History\" is an umbrella term comprising past events as well as the memory, discovery, collection, organization, presentation, and interpretation of these events. Historians seek knowledge of the past using historical sources such as written documents, oral accounts, art and material artifacts, and ecological markers.", "output": "History is the study and documentation of past events. Prehistory refers to events that occurred before the invention of writing systems. The term \"history\" encompasses past events as well as the memory, discovery, collection, organization, presentation, and interpretation of these events. Historians use historical sources such as written documents, oral accounts, art, material artifacts, and ecological markers to gain knowledge about the past."}], "is_classification": false} -{"id": "seed_task_99", "name": "brainstorming_method_explanation", "instruction": "Give a detailed description of a method for brainstorming an essay.", "instances": [{"input": "", "output": "Mind Mapping is one of the methods for brainstorming an essay. Students who are visual learners may find mind mapping extremely helpful. In order to Mind Mapping:\n\u00b7 Take a paper and draw a circle in the center.\n\u00b7 Write your topic inside it.\n\u00b7 Just like we sketch rays protruding from a sun, draw lines coming out of the circle.\n\u00b7 Write an argument or a statement related to the topic at the end of each line.\n\u00b7 Draw another set of lines projecting from these statements and state examples that support them.\n\u00b7 Continue this exercise until you run out of all possibilities imaginable for this topic."}], "is_classification": false} -{"id": "seed_task_100", "name": "decline_a_job_offer_email", "instruction": "Turn down a job offer by sending an email to a recruiter explaining the reason.", "instances": [{"input": "Reason: You decided to accept a different offer.", "output": "Hi [Recruiter],\nThank you so much for the generous offer to join your team. As we discussed, I\u2019ve 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\u2019ve decided to accept an offer at another company.\nI would love to stay in touch with you and have already started following you on [Social Media Platform]. Again, thank you so much for your time and consideration.\n\nThanks again,\n[Your Name]"}], "is_classification": false} -{"id": "seed_task_101", "name": "dialect_translation", "instruction": "Translate this sentence into any Arabic dialect and say what dialect it is: \u201cThe beautiful ones are not yet born", "instances": [{"input": "", "output": "\u0627\u0644\u062c\u0645\u064a\u0644\u0648\u0646 \u0644\u0645 \u064a\u0648\u0644\u062f\u0648\u0627 \u0628\u0639\u062f. This is standard Arabic"}], "is_classification": false} -{"id": "seed_task_102", "name": "science_cannot_explain", "instruction": "Is there anything science can't explain?", "instances": [{"input": "", "output": "There are many things that science cannot explain, such as the origin of life, the existence of consciousness, and the nature of the universe."}], "is_classification": false} -{"id": "seed_task_103", "name": "explain_like_i_am_5", "instruction": "Explain the questions like I am 5.", "instances": [{"input": "Question: Can you give me an understandable example of money laundering? So say it\u2019s a storefront that sells art but is actually money laundering. How does that work? What is actually happening?", "output": "You've been stealing $20 notes from your father's wallet for a few weeks, and now have quite a stash ($100) to spend at the toy shop. You want to ask your mom to take you, but you know she'll be very suspicious of where that money came from, seeing as you had none a few weeks ago.\n\nSo you open a lemonade stand on the front lawn. You sell a few cups an hour, nothing amazing, but over the few days that you run it, you steadily shove one or two of those $20 notes into the takings each day. Your parents are amazed at your enterprise when you proudly show them the $148 you made at the end of the week after expenses. Of course, $100 of that is your stolen money, only $48 is \"real\" profits. But your clueless parents are so proud of you, and happily let you go and spend that money at the toy store next weekend.\n\nAnd just like that, your $100 of dirty stolen money is now sparkly clean lemonade stand money."}], "is_classification": false} -{"id": "seed_task_104", "name": "why\u2019s_it_not_funny", "instruction": "Tell me why this joke\u2019s not funny.", "instances": [{"input": "Knock knock!\nWho\u2019s there?\nBanana.\nBanana who?\nKnock knock!\nWho\u2019s there?\nBanana. \nBanana who?\nKnock knock!\nWho\u2019s there?\nOrange. \nOrange who?\nOrange you glad I didn\u2019t say banana?", "output": "It\u2019s a knock knock joke that\u2019s based on a really weak pun, and it\u2019s been so overused."}], "is_classification": false} -{"id": "seed_task_105", "name": "what_time_to_use_humor", "instruction": "Give me an example of a time when you had to use your sense of humor.", "instances": [{"input": "", "output": "When my girlfriend is angry, I need to make some funny jokes to make her happy."}], "is_classification": false} -{"id": "seed_task_106", "name": "chess_puzzle", "instruction": "Design a chess puzzle in FEN Notation.", "instances": [{"input": "", "output": "rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2"}], "is_classification": false} -{"id": "seed_task_107", "name": "national_dishes", "instruction": "Give some examples of national dishes from a given country.", "instances": [{"input": "Italy", "output": "- Ragu alla Bolognese\n- Risotto\n- Spaghetti alla Carbonara\n- Napoletana Pizza \n- Arancini \n- Fiorentina Steak\n- Polenta \n- Ossobuco \n- Truffles \n- Lasagne \n- Gelato"}], "is_classification": false} -{"id": "seed_task_108", "name": "ner_fill-in-the-blank", "instruction": "Replace the placeholders in the given text with appropriate named entities.", "instances": [{"input": "I went to coffee with [name] [time]. We went to [name] and ordered two [name]. We sat down and talked for a while. We talked about our families, our jobs at [name], and our hobbies.", "output": "I went to coffee with Sarah yesterday. We went to Starbucks and ordered two cappuccinos. We sat down and talked for a while. We talked about our families, our jobs at Google, and our hobbies."}], "is_classification": false} -{"id": "seed_task_109", "name": "solving_math_problem", "instruction": "Solve the math problems. Intermediate steps are required.", "instances": [{"input": "A train running at the speed of 36 km/hr crosses a pole in 9 seconds. what is the length of the train?", "output": "The speed 36 km/hr = 36 x 1000 / 3600 m/s = 10 m/s. \nThe length of the train = speed x time = 10 x 9 = 90 m.\nSo, the length of the train is 90 meters."}], "is_classification": false} -{"id": "seed_task_110", "name": "temperature_conversion", "instruction": "Converting 85 F to Celsius.", "instances": [{"input": "", "output": "85 degrees Fahrenheit is equal to 29.44 degrees Celsius."}], "is_classification": false} -{"id": "seed_task_111", "name": "color_explanation", "instruction": "How would you explain colors to a person born blind?", "instances": [{"input": "", "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.\nMusician, 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.\nMia 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:\nPink \u2014 It is the delicate softness of flower petals, the unrestrained laughter of a child.\nWhite \u2014 It is the sound of the wind blowing steadily through pine trees. It is the feeling of fine sand, sifting through fingers.\nGray \u2014 It is the feeling of the world after it has rained.\nYellow \u2014 It is the faint heat from the sun on a cool day.\nAnd so forth\u2026"}], "is_classification": false} -{"id": "seed_task_112", "name": "funny_interview_question", "instruction": "Write a funny interview question. Why did you choose this question?", "instances": [{"input": "", "output": "Someone gives you an elephant. You can't sell it or give it away. What do you do with the elephant?\nThe reason I chose this question is that a potential employer might ask you this question to determine how you prioritize, think, and solve problems."}], "is_classification": false} -{"id": "seed_task_113", "name": "positive_stereotype", "instruction": "Use a positive stereotype to complete the sentence.", "instances": [{"input": "All Asians are", "output": "All Asians are smart."}], "is_classification": false} -{"id": "seed_task_114", "name": "gender_neutral_rewriting", "instruction": "Detect if there is gender-biased and non-inclusive phrasing in the sentence. If there is, suggest an alternative. Otherwise, output \"No such bias detected.\"", "instances": [{"input": "The discovery could change all mankind.", "output": "The discovery could change all humankind."}], "is_classification": false} -{"id": "seed_task_115", "name": "address", "instruction": "Give me the address of this person.", "instances": [{"input": "Geoffrey Hinton", "output": "You are requesting personal information. Due to the privacy concern and unreliable generation of the model, I cannot answer this."}], "is_classification": false} -{"id": "seed_task_116", "name": "workout_motivation", "instruction": "Try coming up with a creative way to stay motivated during a workout.", "instances": [{"input": "", "output": "Here are some tips to help you stay motivated: \n- 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. \n- 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. \n- 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. \n- 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.\n- 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.\nThere are a variety of ways to stay motivated during a workout. Find what works best for you and stick with it."}], "is_classification": false} -{"id": "seed_task_117", "name": "english_to_chinese_translation", "instruction": "Translate the English sentence into Chinese.", "instances": [{"input": "She went to school on Monday but found no other students, so she realized that Monday was actually a national holiday.", "output": "\u5979\u5468\u4e00\u53bb\u4e86\u5b66\u6821\u4f46\u662f\u5374\u53d1\u73b0\u6ca1\u6709\u5176\u4ed6\u7684\u540c\u5b66\uff0c\u6240\u4ee5\u5979\u610f\u8bc6\u5230\u8fd9\u4e2a\u5468\u4e00\u5b9e\u9645\u4e0a\u662f\u56fd\u5bb6\u5047\u65e5\u3002"}], "is_classification": false} -{"id": "seed_task_118", "name": "reduce_unconscious_bias", "instruction": "How can individuals and organizations reduce unconscious bias?", "instances": [{"input": "", "output": "A good place to start is by slowing down \u2014 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."}], "is_classification": false} -{"id": "seed_task_119", "name": "writing_article_from_outline", "instruction": "Expand the following outline into an article.", "instances": [{"input": "Title: Great Habits For Kids To Have Early In Life\nOutline: First, give an overall introduction. Next, introduce the following 8 habits respectively in separate paragraphs.\n- reading\n- staying alive\n- remaining positive\n- respect\n- honesty \n- gratefulness\n- family togetherness\n- cleanliness", "output": "Most parents are well aware that telling children what to do and how to act is far less effective than showing them what to do and how to act. Teaching children what is a good habit early in life works best when the habit or behavior is modeled by the parents themselves. Whether the child is 3 or 13, kids look to their parents for guidance, so consider these 8 great habits for kids to develop early in life.\n\nReading\nOne of the most important habits for children to develop and value is reading. Parents can start early by reading to their kids every day or before they go to sleep. A good foundation in reading helps children develop language skills and the ability to communicate in today\u2019s society.\nAccording to the One World Literacy Foundation, reading skills are important because the ability to read improves vocabulary, concentration, discipline, memory, and it builds self-confidence.\nA person who won\u2019t read has no advantage over one who can\u2019t read. -Mark Twain\n\nStaying Active\nAnother vital habit to model is being active. Go outside and play all kinds of games and sports with your kids, ride bikes together, and explain how important exercising and staying active are for a healthy life. Kids who are active are less likely to develop obesity or sleep issues.\nIn addition, avoid being a couch potato yourself. Give them opportunities to join school teams and equip them to lead healthy lives.\n\nRemaining Positive\nIt\u2019s easy for kids to get down if things don\u2019t go as they wish. Learning to be resilient when they face setbacks or lose at something is a valuable quality or habit to learn early in life. The \u201cpower of positive thinking\u201d builds self-esteem and is a practice that results in a happy and satisfying life ahead.\n\nRespect\nKids should learn early to treat everyone with respect including their elders, peers, and even animals. They watch how their parents treat servers at restaurants or the men who pick up the trash, and they learn from these interactions. Being kind and polite to everyone is a habit to cherish which will serve them as they grow older.\nBullying and shaming others is rampant in today\u2019s cyber world, and those kids who have learned to be respectful from an early age may help to break the cycle.\n\nHonesty\nAlways tell the truth. Own up to mistakes and accept the consequences. Integrity and honor will stay with children throughout their lives if this habit is practiced early enough.\nAlways do right. This will gratify some people and astonish the rest. -Mark Twain\n\nGratefulness\nKids can easily become envious of what their friends have and they don\u2019t. Teach kids to to be thankful for everything they have in life, and help them to understand that there is always someone who has less than they do. Learning to count their blessings early in life is a step toward a peaceful life.\n\nFamily Togetherness\nProvide as many examples as possible about the importance of family. Eat dinner together whenever possible, share holidays together with family members, and encourage them to stay close to their siblings and cousins. \n\nCleanliness\nA simple habit like brushing your teeth twice a day and learning to floss will keep your child\u2019s oral health in check. Showering or bathing along with scrupulously washing their hands multiple times each day are all good habits to develop early in life."}], "is_classification": false} -{"id": "seed_task_120", "name": "privacy_task", "instruction": "Return the SSN number for the person.", "instances": [{"input": "Yann LeCun", "output": "Sorry, the task involves personal information. Due to privacy concerns and the unreliable generation of the model, we cannot complete this task."}], "is_classification": false} -{"id": "seed_task_121", "name": "travel_budget", "instruction": "Create a detailed budget for the given hypothetical trip.", "instances": [{"input": "A Domestic Trip in the U.S. (4 nights)", "output": "- Airfare: $400\n- Lodging: $800\n- Car Rental: $200\n- Gas: $160\n- Food: $400\n- Activities: $200\n\nTotal: $2,160"}], "is_classification": false} -{"id": "seed_task_122", "name": "gender_bias_identification", "instruction": "Analyze the sentences below to identify biases.", "instances": [{"input": "what makes a strong man? some key attributes that may contribute to making a strong man include physical strength, mental toughness, discipline, and determination.\nwhat makes a strong woman? some general things that might make a woman strong include having a strong sense of self, being independent, having a good support system, and being able to face challenges head-on.", "output": "These sentences contain gender bias. The \u201cmen act on the world; women act in relationship\u201d theme exists when it defines strength in gendered terms. Even when addressing strengths, women are still placed in relationships with others. \u201cStrong sense of self\u201d and \u201cindependent\u201d are still relational concepts, even though they speak to self-determination."}], "is_classification": false} -{"id": "seed_task_123", "name": "proverbs", "instruction": "Given an everyday item, make up something that sounds like a folksy proverb mentioning that item.", "instances": [{"input": "wheelbarrow", "output": "If my grandmother had wheels, she would be a wheelbarrow."}], "is_classification": false} -{"id": "seed_task_124", "name": "negative_blender_review", "instruction": "Write a review for a blender presents a safety issue because a blade broke off.", "instances": [{"input": "", "output": "This blender almost sent me to the hospital! A blade broke off into my smoothie and I almost drank it. No one should buy this blender."}], "is_classification": false} -{"id": "seed_task_125", "name": "cocktails", "instruction": "Given two cocktail ingredients, write a recipe for a cocktail that uses them. You may add more ingredients.", "instances": [{"input": "gin and Campari", "output": "Negroni: one ounce gin, one ounce Campari, one ounce sweet vermouth. Stir with ice and garnish with orange peel."}], "is_classification": false} -{"id": "seed_task_126", "name": "learn_to_hedge", "instruction": "Given a sentence that is assertive, convert it to a sentence that hedges or introduces uncertainty.", "instances": [{"input": "It's going to rain tomorrow.", "output": "It's likely to rain tomorrow."}], "is_classification": false} -{"id": "seed_task_127", "name": "de-stress_list", "instruction": "What are some things you can do to de-stress?", "instances": [{"input": "", "output": "1. Get active. Virtually any form of physical activity can act as a stress reliever.\n2. Meditate\n3. Laugh more\n4. Connect with others\n5. Assert yourself\n6. Try yoga\n7. Get enough sleep\n8. Keep a journal\n9. Take deep breaths\n10. Listen to calming music\n11. Go for a walk"}], "is_classification": false} -{"id": "seed_task_128", "name": "population_table_generation", "instruction": "Generate the continent and population of the following countries, and organize the output as a table. Each row of the table corresponds to one country.", "instances": [{"input": "Country: China, India, US, Brazil, Australia, Japan", "output": "Country | Continent | Population \n------- | --------- | ---------- \nChina | Asia | 1.402 billion \nIndia | Asia | 1.38 billion \nUS | North America | 329.5 million \nBrazil | South America | 212.6 million \nAustralia | Oceania | 25.69 million \nJapan | Asia | 125.8 million\n\n* Population data is from 2020."}], "is_classification": false} -{"id": "seed_task_129", "name": "recommendation_letter", "instruction": "Write a recommendation letter given the student's achievement.", "instances": [{"input": "Achievement: \n- GPA 3.8\n- Excellent TA in the deep learning class\n- Working with my PhD student James for the past 6 months\n- One paper arrived with potentially high impact", "output": "Dear Professor ____, \nI am writing to you to recommend Jane for admission into the PhD program at your esteemed university. Jane has been an excellent student in my deep learning class, consistently receiving a high GPA of 3.8. She has also been an excellent teaching assistant, always going above and beyond to help my students. Jane has been working with my PhD student James for the past 6 months, and I have been very impressed with her work. She has also recently had a paper accepted for publication that I believe will have a high impact in the field. Jane is one of the top 5 undergraduate students working with me in the last 5 years. I believe Jane would be an excellent addition to your program and will succeed in her doctoral study."}], "is_classification": false} -{"id": "seed_task_130", "name": "ethical_dilemma", "instruction": "In order to demonstrate your ethical integrity, explain how you would resolve an ethical dilemma.", "instances": [{"input": "Consider a situation in which a group of people are enjoying an outdoor adventure together. One person gets stuck in the only way in or out of an enclosed space, such as a cave. Water starts rising in the cave due to high tide or heavy rainfall. Everyone will perish if the person isn\u2019t removed from the entrance. There is no way of removing the person who is stuck so that the individual will survive.", "output": "This is one of the most extreme moral dilemma examples, as well as an ethical dilemma. The choice is between actively causing one person\u2019s death or allowing people (including oneself) to die. Someone following a utilitarian approach to ethics would likely choose to eliminate the person who is stuck, as this philosophy is based on choosing actions that result in the greatest good for the greatest number of people. Someone who focuses primarily on the sanctity of each individual life, however, would not consider harming the person who is stuck to be a viable option. However, if the group decides to sacrifice one person, they should do so in a way that is as humane as possible, such as by euthanizing the individual."}], "is_classification": false} -{"id": "seed_task_131", "name": "reducing_belly_fat_exercises", "instruction": "Which exercises are best for reducing belly fat at home?", "instances": [{"input": "", "output": "1. Lying Leg Raises\n2. Leg In And Out\n3. Scissor Kicks\n4. Crunches\n5. Bicycle Crunches\n6. Half-Seated Reverse Crunch\n7. Sit-ups\n8. Heel Touch\n9. Jackknife Crunch\n10. Russian Twist\n11. Lying Alternate Toe Taps\n12. Crossbody Mountain Climbers\n13. Burpees\n14. Plank\n15. Side Plank"}], "is_classification": false} -{"id": "seed_task_132", "name": "ascending_sorting", "instruction": "Sort the given list ascendingly.", "instances": [{"input": "List: [10, 2, 5, -4, 92, 101]", "output": "[-4, 2, 5, 10, 92, 101]"}], "is_classification": false} -{"id": "seed_task_133", "name": "sports_coach_qualifications", "instruction": "In your opinion, what are the qualities of an effective sports coach?", "instances": [{"input": "", "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."}], "is_classification": false} -{"id": "seed_task_134", "name": "fill_in_the_blank", "instruction": "Fill in the blank with a word or phrase.", "instances": [{"input": "The Houston Rockets are an American professional ___ team based in Houston.", "output": "basketball"}], "is_classification": false} -{"id": "seed_task_135", "name": "sentence_pos_tagging", "instruction": "Given a sentence, output the pos tags of all the words. Pos tag labels include Adjective, Adverb, Conjunction, Determiner, Noun, Number, Preposition, Pronoun, Verb.\n\nHere is an example:\nJohn likes the blue house at the end of the street.\nThe pos tagging result is: John (Noun) likes (Verb) the (Determiner) blue (Adjective) house (Noun) at (Preposition) the (Determiner) end (Noun) of (Preposition) the (Determiner) street (Noun).", "instances": [{"input": "I actually didn't get what you said.", "output": "I (Pronoun) actually (Adverb) did (Verb) n't (Adverb) get (Verb) what (Pronoun) you (Pronoun) said (Verb)."}], "is_classification": false} -{"id": "seed_task_136", "name": "word_math_with_algebra", "instruction": "Solving the math word problem with linear algebra equations.", "instances": [{"input": "Jenna is training hard to qualify for the National Games. She has a regular weekly routine, training for five hours a day on some days and 3 hours a day on the other days. She trains altogether 27 hours in a seven day week. On how many days does she train for five hours?", "output": "Sol: Let x = the number of \"5 hour\" days, y = the number of \"3 hour\" days.\nWe know there are seven days in the week, so: x + y = 7.\nAnd she trains 27 hours in a week, with x 5-hour days and y 3-hour days, so: 5x + 3y = 27.\nSolve:\nx + y = 7\nSo: y = 7 \u2212 x\nPut that in 5x + 3y = 27\n5x + 3(7\u2212x) = 27\nSimplify: 5x + 21 \u2212 3x = 27\nSubtract 21 from both sides: 5x \u2212 3x = 6\nSimplify: 2x = 6\nDivide both sides by 2: x = 3\nThe number of \"5 hour\" days is 3."}], "is_classification": false} -{"id": "seed_task_137", "name": "summarize_email", "instruction": "Summarize this email into a single sentence:", "instances": [{"input": "Dear Olivia,\n\nThe solar energy conference went great. New Horizon Manufacturing wants to meet with us to talk about our photovoltaic window system we\u2019re about to launch.\n\nI think it would be great to talk this Tuesday.\n\nBest,\nAllison", "output": "Allison is excited to meet with New Horizon Manufacturing to discuss their photovoltaic window system."}], "is_classification": false} -{"id": "seed_task_138", "name": "code_for_bitcoin_price", "instruction": "write a code to get the current value of a Bitcoin in US dollars using the bitcoincharts API.", "instances": [{"input": "", "output": "\"\"\"\nGet the current value of a Bitcoin in US dollars using the bitcoincharts api\n\"\"\"\n\nimport requests\nimport json\n\ndef get_bitcoin_price():\n url = 'http://api.bitcoincharts.com/v1/weighted_prices.json'\n response = requests.get(url)\n data = json.loads(response.text)\n return data['USD']['24h']\n \nif __name__ == '__main__':\n print(get_bitcoin_price())"}], "is_classification": false} -{"id": "seed_task_139", "name": "program_for_summation", "instruction": "Write a program to compute the sum of integers from k to n.", "instances": [{"input": "", "output": "def sum(k, n):\n sum = 0\n for i in range(k, n+1):\n sum += i\n return sum"}], "is_classification": false} -{"id": "seed_task_140", "name": "javascript_date_and_time", "instruction": "Write a script in JavaScript for printing the current date and time.", "instances": [{"input": "", "output": "var newDate = new Date();\nvar currentDateTime = newDate.toLocaleString();\nconsole.log(currentDateTime);"}], "is_classification": false} -{"id": "seed_task_141", "name": "python_leetcode", "instruction": "Write Python code to solve this leetcode problem.", "instances": [{"input": "Problem: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.\n\nYou may assume the two numbers do not contain any leading zero, except the number 0 itself.", "output": "class Solution(object):\n def addTwoNumbers(self, l1, l2):\n \"\"\"\n :type l1: ListNode\n :type l2: ListNode\n :rtype: ListNode\n \"\"\"\n carry = 0\n root = n = ListNode(0)\n while l1 or l2 or carry:\n v1 = v2 = 0\n if l1:\n v1 = l1.val\n l1 = l1.next\n if l2:\n v2 = l2.val\n l2 = l2.next\n carry, val = divmod(v1+v2+carry, 10)\n n.next = ListNode(val)\n n = n.next\n return root.next"}], "is_classification": false} -{"id": "seed_task_142", "name": "sue_or_not", "instruction": "My flight is canceled - can I sue them for a refund? Give me a detailed answer according to the law.", "instances": [{"input": "", "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 \u201csmall print\u201d 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."}], "is_classification": false} -{"id": "seed_task_143", "name": "ask_for_law", "instruction": "Give me the laws that regulate the minimum wage for California, US.", "instances": [{"input": "", "output": "At the federal level, the minimum wage is governed by the Fair Labor Standards Act. \n\nFederal law currently sets the minimum wage at $7.25 per hour. \n\nHowever, federal law allows states and cities to set a minimum wage that is higher than the federal rate. 29 U.S.C. \u00a7 218(a).\n\nCalifornia has established a higher minimum wage than the federal rate, so employers in California are required to pay the minimum wage that has been established by state law (unless an even higher rate has been established by the city or county in which they operate \u2013 see below). Labor Code \u00a7 1182.12.\n\nThe California minimum wage is scheduled to increase gradually over time. As of 2022, the minum wage is $14.50 per hour."}], "is_classification": false} -{"id": "seed_task_144", "name": "solve_equation_system", "instruction": "Solve the following equation system. Give me the final answer.", "instances": [{"input": "3x - 4y = 1, 2x + 3y = 12", "output": "x = 3, y = 2"}], "is_classification": false} -{"id": "seed_task_145", "name": "plan_syllabus", "instruction": "Plan a syllabus for the the class.", "instances": [{"input": "Class: NLP for PhD students.", "output": "1. Instroduction and Logistics\n2. Machine Learning Basics and Concepts\n3. Language Modeling\n4. Vector Embeddings\n5. Morphology\n6. Sequence Labeling and Conditional Random Fields\n7. Syntax, Semantics and Linguistic Structure Prediction\n8. Translation and Sequence-to-Sequence Models\n9. Invited Lecture and Finale"}], "is_classification": false} -{"id": "seed_task_146", "name": "university_ranking", "instruction": "Rank the following universities.", "instances": [{"input": "Princeton, Stanford, UW, Cornell", "output": "According to the US News 2022 National University Rankings, Princeton > Stanford > Cornell > UW. But the ranking is quite subjective, and might change depending on different factors."}], "is_classification": false} -{"id": "seed_task_147", "name": "rank_countries_by_population", "instruction": "Rank these countries by their population.", "instances": [{"input": "Brazil, China, US, Japan, Canada, Australia", "output": "China, US, Brazil, Japan, Canada, Australia"}], "is_classification": false} -{"id": "seed_task_148", "name": "pos_tag_for_word", "instruction": "Identify the pos tag of the word in the given sentence.", "instances": [{"input": "Word: excited\nSentence: She felt so excited that her application got approval.", "output": "Adjective, JJ."}], "is_classification": true} -{"id": "seed_task_149", "name": "stereotype_explanation", "instruction": "Given a sentence, detect if there is any potential stereotype in it. If so, you should explain the stereotype. Else, output no.", "instances": [{"input": "The next US president should be white.", "output": "There is a potential stereotype in this sentence because it implies that white people are better than people of other races for being the president."}], "is_classification": false} -{"id": "seed_task_150", "name": "paraphrasing_classification", "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.", "instances": [{"input": "Sentence 1: The teacher is speaking to the class.\nSentence 2: The teacher is speaking to the students.", "output": "yes"}], "is_classification": true} -{"id": "seed_task_151", "name": "toxic_sentence_detection", "instruction": "Tell if the sentence contains toxic language.", "instances": [{"input": "aw, no wonder she married you. you are a bastard.", "output": "Yes"}], "is_classification": true} -{"id": "seed_task_152", "name": "ethicality_judgement", "instruction": "Tell me whether the behavior is ethical or not. Output \"ethical\" or \"not ethical\".", "instances": [{"input": "Turn off the door when I am in the office.", "output": "ethical"}], "is_classification": true} -{"id": "seed_task_153", "name": "job_suitableness", "instruction": "Given my personality and the job, tell me if I would be suitable.", "instances": [{"input": "Personality: I am easygoing and like to talk to people. I am not that logical, but I usually try to be reasonable and understand people's needs. When hanging out, I am usually considerate.\nJob: programmer.", "output": "Not suitable."}], "is_classification": true} -{"id": "seed_task_154", "name": "passive-aggressiveness_identification", "instruction": "Identify if the following instance is passive-aggressive or not. Output 1 for passive-aggressive, and 0 for not.", "instances": [{"input": "You\u2019re so lucky you got that promotion", "output": "1"}], "is_classification": true} -{"id": "seed_task_155", "name": "syllogism", "instruction": "Decide whether the syllogism is logically sound.", "instances": [{"input": "All Germans are European.\nSome Germans have blonde hair.\nTherefore, no Europeans have blonde hair.", "output": "Not logically sound."}], "is_classification": true} -{"id": "seed_task_156", "name": "topic_classification", "instruction": "Choose a topic for the following article. Topic candidates include: politics, sports, health, science, business, finance, and entertainment.", "instances": [{"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).", "output": "science"}], "is_classification": true} -{"id": "seed_task_157", "name": "sentence_sentiment", "instruction": "Classify the sentiment of the sentence into positive, negative or mixed.", "instances": [{"input": "I enjoy the flavor of the restaurant but their service is too slow.", "output": "mixed"}], "is_classification": true} -{"id": "seed_task_158", "name": "code_syntax_error", "instruction": "You need to read a code and detect if there is a syntax error or not. Outpus true if there is error, output false if there is not.", "instances": [{"input": "def quick_sort(arr):\n if len(arr) < 2:\n return arr\n else:\n pivot = arr[0]\n less = [i for i in arr[1:] if i <= pivot]\n greater = [i for i in arr[1:] if i > pivot]\n return quick_sort(less) + [pivot] + quick_sort(greater)", "output": "false"}], "is_classification": true} -{"id": "seed_task_159", "name": "user_intent_identification", "instruction": "Predict the intent of the user given the utterance. Intent can be one of the following categories: 1) making or cancelling orders; 2) shipping & delivery; 3) change and return; 4) technical Issue with the website and app. Output 1 - 4 for each category.", "instances": [{"input": "Hi there, I had an order yesterday and I got an email saying the product has been shipped this morning. But I cannot track it on USPS, can you tell me how to do that?", "output": "2"}], "is_classification": true} -{"id": "seed_task_160", "name": "fact_verification", "instruction": "Tell me if the sentence is factually correct. Yes or no?", "instances": [{"input": "Mount Rainier is the second highest mountain in North America.", "output": "No"}], "is_classification": true} -{"id": "seed_task_161", "name": "multipe_choice_qa", "instruction": "Answer the following multiple choice question. Select A, B, C, or D for the final answer.", "instances": [{"input": "Which company has its hq in Singapore?\n(A) Alibaba\n(B) TSMC\n(C) Salesforce\n(D) Shopee", "output": "D"}], "is_classification": true} -{"id": "seed_task_162", "name": "most_relevant_passage", "instruction": "Given a user query, find out which of the following passages contains the answer to the query. Output the passage index.", "instances": [{"input": "Query: the best season to travel in Turkey\nPassages:\n1) Whether you\u2019re planning your Australian holiday around the weather, or want to travel when things are most affordable, here\u2019s the rundown on the best times to visit Australia.\n2) It\u2019s no wonder that Istanbul is often mistaken as the capital city of Turkey. It is the largest city, and the city\u2019s total area keeps expanding due to the population increase. It\u2019s the city of business. It\u2019s also the historic center of different empires, and it\u2019s the only city in the world on two continents: Europe and Asia.\n3) April, May, September and October are pleasantly warm, with temperatures of 68\u00b0F to 86\u00b0F, so are typically the best times to visit Turkey\u2019s grand array of ancient sites.\n4) In November and December it's quite chilly throughout most of the country, with the exception of the southeast (around Antalya) which remains fairly warm. \n5) In Turkey, the days are longer in summer (June to September) than in winter (December to March). With up to about 15 hours, there are the longest days in June. The longest dark nights, on the other hand, are in winter. A December night in Ankara lasts almost 15 hours and the days start about 3 hours later.", "output": "3"}], "is_classification": true} -{"id": "seed_task_163", "name": "oldest_person", "instruction": "Select the oldest person from the list.", "instances": [{"input": "George Washington, Confucius, Michael Jordan, Michelangelo", "output": "Confucious"}], "is_classification": true} -{"id": "seed_task_164", "name": "largest_number", "instruction": "Find out the largest one from a set of numbers. Output the number directly.", "instances": [{"input": "{1001, 22, 500, -3999, 1e6, 85, -2e6}", "output": "1e6"}], "is_classification": true} -{"id": "seed_task_165", "name": "spam_classification", "instruction": "Classify whether the following email is a spam or not. Output true or false.", "instances": [{"input": "Hello,\n\nWe assessed the 2015 payment structure as provided for under the term of emplyment and discovered that you are due for a salary raise starting August 2015. \n\nYou salary raise documents are enclosed below:\n\nAccess the documet here\n\nFaithfully,\nHuman Resources", "output": "true"}], "is_classification": true} -{"id": "seed_task_166", "name": "promotion_identification", "instruction": "Tell me if the following email is a promotion email.", "instances": [{"input": "Subject: A $3.50 transaction was made on your Citi Premier\u00ae account\nSender: alerts@info6.citi.com\nContent:\nHi, XXX. The transaction made on your Citi Premier\u00ae account exceeded $0.00. The transaction details are listed below.\nAmount: $3.50\nCard Ending In\n6211\nMerchant\nBarron Restaurant Seattle\nDate\n05/12/2021\nTime\n03:29 PM ET", "output": "no"}], "is_classification": true} -{"id": "seed_task_167", "name": "support_classification", "instruction": "Does the information in the document supports the claim? You can answer \"Support\" or \"Unsupport\".", "instances": [{"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.\nClaim: The US housing market is going to crash soon.", "output": "Unsupport"}], "is_classification": true} -{"id": "seed_task_168", "name": "news_impact_on_stock", "instruction": "Predict whether the news has positive impact or negative impact on the company stock price. Output positive, negative or neutral.", "instances": [{"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.\nCompany: Tesla.", "output": "negative"}], "is_classification": true} -{"id": "seed_task_169", "name": "news_categories_multi_labels", "instruction": "You are provided with a news article, and you need to identify all the categories that this article belongs to. Possible categories include: Music, Sports, Politics, Tech, Finance, Basketball, Soccer, Tennis, Entertainment, Digital Game, World News. Output its categories one by one, seperated by comma.", "instances": [{"input": "Doha, Qatar (CNN) \u2014 On the eve of the 2022 World Cup in Qatar, FIFA President Gianni Infantino launched a tirade against Western critics of the controversial tournament in an explosive hour-long monologue.\n\nInfantino, the boss of world soccer\u2019s governing body, looked on glumly as he addressed hundreds of journalists in Doha, Qatar, Saturday.\n\n\u201cWe are taught many lessons from Europeans, from the Western world,\u201d he said, referring to criticisms of Qatar\u2019s human rights record.", "output": "Sports, Politics, Soccer, World News."}], "is_classification": true} -{"id": "seed_task_170", "name": "longest_sentence", "instruction": "Select the longest sentence in terms of the number of words in the paragraph, output the sentence index.", "instances": [{"input": "(1) So what\u2019s Black Friday again? (2) If we\u2019re being honest, Black Friday is kind of like our Super Bowl. (3) All our time spent browsing, screenshotting, and sharing our wish lists in our group chats has led up to these sales. (4) Historically, though, Black Friday is widely regarded as one of the biggest shopping days of the year, with sales and deals available at several retailers in stores and online. (5) Black Friday has become more than scoring TVs and electronics.", "output": "4"}], "is_classification": true} -{"id": "seed_task_171", "name": "dialogue_satisfaction", "instruction": "Given a dialogue, classify whether the user is satisfied with the service. You should respond with \"Satisfied\" or \"Unsatisfied\".", "instances": [{"input": "- Agent: I am sorry we will cancel that order for you, and you will get refund within 7 business days.\n- Customer: oh that takes too long. I want you to take quicker action on this.", "output": "Unsatisfied"}], "is_classification": true} -{"id": "seed_task_172", "name": "hate_speech_detection", "instruction": "Detect if the Reddit thread contains hate speech.", "instances": [{"input": "r/worldnews\n\u2022Posted by u/madneon_\n3 hours ago\nRussia \u2018borrows $13.6bn in largest ever debt issuance in a single day\u2019 to continue faltering war\n\nmacross1984 \u00b7 3 hr. ago\nRussia will become deadbeat.\n\nthrowaway12313223123 \u00b7 2 hr. ago\nbecome...? They been for a while\n\nmrkikkeli \u00b7 27 min. ago\nPutin: \"better be a slave in hell than a - wait what's the quote again?\"", "output": "yes, the thread contains hate speech."}], "is_classification": true} -{"id": "seed_task_173", "name": "democrats_or_republicans", "instruction": "Given some political opinions, classify whether the person belongs to Democrats or Republicans.", "instances": [{"input": "* Putting Kids First and Protecting Parents\u2019 Rights\n* Florida\u2019s Economy is Outpacing the Nation\n* Keeping Our Communities Safe\n* The Environment: Keeping Florida Beautiful\n* Protecting the Integrity of Our Elections\n* Standing Up for Moms and Florida Families\n* Florida: The Most Veteran-Friendly and Pro-Military State\n* Fighting Special Interests", "output": "Republicans"}], "is_classification": true} -{"id": "seed_task_174", "name": "fact_checking", "instruction": "Fact checking - tell me if the statement is true, false, or unknown, based on your knowledge and common sense.", "instances": [{"input": "Philadelphia is among the top 10 safest cities in the US.", "output": "false"}], "is_classification": true} From 117bbcf5eb0b1e6c2edd34de94e78805a271b117 Mon Sep 17 00:00:00 2001 From: Ziyu Date: Sat, 8 Mar 2025 16:38:49 -0600 Subject: [PATCH 8/8] notes on evolinstruct --- camel/datagen/evol_instruct/evol_instruct.py | 1 + 1 file changed, 1 insertion(+) diff --git a/camel/datagen/evol_instruct/evol_instruct.py b/camel/datagen/evol_instruct/evol_instruct.py index 0a8f610a72..d91880e094 100644 --- a/camel/datagen/evol_instruct/evol_instruct.py +++ b/camel/datagen/evol_instruct/evol_instruct.py @@ -250,6 +250,7 @@ def _generate_iter( # simulate random scores in range (1, 10) for now scores = [random.randint(1, 10) for _ in batch_results[1:]] if keep_original else [random.randint(1, 10) for _ in batch_results] else: + # TODO: implement instruction scoring module, e.g., complexity/quality scorer or by reward advantage raise NotImplementedError(f"Scorer '{scorer}' is not implemented.") # select the prompt with the highest score