CC_flows / CF_Plan.yaml
martinjosifoski's picture
partially propagate changes (#7)
ca366eb
name: "Plan_Flow"
description: "ToDO: add description"
model_name: "gpt-4"
generation_parameters:
n: 1
max_tokens: 3000
temperature: 0.3
model_kwargs:
top_p: 0.2
frequency_penalty: 0
presence_penalty: 0
input_data_transformations: []
init_input_keys:
- "problem_description"
- "input_description"
- "output_description"
- "io_examples_and_explanation"
output_data_transformations:
- _target_: flows.data_transformations.RegexFirstOccurrenceExtractor
regex: '(?<=Conceptual solution)([\s\S]*?)(?=\n\n# [A-Z]|\Z)'
regex_fallback:
- '(?<=Conceptual solution:)([\s\S]*?)(?=\n\n# [A-Z]|\Z)'
input_key: "api_output"
output_key: "plan"
strip: True
assert_unique: True
output_keys:
- "plan"
system_message_prompt_template:
_target_: langchain.PromptTemplate
template: |2-
Your goal is to provide a high-level conceptual solution that, if implemented, will solve a given competitive programming problem.
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
The proposed algorithm should be computationally efficient, logically correct and handle all corner cases.
The user will provide you with a task and an output format that you will strictly follow.
input_variables: []
template_format: jinja2
human_message_prompt_template:
_target_: langchain.PromptTemplate
template: "{{query}}"
input_variables:
- "query"
template_format: jinja2
init_human_message_prompt_template:
_target_: langchain.PromptTemplate
template: |2-
# Problem statement
{{problem_description}}
# Input description
{{input_description}}
# Output description
{{output_description}}
{{io_examples_and_explanation}}
Return a high-level conceptual solution that would solve the problem. Be very concise, and do not provide code.
Reply in the following format:
# Conceptual solution
{{plan_placeholder}}
input_variables:
- "problem_description"
- "input_description"
- "output_description"
- "io_examples_and_explanation"
partial_variables:
plan_placeholder: "{{conceptual_solution}}"
template_format: jinja2