File size: 2,325 Bytes
3c7fd6a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cf2aa3f
a44c20f
a717c8f
cf2aa3f
 
 
3c7fd6a
 
 
 
cf2aa3f
 
 
3c7fd6a
 
a44c20f
3c7fd6a
 
 
 
 
 
 
 
 
 
 
 
 
 
cf2aa3f
3c7fd6a
 
a44c20f
3c7fd6a
 
 
cf2aa3f
3c7fd6a
 
a44c20f
3c7fd6a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cf2aa3f
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
79
80
81
82
83
84
85
86
87
88
name: "CodeCritic_Flow"
description: |2-
  Given a problem description and a solution candidate, provide useful feedback concerning the correctness of the solution candidate. 

# ~~~ Input interface specification ~~~
input_interface_non_initialized:
  - "problem_description"
  - "input_description"
  - "output_description"
  - "io_examples_and_explanation"
  - "code"

input_interface_initialized:
  - "query"

# ~~~ Output interface specification ~~~
output_interface:
  - "api_output"

# ~~~ Flow specification ~~~
backend:
  _target_: aiflows.backends.llm_lite.LiteLLMBackend
  api_infos: ???
  model_name:
      openai: "gpt-4"
      azure: "azure/gpt-4"
  n: 1
  max_tokens: 3000
  temperature: 0.3

  top_p: 0.2
  frequency_penalty: 0
  presence_penalty: 0

system_message_prompt_template:
  _target_: aiflows.prompt_template.JinjaPrompt
  template: |2-
    Your goal is to identify potential issues with a competitive programming solution attempt.

    The user will specify the problem by providing you with:
      - the problem statement
      - input description
      - output description
      - example test cases
      - (optional) explanation of the test cases
      - a Python solution attempt

    Crucially, your goal is to correctly identify potential issues with the solution attempt, and not to provide the code implementation yourself.
    The user will provide you with a task and an output format that you will strictly follow.
  input_variables: []
  

human_message_prompt_template:
  _target_: aiflows.prompt_template.JinjaPrompt
  template: "{{query}}"
  input_variables:
    - "query"
  

init_human_message_prompt_template:
  _target_: aiflows.prompt_template.JinjaPrompt
  template: |2-
    # Problem statement
    {{problem_description}}

    # Input description
    {{input_description}}

    # Output description
    {{output_description}}

    {{io_examples_and_explanation}}

    # Python solution attempt:
    ```python
    {{code}}
    ```


    Consider the problem statement and the solution attempt. Are there any issues with the proposed solution or it is correct? Explain your reasoning very concisely, and do not provide code.
  input_variables:
    - "problem_description"
    - "input_description"
    - "output_description"
    - "io_examples_and_explanation"
    - "code"