-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
33 lines (32 loc) · 6.17 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
phase1_prompts:
prompt1: "You are an expert software developer who writes high quality code. With below information, please either generate Python3 code (Respond directly with code only with markdown), or ask clarifying questions: \n {problem}"
prompt2: "You are an expert software developer specialized in Python3. Review the problem description and: -If the description provides enough detail, proceed by writing the required Python3 code using markdown. OR - If further details are needed to ensure the solution is accurate and complete, please list any specific questions you have about the problem.\n ### Problem Description: \n {problem}"
prompt3_one_shot: "You are an expert software developer specialized in Python3. In each turn, review the problem description and:\n - If the description provides accurate detail, proceed by writing the required Python3 code using markdown.
OR \n - If further details are needed to ensure the solution is accurate and complete, list clarifying questions about the problem without writing code.\n### Problem Description:\n\n ```python
def candidate(x: int, y: int):\n \"\"\"\n Return 2^n modulo p (be aware of numerics).\n >>> candidate(3, 5)\n 3\n >>> candidate(1101, 101)\n 2\n >>> candidate(0, 101)\n 1\n >>> candidate(3, 11)\n 8\n >>> candidate(100, 101)\n 1\n\n
\"\"\"\n```\n### Response:\nThe problem description seems to be incomplete. It provides a function signature and some test cases, but it doesn’t specify what the function is supposed to do. The docstring suggests that the function should return 2^n modulo p, but the function parameters (x, y) don’t match with the variables in the docstring (n, p).
\nHere are my questions to clarify the problem:
\n1. What are the roles of the parameters x and y in the function?
\n2. Should the function return 2^n modulo p as suggested in the docstring? If so, which parameter corresponds to n and which corresponds to p?
\n3. The test cases provided in the docstring don’t seem to match the function description. Could you please provide correct test cases?\n\n### Problem Description:\n {problem} \n\n ### Response:
"
phase2_prompts:
prompt1: "The original description of a coding problem is modified so that the requirements become inconsistent, incomplete, or ambiguous. Given the modified description, some clarifying questions were raised to clarify the description. Given the original and modified problem description, evaluate the quality of the clarifying questions. Please provide an integer representing the quality of questions (3: Good questions that recover the modified requirements; 2: Fair questions but they cannot help recover the modified requirements; 1: No questions).\n QUALITY=[your int] \n Please also provide answers to the clarifying questions to recover the modified requirements in the original problem description compared to the modified one. If there is no clarifying questions at all, return empty answers. \n ANSWERS=```[your answer]``` \n Please strictly follow the format QUALITY=[the int] and ANSWERS=```[the answer]``` in the response! Surround your answer with markdown! \n\n ### Questions: {clarifying_questions} \n ### Modified Problem Description: {problem} \n ### Original Description: {missing_information} \n"
prompt2: "A MODIFIED version of a coding problem description was given to a coder. The coder has raised some clarifying questions about the problem description. Given both the modified, and original version of the problem description, provide answers to the questions raised by the coder strictly following the format: ANSWERS=[your answer], then provide an integer representing the quality of questions (3: Good questions that help recover the modified requirements; 2: Fair questions but they cannot help recover the modified requirements; 1: No questions or completely irrelevant questions), to provide the quality of questions, strictly follow the format: QUALITY=[1, 2, or 3].\n\n ### Modified Problem Description: {problem} \n ### Original Description: {missing_information} \n ### Questions: {clarifying_questions}\n"
prompt3_one_shot: "A MODIFIED version of a coding problem description was given to a coder. The coder has raised some clarifying questions about the problem description. Given both the modified, and original version of the problem description, provide answers to the questions raised by the coder strictly following the format: ANSWERS=[your answer], then provide an integer representing the quality of questions (3: Good questions that help recover the modified requirements; 2: Fair questions but they cannot help recover the modified requirements; 1: No questions or completely irrelevant questions), to provide the quality of questions, strictly follow the format: QUALITY=[1, 2, or 3].\n
Here is an example of sample input and output for you:
### Sample input:\n
#### Modified Problem Description:\n python def candidate(x: int, y: int):\n \"\"\"\n Return 2^n modulo p (be aware of numerics).\n >>> candidate(3, 5)\n 3\n >>> candidate(1101, 101)\n 2\n >>> candidate(0, 101)\n 1\n >>> candidate(3, 11)\n 8\n >>> candidate(100, 101)\n 1\n\n \"\"\"\n
#### Original Description:\n python def modp(n: int, p: int):\n \"\"\"Return 2^n modulo p (be aware of numerics).\n >>> modp(3, 5)\n 3\n >>> modp(1101, 101)\n 2\n >>> modp(0, 101)\n 1\n >>> modp(3, 11)\n 8\n >>> modp(100, 101)\n 1\n \"\"\"\n
#### Questions: \n - Can you clarify the relationship between the function parameters 'x' and 'y' and the operation parameters \"2^n modulo p\" mentioned in the docstring?\n
- Are there any constraints on the input values for 'x' and 'y' that I should be aware of?\n
- The docstring mentions \"be aware of numerics\". Are there any specific numerical considerations or edge cases I should keep in mind while implementing this function?\n\n
### Sample output:\n
ANSWERS= ```\n
- 'x' represents the exponent (n), and 'y' represents the modulus (p).\n
- There are no explicitly stated constraints on 'x' and 'y'.\n
- There is no extra information about the \"be aware of numerics\" note.\n\n
QUALITY= 3\n
## Now give the output for the problem below:
### Modified Problem Description: {problem} \n ### Original Description: {missing_information} \n ### Questions: {clarifying_questions}\n
"