Automatic dcft datacuration framework upload for camel_math_gpt-4o-mini_test
Browse files
config/Camel/tests/camel_math_gpt-4o-mini_test.yaml
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
operators:
|
| 2 |
+
- id: load_discipline
|
| 3 |
+
config:
|
| 4 |
+
type: function
|
| 5 |
+
function: data_strategies.commons.load_json_string_to_dataset
|
| 6 |
+
function_config:
|
| 7 |
+
json_string: '{"discipline": ["math"], "expert": ["Mathematician"], "num_topics": [2], "num_subtopics": [2]}'
|
| 8 |
+
|
| 9 |
+
- id: generate_topics
|
| 10 |
+
config:
|
| 11 |
+
type: completions
|
| 12 |
+
map: list # this uses structured output if available
|
| 13 |
+
map_config:
|
| 14 |
+
system_message: "You are a helpful assistant."
|
| 15 |
+
user_message: "Please list {{num_topics}} diverse {{discipline}} topics. Make sure the topics are {{discipline}} topics. No explanation." # number of topics
|
| 16 |
+
output_column: topic
|
| 17 |
+
model: gpt-4o-mini
|
| 18 |
+
input_ids:
|
| 19 |
+
- load_discipline
|
| 20 |
+
|
| 21 |
+
- id: generate_subtopics
|
| 22 |
+
config:
|
| 23 |
+
type: completions
|
| 24 |
+
map: list # this uses structured output if available
|
| 25 |
+
map_config:
|
| 26 |
+
system_message: "You are a helpful assistant."
|
| 27 |
+
user_message: "List {{num_subtopics}} different {{discipline}} {{topic}} problem topics. Be precise and make sure the problems are {{topic}} problems." # number of subtopics per topic
|
| 28 |
+
output_column: subtopic
|
| 29 |
+
model: gpt-4o-mini
|
| 30 |
+
input_ids:
|
| 31 |
+
- generate_topics
|
| 32 |
+
|
| 33 |
+
- id: generate_questions
|
| 34 |
+
config:
|
| 35 |
+
type: completions
|
| 36 |
+
map: chat
|
| 37 |
+
map_config:
|
| 38 |
+
system_message: "You are a {{expert}}."
|
| 39 |
+
user_message: "From this {{discipline}} subject {{topic}} and this subtopic {{subtopic}} we need to write a new questions for a {{discipline}} student to solve. Please write a precise problem for the student to solve."
|
| 40 |
+
output_column: question
|
| 41 |
+
model: gpt-4o-mini
|
| 42 |
+
n_repeat: 3 #number of questions per subtopic
|
| 43 |
+
input_ids:
|
| 44 |
+
- generate_subtopics
|
| 45 |
+
|
| 46 |
+
- id: generate_answers
|
| 47 |
+
config:
|
| 48 |
+
type: completions
|
| 49 |
+
map: chat
|
| 50 |
+
map_config:
|
| 51 |
+
system_message: "You are a {{expert}}."
|
| 52 |
+
user_message: "Solve the following question: {{question}}"
|
| 53 |
+
output_column: answer
|
| 54 |
+
model: gpt-4o-mini
|
| 55 |
+
input_ids:
|
| 56 |
+
- generate_questions
|
| 57 |
+
|
| 58 |
+
- id: convert_to_sharegpt
|
| 59 |
+
config:
|
| 60 |
+
type: function
|
| 61 |
+
function: data_strategies.commons.convert_instruction_response_to_sharegpt
|
| 62 |
+
function_config:
|
| 63 |
+
input_instruction_column: question
|
| 64 |
+
input_response_column: answer
|
| 65 |
+
output_sharegpt_column: conversations
|
| 66 |
+
drop_non_output_columns: True
|
| 67 |
+
input_ids:
|
| 68 |
+
- generate_answers
|