From 544e66ece90d527da352475c3af5b42bf6d5a598 Mon Sep 17 00:00:00 2001 From: Sukriti Goyal Date: Tue, 12 Dec 2023 20:09:11 +0530 Subject: [PATCH] Add experiments and data generation --- .gitignore | 2 + experiments/DatasetGeneration.ipynb | 674 ++++++++++++++++++++++++++++ 2 files changed, 676 insertions(+) create mode 100644 experiments/DatasetGeneration.ipynb diff --git a/.gitignore b/.gitignore index c6de552..db643b3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ config.py __pycache__ .vscode flagged +env +datasets.zip \ No newline at end of file diff --git a/experiments/DatasetGeneration.ipynb b/experiments/DatasetGeneration.ipynb new file mode 100644 index 0000000..931c93a --- /dev/null +++ b/experiments/DatasetGeneration.ipynb @@ -0,0 +1,674 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + } + }, + "cells": [ + { + "cell_type": "code", + "source": [ + "!pip install openai" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "LHs3SW7JyvIW", + "outputId": "8d21a047-d0d8-417c-f595-99b9829821e1" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Requirement already satisfied: openai in /usr/local/lib/python3.10/dist-packages (1.3.8)\n", + "Requirement already satisfied: anyio<5,>=3.5.0 in /usr/local/lib/python3.10/dist-packages (from openai) (3.7.1)\n", + "Requirement already satisfied: distro<2,>=1.7.0 in /usr/lib/python3/dist-packages (from openai) (1.7.0)\n", + "Requirement already satisfied: httpx<1,>=0.23.0 in /usr/local/lib/python3.10/dist-packages (from openai) (0.25.2)\n", + "Requirement already satisfied: pydantic<3,>=1.9.0 in /usr/local/lib/python3.10/dist-packages (from openai) (1.10.13)\n", + "Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from openai) (1.3.0)\n", + "Requirement already satisfied: tqdm>4 in /usr/local/lib/python3.10/dist-packages (from openai) (4.66.1)\n", + "Requirement already satisfied: typing-extensions<5,>=4.5 in /usr/local/lib/python3.10/dist-packages (from openai) (4.5.0)\n", + "Requirement already satisfied: idna>=2.8 in /usr/local/lib/python3.10/dist-packages (from anyio<5,>=3.5.0->openai) (3.6)\n", + "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5,>=3.5.0->openai) (1.2.0)\n", + "Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx<1,>=0.23.0->openai) (2023.11.17)\n", + "Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.10/dist-packages (from httpx<1,>=0.23.0->openai) (1.0.2)\n", + "Requirement already satisfied: h11<0.15,>=0.13 in /usr/local/lib/python3.10/dist-packages (from httpcore==1.*->httpx<1,>=0.23.0->openai) (0.14.0)\n" + ] + } + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "eGTAkdVztudA" + }, + "outputs": [], + "source": [ + "from openai import OpenAI\n", + "import os\n", + "client = OpenAI(\n", + " api_key = \"ENTER YOUR OPENAI KEY HERE\"\n", + ")" + ] + }, + { + "cell_type": "code", + "source": [ + "prompt = \"\"\"You will be provided with a list of tools. These tools have a description and a list of parameters and return types for each tool. Your task involves creating ten varied, complex, and detailed user scenarios that require at least two tool calls to complete involving at least two different tools. One of these tools will be explicitly provided and the others will be chosen by you. If the output of an ith tool is to be used as an argument value in some other tool then to reference the value of the ith tool in the chain, use $$PREV[i] as argument value. i = 0, 1, .. j-1; j = current tool’s index in the array. If the query could not be answered with the given set of tools, output an empty list instead.\n", + "\n", + "For instance, given the tools: works_list, get_work_id, search_object_by_name, get_similar_work_items, summarize_objects.\n", + "\n", + "Given that get_similar_work_items is explicitly provided, your scenario should articulate something akin to:\n", + "\n", + "\"Scenario: Summarize work items similar to don:core:dvrv-us-1:devo/0:issue/1\n", + "Required tools: [\n", + " {\n", + " \"tool_name\": \"get_similar_work_items\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"work_id\",\n", + " \"argument_value\": \"don:core:dvrv-us-1:devo/0:issue/1\"\n", + " }\n", + " ]\n", + " },\n", + " {\n", + " \"tool_name\": \"summarize_objects\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"objects\",\n", + " \"argument_value\": \"$$PREV[0]\"\n", + " }\n", + " ]\n", + " }\n", + "]\"\n", + "\n", + "This scenario exemplifies a scenario using two tool calls. The scenario is complex, detailed, and concise as desired. The scenario also includes two tools used in tandem, the required tools, get_similar_work_items to return a list of work items that are similar to don:core:dvrv-us-1:devo/0:issue/1 and summarize_objects to summarize a\n", + "list of objects. Usage of multiple tools in tandem is highly desirable and will receive a higher score. Ideally each scenario should contain one or more instances of multiple tools being used in tandem.\n", + "Note that this scenario does not use all the tools given. Re-using tools is allowed, but each scenario should involve at least two different tools. Note that tool usage is also included\n", + "in the scenario, but exact parameters are not necessary. You must use a different combination of tools for each scenario. You should provide a detailed reasoning for why you selected that set of tools and how you placed the arguments. All tools must be used in at least one scenario. You can only use the tools provided in the following Tool Set:\n", + "Tool Set:\n", + "{\n", + " works_list: {\n", + " \"description\": \"Returns a list of work items matching the request\",\n", + " \"arguments\": [\n", + " {\n", + " \"name\": \"applies_to_part\",\n", + " \"description\": \"Filters for work belonging to any of the provided parts\",\n", + " \"type\": \"array of strings\",\n", + " \"example\": [\"FEAT-123\", \"ENH-123\", \"PROD-123\", \"CAPL-123\"]\n", + " },\n", + " {\n", + " \"name\": \"created_by\",\n", + " \"description\": \"Filters for work created by any of these users\",\n", + " \"type\": \"array of strings\",\n", + " \"example\": [\"DEVU-123\"]\n", + " },\n", + " {\n", + " \"name\": \"issue.priority\",\n", + " \"description\": \"Filters for issues with any of the provided priorities. Allowed values: p0, p1, p2, p3\",\n", + " \"type\": \"array of strings\",\n", + " \"example\": [\"p0\"]\n", + " },\n", + " {\n", + " \"name\": \"issue.rev_orgs\",\n", + " \"description\": \"Filters for issues with any of the provided Rev organizations\",\n", + " \"type\": \"array of strings\",\n", + " \"example\": [\"REV-123\"]\n", + " },\n", + " {\n", + " \"name\": \"limit\",\n", + " \"description\": \"The maximum number of works to return. The default is '50'\",\n", + " \"type\": \"integer (int32)\"\n", + " },\n", + " {\n", + " \"name\": \"owned_by\",\n", + " \"description\": \"Filters for work owned by any of these users\",\n", + " \"type\": \"array of strings\",\n", + " \"example\": [\"DEVU-123\"]\n", + " },\n", + " {\n", + " \"name\": \"stage.name\",\n", + " \"description\": \"Filters for records in the provided stage(s) by name\",\n", + " \"type\": \"array of strings\",\n", + " \"example\": [\"triage\"]\n", + " },\n", + " {\n", + " \"name\": \"ticket.needs_response\",\n", + " \"description\": \"Filters for tickets that need a response\",\n", + " \"type\": \"boolean\"\n", + " },\n", + " {\n", + " \"name\": \"ticket.rev_org\",\n", + " \"description\": \"Filters for tickets associated with any of the provided Rev organizations\",\n", + " \"type\": \"array of strings\",\n", + " \"example\": [\"REV-123\"]\n", + " },\n", + " {\n", + " \"name\": \"ticket.severity\",\n", + " \"description\": \"Filters for tickets with any of the provided severities. Allowed values: blocker, high, low, medium\",\n", + " \"type\": \"array of strings\",\n", + " \"example\": [\"high\"]\n", + " },\n", + " {\n", + " \"name\": \"ticket.source_channel\",\n", + " \"description\": \"Filters for tickets with any of the provided source channels\",\n", + " \"type\": \"array of strings\",\n", + " \"example\": [\"slack\"]\n", + " },\n", + " {\n", + " \"name\": \"type\",\n", + " \"description\": \"Filters for work of the provided types. Allowed values: issue, ticket, task\",\n", + " \"type\": \"array of strings\",\n", + " \"example\": [\"issue\"]\n", + " }\n", + " ]\n", + " },\n", + " summarize_objects: {\n", + " \"description\": \"Summarizes a list of objects. The logic of how to summarize a particular object type is an internal implementation detail.\",\n", + " \"arguments\": [\n", + " {\n", + " \"name\": \"objects\",\n", + " \"description\": \"List of objects to summarize\",\n", + " \"type\": \"array of objects\"\n", + " }\n", + " ]\n", + " },\n", + " prioritize_objects: {\n", + " \"description\": \"Returns a list of objects sorted by priority. The logic of what constitutes priority for a given object is an internal implementation detail.\",\n", + " \"arguments\": [\n", + " {\n", + " \"name\": \"objects\",\n", + " \"description\": \"A list of objects to be prioritized\",\n", + " \"type\": \"array of objects\"\n", + " }\n", + " ]\n", + " },\n", + " \"add_work_items_to_sprint\": {\n", + " \"description\": \"Adds the given work items to the sprint\",\n", + " \"arguments\": [\n", + " {\n", + " \"name\": \"work_ids\",\n", + " \"description\": \"A list of work item IDs to be added to the sprint.\",\n", + " \"type\": \"array of strings\"\n", + " },\n", + " {\n", + " \"name\": \"sprint_id\",\n", + " \"description\": \"The ID of the sprint to which the work items should be added\",\n", + " \"type\": \"str\"\n", + " }\n", + " ]\n", + " },\n", + " get_sprint_id: {\n", + " \"description\": \"Returns the ID of the current sprint\",\n", + " \"arguments\": []\n", + " },\n", + " get_similar_work_items: {\n", + " \"description\": \"Returns a list of work items that are similar to the given work item\",\n", + " \"arguments\": [\n", + " {\n", + " \"name\": \"work_id\",\n", + " \"description\": \"The ID of the work item for which you want to find similar items\",\n", + " \"type\": \"string\"\n", + " }\n", + " ]\n", + " },\n", + " search_object_by_name: {\n", + " \"description\": \"Given a search string, returns the id of a matching object in the system of record. If multiple matches are found, it returns the one where the confidence is highest.\",\n", + " \"arguments\": [\n", + " {\n", + " \"name\": \"query\",\n", + " \"description\": \"The search string, could be for example customer’s name, part name, user name.\",\n", + " \"type\": \"string\"\n", + " }\n", + " ]\n", + " },\n", + " create_actionable_tasks_from_text: {\n", + " \"description\": \"Given a text, extracts actionable insights, and creates tasks for them, which are kind of a work item.\",\n", + " \"arguments\": [\n", + " {\n", + " \"name\": \"text\",\n", + " \"description\": \"The text from which the actionable insights need to be created.\",\n", + " \"type\": \"string\"\n", + " }\n", + " ]\n", + " },\n", + " who_am_i: {\n", + " \"description\": \"Returns the ID of the current user\",\n", + " \"arguments\": []\n", + " }\n", + "}\n", + "\n", + "Deliver your response in the following JSON format. The given examples are only for three scenarios. You need to generate ten responses in this format. Remember that you are the user. Make sure that the exact value of the required arguments is present in the query. The query shouldn't be in the third person. Do not include the description of the tools or the chain of execution in the query in any way. The exact argument values that will be required for the tools should be present in the query. Keep the queries short. Strictly adhere to this format.\n", + "Give a detailed reasoning for why you selected those tools to solve that query.\n", + "\n", + "- Scenario 1: \n", + "Required Tools: [\n", + " {\n", + " \"tool_name\": { \"type\": \"string\" },\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": { \"type\": \"string\" },\n", + " \"argument_value\": { \"type\": \"string\" }\n", + " }\n", + " ]\n", + " }\n", + "]\n", + "Reasoning:\n", + "\n", + "- Scenario 2: \n", + "Required Tools: [\n", + " {\n", + " \"tool_name\": { \"type\": \"string\" },\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": { \"type\": \"string\" },\n", + " \"argument_value\": { \"type\": \"string\" }\n", + " }\n", + " ]\n", + " }\n", + "]\n", + "Reasoning:\n", + "\n", + "- Scenario 3: \n", + "Required Tools: [\n", + " {\n", + " \"tool_name\": { \"type\": \"string\" },\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": { \"type\": \"string\" },\n", + " \"argument_value\": { \"type\": \"string\" }\n", + " }\n", + " ]\n", + " }\n", + "]\n", + "Reasoning:\n", + "\n", + "\"\"\"" + ], + "metadata": { + "id": "aj2QIJRsxVWg" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "response = client.chat.completions.create(\n", + " model=\"gpt-4-1106-preview\",\n", + " messages=[\n", + " {\"role\": \"system\", \"content\": \"You are a tool-augmented llm\"},\n", + " {\"role\": \"user\", \"content\": prompt},\n", + " ]\n", + ")" + ], + "metadata": { + "id": "E4_vnJMzyqL5" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "print(response.choices[0].message.content)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "lrCQTOJ_0y6p", + "outputId": "a2104a9e-b2f8-4c25-cf4e-f8e47740fa9c" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "- Scenario 1: I need to create tasks from a meeting notes text and then add those tasks to the current sprint.\n", + "Required Tools: [\n", + " {\n", + " \"tool_name\": \"create_actionable_tasks_from_text\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"text\",\n", + " \"argument_value\": \"Discuss integration with client's API, finalize the Q2 roadmap, and update the risk log.\"\n", + " }\n", + " ]\n", + " },\n", + " {\n", + " \"tool_name\": \"add_work_items_to_sprint\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"work_ids\",\n", + " \"argument_value\": \"$$PREV[0]\"\n", + " },\n", + " {\n", + " \"argument_name\": \"sprint_id\",\n", + " \"argument_value\": \"$$PREV[1]\"\n", + " }\n", + " ]\n", + " },\n", + " {\n", + " \"tool_name\": \"get_sprint_id\",\n", + " \"arguments\": []\n", + " }\n", + "]\n", + "Reasoning: Since I am starting with meeting notes that need to turn into actionable tasks, the \"create_actionable_tasks_from_text\" tool will generate those tasks. Then, I'll need the current sprint ID, which \"get_sprint_id\" provides. Finally, using \"add_work_items_to_sprint\", I can add the newly created tasks to the current sprint.\n", + "\n", + "- Scenario 2: I want to find out who I am in the system and then find the high priority issues created by me.\n", + "Required Tools: [\n", + " {\n", + " \"tool_name\": \"who_am_i\",\n", + " \"arguments\": []\n", + " },\n", + " {\n", + " \"tool_name\": \"works_list\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"created_by\",\n", + " \"argument_value\": \"$$PREV[0]\"\n", + " },\n", + " {\n", + " \"argument_name\": \"issue.priority\",\n", + " \"argument_value\": [\"p0\", \"p1\"]\n", + " },\n", + " {\n", + " \"argument_name\": \"type\",\n", + " \"argument_value\": [\"issue\"]\n", + " }\n", + " ]\n", + " }\n", + "]\n", + "Reasoning: To list the issues created by myself with high priority, I need to identify my user ID first with \"who_am_i\". Using this ID as a filter, I can retrieve all high priority issues that I have created using \"works_list\" tool.\n", + "\n", + "- Scenario 3: As a user, I need to summarize the urgent tickets needing a response.\n", + "Required Tools: [\n", + " {\n", + " \"tool_name\": \"works_list\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"ticket.needs_response\",\n", + " \"argument_value\": \"true\"\n", + " },\n", + " {\n", + " \"argument_name\": \"ticket.severity\",\n", + " \"argument_value\": [\"high\", \"blocker\"]\n", + " },\n", + " {\n", + " \"argument_name\": \"type\",\n", + " \"argument_value\": [\"ticket\"]\n", + " }\n", + " ]\n", + " },\n", + " {\n", + " \"tool_name\": \"summarize_objects\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"objects\",\n", + " \"argument_value\": \"$$PREV[0]\"\n", + " }\n", + " ]\n", + " }\n", + "]\n", + "Reasoning: I selected \"works_list\" to filter out the list of tickets that are both urgent (severity being high or blocker) and needing a response. Then, I'd use \"summarize_objects\" to get a concise summary of those filtered tickets.\n", + "\n", + "- Scenario 4: I need to prioritize and summarize all the issues within my organization's Rev department that are in the triage stage.\n", + "Required Tools: [\n", + " {\n", + " \"tool_name\": \"works_list\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"issue.rev_orgs\",\n", + " \"argument_value\": [\"REV-123\"]\n", + " },\n", + " {\n", + " \"argument_name\": \"stage.name\",\n", + " \"argument_value\": [\"triage\"]\n", + " },\n", + " {\n", + " \"argument_name\": \"type\",\n", + " \"argument_value\": [\"issue\"]\n", + " }\n", + " ]\n", + " },\n", + " {\n", + " \"tool_name\": \"prioritize_objects\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"objects\",\n", + " \"argument_value\": \"$$PREV[0]\"\n", + " }\n", + " ]\n", + " },\n", + " {\n", + " \"tool_name\": \"summarize_objects\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"objects\",\n", + " \"argument_value\": \"$$PREV[1]\"\n", + " }\n", + " ]\n", + " }\n", + "]\n", + "Reasoning: I first use \"works_list\" to get all triage stage issues within my Rev department. Then, \"prioritize_objects\" is used to sort these issues by their importance. Finally, \"summarize_objects\" provides a summary of the prioritized issue list.\n", + "\n", + "- Scenario 5: I need to add my high-priority enhancement tasks to the current sprint.\n", + "Required Tools: [ \n", + " {\n", + " \"tool_name\": \"works_list\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"applies_to_part\",\n", + " \"argument_value\": [\"ENH-123\"]\n", + " },\n", + " {\n", + " \"argument_name\": \"issue.priority\",\n", + " \"argument_value\": [\"p0\", \"p1\"]\n", + " },\n", + " {\n", + " \"argument_name\": \"type\",\n", + " \"argument_value\": [\"task\"]\n", + " }\n", + " ]\n", + " },\n", + " {\n", + " \"tool_name\": \"get_sprint_id\",\n", + " \"arguments\": []\n", + " },\n", + " {\n", + " \"tool_name\": \"add_work_items_to_sprint\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"work_ids\",\n", + " \"argument_value\": \"$$PREV[0]\"\n", + " },\n", + " {\n", + " \"argument_name\": \"sprint_id\",\n", + " \"argument_value\": \"$$PREV[1]\"\n", + " }\n", + " ]\n", + " }\n", + "]\n", + "Reasoning: To focus on my high-priority enhancement tasks, I filter them out using \"works_list\". Then, to add these tasks to a sprint, I need the current sprint ID from \"get_sprint_id\". Finally, I use \"add_work_items_to_sprint\" to add the tasks to the desired sprint.\n", + "\n", + "- Scenario 6: I want to find tasks similar to a specific work item and prioritize them.\n", + "Required Tools: [\n", + " {\n", + " \"tool_name\": \"get_similar_work_items\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"work_id\",\n", + " \"argument_value\": \"DEV-23456\"\n", + " }\n", + " ]\n", + " },\n", + " {\n", + " \"tool_name\": \"prioritize_objects\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"objects\",\n", + " \"argument_value\": \"$$PREV[0]\"\n", + " }\n", + " ]\n", + " }\n", + "]\n", + "Reasoning: The task involves finding tasks similar to a given reference task, which is what \"get_similar_work_items\" tool does. Using the list produced, I use \"prioritize_objects\" to arrange them in order of priority for better manageability.\n", + "\n", + "- Scenario 7: I am drafting a report and need to convert the provided names into recognized organizational work items and then summarize the batch.\n", + "Required Tools: [\n", + " {\n", + " \"tool_name\": \"search_object_by_name\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"query\",\n", + " \"argument_value\": \"Data Analysis Integration\"\n", + " }\n", + " ]\n", + " },\n", + " {\n", + " \"tool_name\": \"search_object_by_name\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"query\",\n", + " \"argument_value\": \"UX Enhancement Project\"\n", + " }\n", + " ]\n", + " },\n", + " {\n", + " \"tool_name\": \"summarize_objects\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"objects\",\n", + " \"argument_value\": [\"$$PREV[0]\", \"$$PREV[1]\"]\n", + " }\n", + " ]\n", + " }\n", + "]\n", + "Reasoning: To identify the work items by name, I use \"search_object_by_name\" for each named project. Once I have the IDs, I use \"summarize_objects\" to create a brief for the report.\n", + "\n", + "- Scenario 8: I need to prioritize a list of issues and then add those with 'blocker' severity to the current sprint.\n", + "Required Tools: [\n", + " {\n", + " \"tool_name\": \"works_list\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"issue.severity\",\n", + " \"argument_value\": [\"blocker\"]\n", + " }\n", + " ]\n", + " },\n", + " {\n", + " \"tool_name\": \"prioritize_objects\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"objects\",\n", + " \"argument_value\": \"$$PREV[0]\"\n", + " }\n", + " ]\n", + " },\n", + " {\n", + " \"tool_name\": \"get_sprint_id\",\n", + " \"arguments\": []\n", + " },\n", + " {\n", + " \"tool_name\": \"add_work_items_to_sprint\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"work_ids\",\n", + " \"argument_value\": \"$$PREV[1]\"\n", + " },\n", + " {\n", + " \"argument_name\": \"sprint_id\",\n", + " \"argument_value\": \"$$PREV[2]\"\n", + " }\n", + " ]\n", + " }\n", + "]\n", + "Reasoning: I use \"works_list\" to find all issues with 'blocker' severity. Then, I prioritize them using \"prioritize_objects\" to decide the order of solving. With \"get_sprint_id\", I get the ID of the current sprint, to which the prioritized issues are added with the \"add_work_items_to_sprint\".\n", + "\n", + "- Scenario 9: Assess the work items created by a specific developer and summarize the key tasks.\n", + "Required Tools: [\n", + " {\n", + " \"tool_name\": \"who_am_i\",\n", + " \"arguments\": []\n", + " },\n", + " {\n", + " \"tool_name\": \"works_list\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"created_by\",\n", + " \"argument_value\": \"$$PREV[0]\"\n", + " },\n", + " {\n", + " \"argument_name\": \"type\",\n", + " \"argument_value\": [\"task\", \"issue\"]\n", + " }\n", + " ]\n", + " },\n", + " {\n", + " \"tool_name\": \"summarize_objects\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"objects\",\n", + " \"argument_value\": \"$$PREV[1]\"\n", + " }\n", + " ]\n", + " }\n", + "]\n", + "Reasoning: First, to know which developer's work items I am assessing, I identify my own user ID with \"who_am_i\". Then, with \"works_list\", I query the database to fetch the tasks and issues created by that user ID. Finally, I summarize them using \"summarize_objects\" for a comprehensive view.\n", + "\n", + "- Scenario 10: I want to get the list of tasks created by users in the Rev organization that came from Slack and need a response.\n", + "Required Tools: [\n", + " {\n", + " \"tool_name\": \"works_list\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"owned_by\",\n", + " \"argument_value\": [\"REV-123\"]\n", + " },\n", + " {\n", + " \"argument_name\": \"ticket.source_channel\",\n", + " \"argument_value\": [\"slack\"]\n", + " },\n", + " {\n", + " \"argument_name\": \"ticket.needs_response\",\n", + " \"argument_value\": \"true\"\n", + " },\n", + " {\n", + " \"argument_name\": \"type\",\n", + " \"argument_value\": [\"task\"]\n", + " }\n", + " ]\n", + " },\n", + " {\n", + " \"tool_name\": \"summarize_objects\",\n", + " \"arguments\": [\n", + " {\n", + " \"argument_name\": \"objects\",\n", + " \"argument_value\": \"$$PREV[0]\"\n", + " }\n", + " ]\n", + " }\n", + "]\n", + "Reasoning: The intention is to filter the tasks specific to the Rev organization that requires attention from Slack messages. So I use \"works_list\" to retrieve this specific subset. Then for easier interpretation or reporting, I use \"summarize_objects\" to create an executive summary of the tasks obtained.\n" + ] + } + ] + } + ] +} \ No newline at end of file