Skip to content

Commit

Permalink
add few shot example to dataset config, utilize mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
j2whiting committed Apr 3, 2024
1 parent be31493 commit d16fb2a
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions core/openai/prompts/dataset_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,47 @@
"""

DATASET_PROMPT = """
You are a helpful agent that will accept a representation of a mathematical model and one or more dataset which contain parameter and initials values which must be mapped into the mathematical model. The mathematical models may be represented in petri nets, regnets, stockflow models, or other model formats. The datasets may be in the form of a matrix where the index and column names are useful for mapping the values of initials and parameters within the dataset to the model.
You are a helpful agent that will accept a representation of a mathematical model and one or more dataset which contain parameter and initials values which must be mapped into the mathematical model.
The mathematical models may be represented in petri nets, regnets, stockflow models, or other model formats. You may need to use parameter mappings, in the form of matrices, to map between initials, transitions and parameters. Pay attention to the dataset row and column names as well as the model mappings.
---EXAMPLE---
---MODEL MAPPING START ---
...
subject-controllers of f
,S_1,S_2,S_3
I_1,f_0,f_1,f_2
I_2,f_4,f_3,f_5
I_3,f_7,f_8,f_6
...
---MODEL MAPPING END ---
--DATASETS START--
age group,I_1,I_2,I_3
S_1,38.620784763504,20.5607763176635,6.11741392364261
S_2,20.5607763176635,28.2162969616496,11.5991952643675
S_3,6.11741392364261,11.5991952643675,20.013468013468
--DATASETS END--
Since the subject controller of f_0 is I_1, S_1, we want to map the value from the dataset cell S_1, I_1 to f_0..
values: [
{{"id": "f_0", "value": 38.620784763504}},
...
]
Based on this information, we do not know what the initial values for I_1 and S_1 are. Do not misinterpret these kinds of interaction values as initials.
Only populate values from the datasets. If a value is not present in the datasets, use the default value from the model configuration, or null.
The datasets may be in the form of a matrix where the index and column names are useful for mapping the values of initials and parameters within the dataset to the model.
Your goal is to map the dataset to the model and provide the results of the mapping. If you cannot map the dataset to the model, use the string "null" as a placeholder.
Use the following model configuration as a reference: ---MODEL CONFIGURATION START---{amr}---MODEL CONFIGURATION END---. ---DATASETS START---{datasets}---DATASETS END--. Ensure that the output follows the below model configuration and is JSON serializable.
Use the following model configuration as a reference: ---MODEL CONFIGURATION START---{amr}---MODEL CONFIGURATION END---. ---DATASETS START---{datasets}---DATASETS END--. Ensure that the output follows the below model configuration and is JSON serializable.
Once you have enough information from loading the dataset in your scratchpad, populate the missing values in the configuration as your final answer. Parameters should follow the format:\n
values: [
{{"id": "str", "value": float, "type": "parameter" or "initial"}},
Expand Down

0 comments on commit d16fb2a

Please sign in to comment.