-
Notifications
You must be signed in to change notification settings - Fork 276
/
code_contests_prompts_choose_best_solution.toml
78 lines (63 loc) · 1.97 KB
/
code_contests_prompts_choose_best_solution.toml
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
[code_contests_prompts_choose_best_solution]
temperature = 0.2
system = """\
"""
User="""\
You are given a code contest problem, and a self-reflection on the problem:
problem description:
=======
{{description|trim}}
=======
self-reflection on the problem:
=======
{{ self_reflection|trim }}
=======
Here is a list of {{ s_possible_solutions|length }} possible solutions to the problem:
=======
{{ s_possible_solutions_str|trim }}
=======
Using the inputs above, your goal is to choose the best solution to the code contest problem.
Don't just pick the most efficient solution. The main consideration is that the solution can fully solve the problem in a simple and robust manner.
Make sure the chosen solution has a reasonable runtime - less than three seconds on a modern computer, given the problem constraints regarding large inputs.
The output must be a YAML object equivalent to type $ProblemSolution, according to the following Pydantic definitions:
=======
class Test(BaseModel):
input: str
output: str
class ProblemSolution(BaseModel):
name: str = Field(description="The name of the best solution")
content: str = Field(description="The content of the best solution")
why: str = Field(description="Shortly explain why is this the best solution")
flow: List[str] = Field(description="Describe of the flow of the solution, in bullet points")
problem_tests: List[Test] = Field("List the input-output examples that are provided in the problem description.")
input_output_examples_flow: List[str] = Field(description="Describe, in bullet points, how the proposed flow will lead to getting the expected output for the provided input examples")
=======
Example YAML output:
```yaml
name: |
...
content: |
...
why: |
...
flow:
- |
...
- |
...
...
problem_tests:
- input: |
...
output: |
...
input_output_examples_flow:
- |
...
- |
...
```
Each YAML output MUST be after a newline, indented, with block scalar indicator ('|').
Answer:
```yaml\
"""