-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update instruction generation setting
- Loading branch information
1 parent
6276539
commit 08bbd8f
Showing
5 changed files
with
27 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,24 @@ | ||
def Task_Description_of_Singletool_oneapi_Instructions_template(detailed_summarized, could_must, specific_concised): | ||
return f""" | ||
You are provided with one API function, its descriptions, the parameters and returns information required for each API function. | ||
Your task involves creating 5 varied, innovative, and {detailed_summarized} user queries that employ the given API function. | ||
The queries exemplify how to utilize the API call. A query should only use the given API. | ||
Additionally, you {could_must} incorporate the input parameters required for each API call. | ||
To achieve this, generate random information for required parameters according to its type. | ||
The 5 queries should be very {specific_concised}. | ||
Note that you shouldn't ask 'which API to use', rather, simply state your needs that can be addressed by these APIs. | ||
Never explicitly mentioning the specific calling of API functions in your response. | ||
Task_Description_of_Singletool_oneapi_Instructions_whole = f""" | ||
You are provided with the API function, its descriptions, the parameters required for each API function. | ||
Your task involves creating a total of 10 totally differentiate user queries for a given API function, 5 should be detailed and specific and other 5 brief and concise. Each query is innovative. | ||
These queries illustrate only on how to accomplish the exact task that the API is designed for, and the user never intend to use API/function/tool to solve the task. | ||
Incorporate randomly generated values for required parameters, ensuring variation among queries based on their types. | ||
Never explicitly mentioning any keywords of API function names in your response. | ||
You should also avoid asking for the input parameters required by the API call, but instead directly provide the parameter in your query. | ||
""" | ||
|
||
Task_Description_of_Singletool_oneapi_Instructions = Task_Description_of_Singletool_oneapi_Instructions_template("detailed", "could", "specific") | ||
|
||
Task_Description_of_Singletool_oneapi_Instructions_simple = Task_Description_of_Singletool_oneapi_Instructions_template("summarized", "could", "concised") | ||
|
||
|
||
def Other_Requirements_singletool_oneapi_template(word_minimum_number): | ||
return f""" | ||
Please produce 5 queries in line with the given requirements and inputs. | ||
These 5 queries should display a diverse range of sentence structures: | ||
Other_Requirements_singletool_oneapi_whole = f""" | ||
Create queries in line with the given requirements and inputs. | ||
These queries should display a diverse range of sentence structures: | ||
some queries should be in the form of imperative sentences, others declarative, and yet others interrogative. | ||
Equally, they should encompass a variety of tones, with some being polite, some being straightforward, some like layman. | ||
Ensure they vary in length. | ||
Aim to include a number of engaging queries as long as they relate to API calls. | ||
Keep in mind that | ||
- Queries should be around {word_minimum_number} words, and avoid explicit mentions of API calls like 'xx.yy.zz(parameters)', or PyPI lib name as 'use API in xx', or reference paper like 'Zhang21 et al.', or API function keywords, or specific parameters type. | ||
- For quotation, use ` instead of '. | ||
- Avoid technical terms like 'the given API' or unmeaningful terms like 'data with all observations' in your inquiry; keep it natural and focus on the user's intention to accomplish a real task. | ||
- Avoiding repeated the same information within each inquiry, like "based on the data object for the given data". | ||
- Queries should be unique in structure and phrasing, and vocabulary should be varied precise, accurate, and diverse. | ||
- Restricted to the response format as a list of effective json: [{"Query": "(query content)"},{"Query": "(query content)"},{"Query": "(query content)"},{"Query": "(query content)"},{"Query": "(query content)"}] | ||
- Queries should contain about 10-20 words, avoiding direct references to API calls (e.g., 'xx.yy.zz(parameters)'), library names (e.g., 'use API in xx'), function names (e.g., 'zz'), academic references (e.g., 'Zhang21 et al.'), or specific parameter types (e.g. 'AnnData data matrix object'). | ||
- Use backticks (`) for quotes, not single quotes ('). | ||
- Keep language natural and task-focused, avoiding overly technical or vague terms (e.g. 'data with all observations', 'using the given API'). | ||
- Ensure each query is distinct without repeating the same information (e.g. `based on the data object for the given data`). | ||
- Queries should be structurally unique, with precise and diverse vocabulary. | ||
- Format responses as a list in JSON: [{{"Query": "(query content)"}}, {{"Query": "(query content)"}}, {{"Query": "(query content)"}},{{"Query": "(query content)"}}, {{"Query": "(query content)"}}, {{"Query": "(query content)"}},{{"Query": "(query content)"}}, {{"Query": "(query content)"}}, {{"Query": "(query content)"}},{{"Query": "(query content)"}}]. | ||
""" | ||
|
||
Other_Requirements_singletool_oneapi_simple = Other_Requirements_singletool_oneapi_template("fifteen") | ||
|
||
Other_Requirements_singletool_oneapi = Other_Requirements_singletool_oneapi_template("twenty") |