From 370706b24c0ea71102f3defb5b79248f977fda1d Mon Sep 17 00:00:00 2001 From: Jaehwan Ryu Date: Wed, 3 Jul 2024 16:54:35 -0400 Subject: [PATCH 01/13] Updated prompt to generate units and description --- gollm/openai/prompts/petrinet_config.py | 23 ++++++++++++++++++++++- gollm/openai/tool_utils.py | 7 +++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/gollm/openai/prompts/petrinet_config.py b/gollm/openai/prompts/petrinet_config.py index c8d917d..1bc4d66 100644 --- a/gollm/openai/prompts/petrinet_config.py +++ b/gollm/openai/prompts/petrinet_config.py @@ -2,20 +2,41 @@ You are a helpful agent designed to find initial parameters for a given petri net model file and a given research paper describing the mathematical model. Use the following petri net json file as a reference: {petrinet}. Do not respond in full sentences, only populate the JSON output with conditions and parameters. + Assume that parameter fields with missing values may have multiple different sets values discussed in the user provided text for different conditions.\n Return the different sets of initial parameters for the petri net model file like so: {{"conditions": {{"condition_1": "description of condition_1", "condition_2": "description of condition_2", ...}}, "parameters": [{{ "id": "beta", "value": {{'condition_1': 0.1, 'condition_2': 0.2}}, + "description": "Description of the parameter beta", + "units": {{ "expression": "1.0e-9*mole/liter", "expression_mathml": "1.0000000000000001e-9moleliter" }} .... }} ], }} If a condition is not mentioned in the following text body, then the value should be set to the string "null". Be sure to use consistent naming conventions for the conditions. Instead of 'condition_1' and 'condition_2'.. use names that are descriptive of the conditions. - Only use parameters found in the reference petrinet file provided above. + + Populate the description, and the units fields for each parameter. If the description can not be found, use the parameter's name if available, otherwise set it to "null". + For units, provide both "units.expression" (a unicode string) and "units.expression_mathml" (MathML format). If the unit is not provided or invalid, omit the units field. + + Only use parameters found in the reference petrinet file provided above. Ensure that the output follows the above petri net format and can be serialized as a JSON. Specifically populate parameters and initials. Use the following text body to answer the user's query: --START USER PROVIDED TEXT-- {research_paper}--END USER PROVIDED TEXT--\n\n Answer: {{ """ + # For units, provide both "units.expression" (a unicode string) and "units.expression_mathml" (MathML format). If the unit is not provided or invalid, set the 'units' field to "null". + + +# If a condition is not mentioned in the following text body, then the value should be set to the string "null". Be sure to use consistent naming conventions for the conditions. +# Instead of 'condition_1' and 'condition_2'.. use names that are descriptive of the conditions. + +# Populate the description, and the units fields for each parameter. If the description can not be found, use the parameter's name if available, otherwise set it to "null". +# For units, provide both "units.expression" with a unicode string representing the expression and "units.expression_mathml" with the MathML representation of the expression. If the unit expression is not extracted from the text body, not a valid unit, then the value of the 'units' field should be set to "null". + +# Only use parameters found in the reference petrinet file provided above. +# Ensure that the output follows the above petri net format and can be serialized as a JSON. Specifically populate parameters and initials. Use the following +# text body to answer the user's query: --START USER PROVIDED TEXT-- {research_paper}--END USER PROVIDED TEXT--\n\n Answer: +# {{ +# """ diff --git a/gollm/openai/tool_utils.py b/gollm/openai/tool_utils.py index 98d7583..fb64ef6 100644 --- a/gollm/openai/tool_utils.py +++ b/gollm/openai/tool_utils.py @@ -25,7 +25,8 @@ def escape_curly_braces(text: str): return text.replace("{", "{{").replace("}", "}}") -def model_config_chain(research_paper: str, amr: str) -> dict: +# def model_config_chain(research_paper: str, amr: str) -> dict: +def model_config_chain(research_paper: str, amr: str) -> any: print("Reading model config from research paper: {}".format(research_paper[:100])) research_paper = remove_references(research_paper) research_paper = normalize_greek_alphabet(research_paper) @@ -49,7 +50,9 @@ def model_config_chain(research_paper: str, amr: str) -> dict: ], ) config = postprocess_oai_json(output.choices[0].message.content) - return model_config_adapter(config) + return config + # print(config) + # return model_config_adapter(config) def model_card_chain(research_paper: str = None, amr: str = None) -> dict: From e58a77a3e32e69edf1c10cc430ed5e0148012717 Mon Sep 17 00:00:00 2001 From: Jaehwan Ryu Date: Fri, 5 Jul 2024 16:21:18 -0400 Subject: [PATCH 02/13] Wip --- gollm/openai/probonto.json | 3303 +++++++++++++++++++++++ gollm/openai/prompts/petrinet_config.py | 40 +- gollm/openai/tool_utils.py | 3 + 3 files changed, 3325 insertions(+), 21 deletions(-) create mode 100644 gollm/openai/probonto.json diff --git a/gollm/openai/probonto.json b/gollm/openai/probonto.json new file mode 100644 index 0000000..af8a552 --- /dev/null +++ b/gollm/openai/probonto.json @@ -0,0 +1,3303 @@ +[ + { + "curie": "probonto:k0000000", + "name": "Bernoulli1", + "equivalent": [ + { + "curie": "probonto:k0000028", + "name": "Bernoulli2" + } + ], + "parameters": [ + { + "curie": "probonto:k0000007", + "name": "probability", + "symbol": "p", + "short_name": "probability of success" + } + ] + }, + { + "curie": "probonto:k0000008", + "name": "Gompertz1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000014", + "name": "shape", + "symbol": "\\eta", + "short_name": "shape" + }, + { + "curie": "probonto:k0000015", + "name": "scale", + "symbol": "b", + "short_name": "scale" + } + ] + }, + { + "curie": "probonto:k0000016", + "name": "MultivariateStudentT2", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000019", + "name": "mean", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0000020", + "name": "precisionMatrix", + "symbol": "T", + "short_name": "precision matrix" + }, + { + "curie": "probonto:k0000021", + "name": "degreesOfFreedom", + "symbol": "k", + "short_name": "degrees of freedom" + } + ] + }, + { + "curie": "probonto:k0000022", + "name": "Weibull2", + "equivalent": [ + { + "curie": "probonto:k0000800", + "name": "Weibull1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000026", + "name": "lambda", + "symbol": "\\lambda", + "short_name": "lambda" + }, + { + "curie": "probonto:k0000027", + "name": "shape", + "symbol": "v", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0000028", + "name": "Bernoulli2", + "equivalent": [ + { + "curie": "probonto:k0000000", + "name": "Bernoulli1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000031", + "name": "logitProbability", + "symbol": "\\alpha", + "short_name": "logit of probability of success" + } + ] + }, + { + "curie": "probonto:k0000032", + "name": "Gumbel1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000039", + "name": "location", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0000040", + "name": "scale", + "symbol": "\\beta", + "short_name": "scale" + } + ] + }, + { + "curie": "probonto:k0000041", + "name": "Nakagami1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000048", + "name": "shape", + "symbol": "m", + "short_name": "shape" + }, + { + "curie": "probonto:k0000049", + "name": "spread", + "symbol": "\\Omega", + "short_name": "spread" + } + ] + }, + { + "curie": "probonto:k0000050", + "name": "WienerDiffusionModel1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000053", + "name": "boundSeparation", + "symbol": "\\alpha", + "short_name": "boundary separation" + }, + { + "curie": "probonto:k0000054", + "name": "initialBias", + "symbol": "\\beta", + "short_name": "initial bias" + }, + { + "curie": "probonto:k0000055", + "name": "driftRate", + "symbol": "\\delta", + "short_name": "drift rate" + }, + { + "curie": "probonto:k0000056", + "name": "nondecisionTime", + "symbol": "\\tau", + "short_name": "nondecision time" + } + ] + }, + { + "curie": "probonto:k0000057", + "name": "Beta1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000066", + "name": "alpha", + "symbol": "\\alpha", + "short_name": "shape" + }, + { + "curie": "probonto:k0000067", + "name": "beta", + "symbol": "\\beta", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0000068", + "name": "HalfNormal1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000073", + "name": "inverseScale", + "symbol": "\\theta", + "short_name": "inverse scale" + } + ] + }, + { + "curie": "probonto:k0000074", + "name": "NegativeBinomial1", + "equivalent": [ + { + "curie": "probonto:k0000190", + "name": "NegativeBinomial5" + }, + { + "curie": "probonto:k0000161", + "name": "NegativeBinomial4" + }, + { + "curie": "probonto:k0000135", + "name": "NegativeBinomial3" + }, + { + "curie": "probonto:k0000105", + "name": "NegativeBinomial2" + } + ], + "parameters": [ + { + "curie": "probonto:k0000080", + "name": "numberOfSuccesses", + "symbol": "r", + "short_name": "number of successes" + }, + { + "curie": "probonto:k0000081", + "name": "probability", + "symbol": "p", + "short_name": "success probability" + } + ] + }, + { + "curie": "probonto:k0000082", + "name": "Wishart1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000088", + "name": "scaleMatrix", + "symbol": "V", + "short_name": "scale matrix" + }, + { + "curie": "probonto:k0000089", + "name": "degreesOfFreedom", + "symbol": "n", + "short_name": "degrees of freedom" + } + ] + }, + { + "curie": "probonto:k0000090", + "name": "BetaBinomial1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000095", + "name": "numberOfTrials", + "symbol": "n", + "short_name": "number of trials" + }, + { + "curie": "probonto:k0000096", + "name": "alpha", + "symbol": "\\alpha", + "short_name": "left beta parameter" + }, + { + "curie": "probonto:k0000097", + "name": "beta", + "symbol": "\\beta", + "short_name": "right beta parameter" + } + ] + }, + { + "curie": "probonto:k0000105", + "name": "NegativeBinomial2", + "equivalent": [ + { + "curie": "probonto:k0000190", + "name": "NegativeBinomial5" + }, + { + "curie": "probonto:k0000161", + "name": "NegativeBinomial4" + }, + { + "curie": "probonto:k0000135", + "name": "NegativeBinomial3" + }, + { + "curie": "probonto:k0000074", + "name": "NegativeBinomial1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000110", + "name": "rate", + "symbol": "\\lambda", + "short_name": "Poisson intensity" + }, + { + "curie": "probonto:k0000111", + "name": "overdispersion", + "symbol": "\\tau", + "short_name": "overdispersion" + } + ] + }, + { + "curie": "probonto:k0000112", + "name": "Wishart2", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000115", + "name": "inverseScaleMatrix", + "symbol": "R", + "short_name": "inverse scale matrix" + }, + { + "curie": "probonto:k0000116", + "name": "degreesOfFreedom", + "symbol": "k", + "short_name": "degrees of freedom" + } + ] + }, + { + "curie": "probonto:k0000117", + "name": "Binomial1", + "equivalent": [ + { + "curie": "probonto:k0000149", + "name": "Binomial2" + } + ], + "parameters": [ + { + "curie": "probonto:k0000124", + "name": "numberOfTrials", + "symbol": "n", + "short_name": "number of trials" + }, + { + "curie": "probonto:k0000125", + "name": "probability", + "symbol": "p", + "short_name": "success probability in each trial" + } + ] + }, + { + "curie": "probonto:k0000126", + "name": "Hypergeometric1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000132", + "name": "populationSize", + "symbol": "N", + "short_name": "population size" + }, + { + "curie": "probonto:k0000133", + "name": "numberOfSuccesses", + "symbol": "K", + "short_name": "number of successes" + }, + { + "curie": "probonto:k0000134", + "name": "numberOfTrials", + "symbol": "n", + "short_name": "number of trials" + } + ] + }, + { + "curie": "probonto:k0000135", + "name": "NegativeBinomial3", + "equivalent": [ + { + "curie": "probonto:k0000190", + "name": "NegativeBinomial5" + }, + { + "curie": "probonto:k0000161", + "name": "NegativeBinomial4" + }, + { + "curie": "probonto:k0000074", + "name": "NegativeBinomial1" + }, + { + "curie": "probonto:k0000105", + "name": "NegativeBinomial2" + }, + { + "curie": "probonto:k0000217", + "name": "NegativeBinomial6" + } + ], + "parameters": [ + { + "curie": "probonto:k0000140", + "name": "mean", + "symbol": "\\mu", + "short_name": "mean" + }, + { + "curie": "probonto:k0000141", + "name": "dispersion", + "symbol": "\\phi", + "short_name": "index parameter" + } + ] + }, + { + "curie": "probonto:k0000142", + "name": "ZeroInflatedNegativeBinomial1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000146", + "name": "rate", + "symbol": "\\lambda", + "short_name": "mean" + }, + { + "curie": "probonto:k0000147", + "name": "overdispersion", + "symbol": "\\tau", + "short_name": "overdispersion" + }, + { + "curie": "probonto:k0000148", + "name": "probabilityOfZero", + "symbol": "p0", + "short_name": "probability of zero" + } + ] + }, + { + "curie": "probonto:k0000149", + "name": "Binomial2", + "equivalent": [ + { + "curie": "probonto:k0000117", + "name": "Binomial1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000152", + "name": "numberOfTrials", + "symbol": "n", + "short_name": "number of trials" + }, + { + "curie": "probonto:k0000153", + "name": "logitProbability", + "symbol": "\\alpha", + "short_name": "logit of success probability in each trial" + } + ] + }, + { + "curie": "probonto:k0000154", + "name": "InverseBinomial1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000159", + "name": "index", + "symbol": "k", + "short_name": "index parameter" + }, + { + "curie": "probonto:k0000160", + "name": "probability", + "symbol": "p", + "short_name": "probability" + } + ] + }, + { + "curie": "probonto:k0000161", + "name": "NegativeBinomial4", + "equivalent": [ + { + "curie": "probonto:k0000105", + "name": "NegativeBinomial2" + }, + { + "curie": "probonto:k0000074", + "name": "NegativeBinomial1" + }, + { + "curie": "probonto:k0000190", + "name": "NegativeBinomial5" + }, + { + "curie": "probonto:k0000135", + "name": "NegativeBinomial3" + } + ], + "parameters": [ + { + "curie": "probonto:k0000167", + "name": "numberOfFailures", + "symbol": "r", + "short_name": "number of failures" + }, + { + "curie": "probonto:k0000168", + "name": "probability", + "symbol": "p", + "short_name": "success probability" + } + ] + }, + { + "curie": "probonto:k0000169", + "name": "ZeroInflatedGeneralizedPoisson1", + "equivalent": [ + { + "curie": "probonto:k0000410", + "name": "Poisson1" + }, + { + "curie": "probonto:k0000197", + "name": "ZeroInflatedPoisson1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000174", + "name": "mean", + "symbol": "\\mu", + "short_name": "mean" + }, + { + "curie": "probonto:k0000175", + "name": "dispersion", + "symbol": "\\alpha", + "short_name": "dispersion" + }, + { + "curie": "probonto:k0000176", + "name": "probabilityOfZero", + "symbol": "p0", + "short_name": "probability of zero" + } + ] + }, + { + "curie": "probonto:k0000177", + "name": "BirnbaumSaunders1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000180", + "name": "scale", + "symbol": "\\beta", + "short_name": "scale" + }, + { + "curie": "probonto:k0000181", + "name": "shape", + "symbol": "\\gamma", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0000182", + "name": "InverseGamma1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000188", + "name": "shape", + "symbol": "\\alpha", + "short_name": "shape" + }, + { + "curie": "probonto:k0000189", + "name": "scale", + "symbol": "\\beta", + "short_name": "scale" + } + ] + }, + { + "curie": "probonto:k0000190", + "name": "NegativeBinomial5", + "equivalent": [ + { + "curie": "probonto:k0000105", + "name": "NegativeBinomial2" + }, + { + "curie": "probonto:k0000135", + "name": "NegativeBinomial3" + }, + { + "curie": "probonto:k0000074", + "name": "NegativeBinomial1" + }, + { + "curie": "probonto:k0000161", + "name": "NegativeBinomial4" + } + ], + "parameters": [ + { + "curie": "probonto:k0000195", + "name": "shape", + "symbol": "\\alpha", + "short_name": "shape" + }, + { + "curie": "probonto:k0000196", + "name": "inverseScale", + "symbol": "\\beta", + "short_name": "inverse scale" + } + ] + }, + { + "curie": "probonto:k0000197", + "name": "ZeroInflatedPoisson1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000202", + "name": "rate", + "symbol": "\\lambda", + "short_name": "Poisson intensity" + }, + { + "curie": "probonto:k0000203", + "name": "probabilityOfZero", + "symbol": "\\pi", + "short_name": "probability of extra zeros" + } + ] + }, + { + "curie": "probonto:k0000204", + "name": "Burr1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000209", + "name": "scale", + "symbol": "\\alpha", + "short_name": "scale parameter" + }, + { + "curie": "probonto:k0000210", + "name": "shape1", + "symbol": "c", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0000211", + "name": "shape2", + "symbol": "k", + "short_name": "shape parameter" + } + ] + }, + { + "curie": "probonto:k0000212", + "name": "InverseGaussian1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000215", + "name": "shape", + "symbol": "\\lambda", + "short_name": "shape" + }, + { + "curie": "probonto:k0000216", + "name": "mean", + "symbol": "\\mu", + "short_name": "mean" + } + ] + }, + { + "curie": "probonto:k0000217", + "name": "NegativeBinomial6", + "equivalent": [ + { + "curie": "probonto:k0000135", + "name": "NegativeBinomial3" + } + ], + "parameters": [ + { + "curie": "probonto:k0000222", + "name": "logMean", + "symbol": "\\eta", + "short_name": "log mean" + }, + { + "curie": "probonto:k0000223", + "name": "dispersion", + "symbol": "\\phi", + "short_name": "index parameter" + } + ] + }, + { + "curie": "probonto:k0000224", + "name": "CategoricalOrdered1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000231", + "name": "categoryProb", + "symbol": "p_1, \\ldots, p_k", + "short_name": "category probabilities" + } + ] + }, + { + "curie": "probonto:k0000232", + "name": "InverseWishart1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000237", + "name": "scaleMatrix", + "symbol": "\\Psi", + "short_name": "scale matrix" + }, + { + "curie": "probonto:k0000238", + "name": "degreesOfFreedom", + "symbol": "\\nu", + "short_name": "degrees of freedom" + } + ] + }, + { + "curie": "probonto:k0000239", + "name": "Normal1", + "equivalent": [ + { + "curie": "probonto:k0000265", + "name": "Normal2" + }, + { + "curie": "probonto:k0000290", + "name": "Normal3" + } + ], + "parameters": [ + { + "curie": "probonto:k0000246", + "name": "mean", + "symbol": "\\mu", + "short_name": "mean" + }, + { + "curie": "probonto:k0000247", + "name": "stdev", + "symbol": "\\sigma", + "short_name": "standard deviation" + } + ] + }, + { + "curie": "probonto:k0000248", + "name": "CategoricalNonordered1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000255", + "name": "categoryProb", + "symbol": "p_1, \\ldots, p_k", + "short_name": "category probabilities" + } + ] + }, + { + "curie": "probonto:k0000256", + "name": "Laplace1", + "equivalent": [ + { + "curie": "probonto:k0000283", + "name": "Laplace2" + } + ], + "parameters": [ + { + "curie": "probonto:k0000263", + "name": "location", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0000264", + "name": "scale", + "symbol": "b", + "short_name": "scale" + } + ] + }, + { + "curie": "probonto:k0000265", + "name": "Normal2", + "equivalent": [ + { + "curie": "probonto:k0000239", + "name": "Normal1" + }, + { + "curie": "probonto:k0000290", + "name": "Normal3" + } + ], + "parameters": [ + { + "curie": "probonto:k0000272", + "name": "mean", + "symbol": "\\mu", + "short_name": "mean" + }, + { + "curie": "probonto:k0000273", + "name": "var", + "symbol": "v", + "short_name": "variance" + } + ] + }, + { + "curie": "probonto:k0000274", + "name": "Cauchy1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000281", + "name": "location", + "symbol": "x_0", + "short_name": "location" + }, + { + "curie": "probonto:k0000282", + "name": "scale", + "symbol": "\\gamma", + "short_name": "scale" + } + ] + }, + { + "curie": "probonto:k0000283", + "name": "Laplace2", + "equivalent": [ + { + "curie": "probonto:k0000256", + "name": "Laplace1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000288", + "name": "location", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0000289", + "name": "tau", + "symbol": "\\tau", + "short_name": "precision" + } + ] + }, + { + "curie": "probonto:k0000290", + "name": "Normal3", + "equivalent": [ + { + "curie": "probonto:k0000239", + "name": "Normal1" + }, + { + "curie": "probonto:k0000265", + "name": "Normal2" + } + ], + "parameters": [ + { + "curie": "probonto:k0000297", + "name": "mean", + "symbol": "\\mu", + "short_name": "mean" + }, + { + "curie": "probonto:k0000298", + "name": "precision", + "symbol": "\\tau", + "short_name": "precision" + } + ] + }, + { + "curie": "probonto:k0000299", + "name": "ChiSquared1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000306", + "name": "degreesOfFreedom", + "symbol": "k", + "short_name": "degrees of freedom" + } + ] + }, + { + "curie": "probonto:k0000307", + "name": "Logistic1", + "equivalent": [ + { + "curie": "probonto:k0000331", + "name": "Logistic2" + } + ], + "parameters": [ + { + "curie": "probonto:k0000314", + "name": "location", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0000315", + "name": "scale", + "symbol": "s", + "short_name": "scale" + } + ] + }, + { + "curie": "probonto:k0000316", + "name": "NormalInverseGamma1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000319", + "name": "mean", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0000320", + "name": "lambda", + "symbol": "\\lambda", + "short_name": "lambda" + }, + { + "curie": "probonto:k0000321", + "name": "alpha", + "symbol": "\\alpha", + "short_name": "shape" + }, + { + "curie": "probonto:k0000322", + "name": "beta", + "symbol": "\\beta", + "short_name": "scale" + } + ] + }, + { + "curie": "probonto:k0000323", + "name": "ConwayMaxwellPoisson1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000329", + "name": "rate", + "symbol": "\\lambda", + "short_name": "Poisson intensity" + }, + { + "curie": "probonto:k0000330", + "name": "rateOfDecay", + "symbol": "\\nu", + "short_name": "rate of decay" + } + ] + }, + { + "curie": "probonto:k0000331", + "name": "Logistic2", + "equivalent": [ + { + "curie": "probonto:k0000307", + "name": "Logistic1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000338", + "name": "location", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0000339", + "name": "inverseScale", + "symbol": "\\tau", + "short_name": "inverse scale" + } + ] + }, + { + "curie": "probonto:k0000340", + "name": "OrderedLogistic1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000343", + "name": "cutpoint", + "symbol": "c", + "short_name": "ordered cutpoints" + }, + { + "curie": "probonto:k0000344", + "name": "predictor", + "symbol": "\\eta", + "short_name": "predictor" + } + ] + }, + { + "curie": "probonto:k0000345", + "name": "Dirichlet1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000351", + "name": "concentration", + "symbol": "\\alpha_1, \\cdots, \\alpha_K", + "short_name": "concentration" + } + ] + }, + { + "curie": "probonto:k0000352", + "name": "LogitNormal1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000359", + "name": "location", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0000360", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale" + } + ] + }, + { + "curie": "probonto:k0000361", + "name": "ParetoTypeI1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000368", + "name": "scale", + "symbol": "x_m", + "short_name": "scale" + }, + { + "curie": "probonto:k0000369", + "name": "shape", + "symbol": "\\alpha", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0000370", + "name": "DoublePoisson1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000375", + "name": "rate", + "symbol": "\\mu", + "short_name": "Poisson intensity" + }, + { + "curie": "probonto:k0000376", + "name": "dispersion", + "symbol": "\\phi", + "short_name": "dispersion" + } + ] + }, + { + "curie": "probonto:k0000377", + "name": "LogLogistic1", + "equivalent": [ + { + "curie": "probonto:k0000402", + "name": "LogLogistic2" + } + ], + "parameters": [ + { + "curie": "probonto:k0000384", + "name": "scale", + "symbol": "\\alpha", + "short_name": "scale" + }, + { + "curie": "probonto:k0000385", + "name": "shape", + "symbol": "\\beta", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0000386", + "name": "ParetoTypeII1", + "equivalent": [ + { + "curie": "probonto:k0000604", + "name": "Lomax1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000389", + "name": "location", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0000390", + "name": "scale", + "symbol": "\\lambda", + "short_name": "scale" + }, + { + "curie": "probonto:k0000391", + "name": "tailIndex", + "symbol": "\\alpha", + "short_name": "tail index" + } + ] + }, + { + "curie": "probonto:k0000392", + "name": "Erlang1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000400", + "name": "scale", + "symbol": "b", + "short_name": "scale" + }, + { + "curie": "probonto:k0000401", + "name": "shape", + "symbol": "c", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0000402", + "name": "LogLogistic2", + "equivalent": [ + { + "curie": "probonto:k0000377", + "name": "LogLogistic1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000408", + "name": "scale", + "symbol": "\\lambda", + "short_name": "scale" + }, + { + "curie": "probonto:k0000409", + "name": "shape", + "symbol": "\\kappa", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0000410", + "name": "Poisson1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000417", + "name": "rate", + "symbol": "\\lambda", + "short_name": "Poisson intensity" + } + ] + }, + { + "curie": "probonto:k0000418", + "name": "Exponential1", + "equivalent": [ + { + "curie": "probonto:k0000443", + "name": "Exponential2" + } + ], + "parameters": [ + { + "curie": "probonto:k0000427", + "name": "rate", + "symbol": "\\lambda", + "short_name": "rate or inverse scale" + } + ] + }, + { + "curie": "probonto:k0000428", + "name": "LogNormal1", + "equivalent": [ + { + "curie": "probonto:k0000453", + "name": "LogNormal2" + }, + { + "curie": "probonto:k0000553", + "name": "LogNormal6" + }, + { + "curie": "probonto:k0000478", + "name": "LogNormal3" + }, + { + "curie": "probonto:k0000500", + "name": "LogNormal4" + }, + { + "curie": "probonto:k0000526", + "name": "LogNormal5" + }, + { + "curie": "probonto:k0001028", + "name": "LogNormal7" + } + ], + "parameters": [ + { + "curie": "probonto:k0000435", + "name": "meanLog", + "symbol": "\\mu", + "short_name": "mean of log(x)" + }, + { + "curie": "probonto:k0000436", + "name": "stdevLog", + "symbol": "\\sigma", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0000437", + "name": "Poisson2", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000442", + "name": "logRate", + "symbol": "\\alpha", + "short_name": "log Poisson intensity" + } + ] + }, + { + "curie": "probonto:k0000443", + "name": "Exponential2", + "equivalent": [ + { + "curie": "probonto:k0000418", + "name": "Exponential1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000452", + "name": "mean", + "symbol": "\\beta", + "short_name": "scale" + } + ] + }, + { + "curie": "probonto:k0000453", + "name": "LogNormal2", + "equivalent": [ + { + "curie": "probonto:k0000428", + "name": "LogNormal1" + }, + { + "curie": "probonto:k0000553", + "name": "LogNormal6" + }, + { + "curie": "probonto:k0000478", + "name": "LogNormal3" + }, + { + "curie": "probonto:k0000500", + "name": "LogNormal4" + }, + { + "curie": "probonto:k0000526", + "name": "LogNormal5" + }, + { + "curie": "probonto:k0001028", + "name": "LogNormal7" + } + ], + "parameters": [ + { + "curie": "probonto:k0000460", + "name": "meanLog", + "symbol": "\\mu", + "short_name": "mean of log(x)" + }, + { + "curie": "probonto:k0000461", + "name": "varLog", + "symbol": "v", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0000462", + "name": "Rayleigh1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000469", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale" + } + ] + }, + { + "curie": "probonto:k0000470", + "name": "ExponentiallyModifiedGaussian1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000475", + "name": "mean", + "symbol": "\\mu", + "short_name": "mean" + }, + { + "curie": "probonto:k0000476", + "name": "stdev", + "symbol": "\\sigma", + "short_name": "standard deviation" + }, + { + "curie": "probonto:k0000477", + "name": "rate", + "symbol": "\\lambda", + "short_name": "rate or inverse scale" + } + ] + }, + { + "curie": "probonto:k0000478", + "name": "LogNormal3", + "equivalent": [ + { + "curie": "probonto:k0000500", + "name": "LogNormal4" + }, + { + "curie": "probonto:k0000526", + "name": "LogNormal5" + }, + { + "curie": "probonto:k0000428", + "name": "LogNormal1" + }, + { + "curie": "probonto:k0000553", + "name": "LogNormal6" + }, + { + "curie": "probonto:k0000453", + "name": "LogNormal2" + }, + { + "curie": "probonto:k0001028", + "name": "LogNormal7" + } + ], + "parameters": [ + { + "curie": "probonto:k0000485", + "name": "median", + "symbol": "m", + "short_name": "median / geometric mean" + }, + { + "curie": "probonto:k0000486", + "name": "stdevLog", + "symbol": "\\sigma", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0000487", + "name": "Rice1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000490", + "name": "noncentrality", + "symbol": "\\nu", + "short_name": "noncentrality parameter" + }, + { + "curie": "probonto:k0000491", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale parameter" + } + ] + }, + { + "curie": "probonto:k0000492", + "name": "F1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000498", + "name": "numerator", + "symbol": "n_1", + "short_name": "degree of freedom" + }, + { + "curie": "probonto:k0000499", + "name": "denominator", + "symbol": "n_2", + "short_name": "degree of freedom" + } + ] + }, + { + "curie": "probonto:k0000500", + "name": "LogNormal4", + "equivalent": [ + { + "curie": "probonto:k0000478", + "name": "LogNormal3" + }, + { + "curie": "probonto:k0000526", + "name": "LogNormal5" + }, + { + "curie": "probonto:k0000428", + "name": "LogNormal1" + }, + { + "curie": "probonto:k0000553", + "name": "LogNormal6" + }, + { + "curie": "probonto:k0000453", + "name": "LogNormal2" + }, + { + "curie": "probonto:k0001028", + "name": "LogNormal7" + } + ], + "parameters": [ + { + "curie": "probonto:k0000507", + "name": "median", + "symbol": "m", + "short_name": "median / geometric mean" + }, + { + "curie": "probonto:k0000508", + "name": "coefVar", + "symbol": "cv", + "short_name": "coefficient of variation" + } + ] + }, + { + "curie": "probonto:k0000509", + "name": "ScaledInverseChiSquare1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000515", + "name": "degreesOfFreedom", + "symbol": "\\nu", + "short_name": "degrees of freedom" + }, + { + "curie": "probonto:k0000516", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scaling parameter" + } + ] + }, + { + "curie": "probonto:k0000517", + "name": "Frechet1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000524", + "name": "shape", + "symbol": "\\alpha", + "short_name": "shape" + }, + { + "curie": "probonto:k0000525", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale" + } + ] + }, + { + "curie": "probonto:k0000526", + "name": "LogNormal5", + "equivalent": [ + { + "curie": "probonto:k0000453", + "name": "LogNormal2" + }, + { + "curie": "probonto:k0000478", + "name": "LogNormal3" + }, + { + "curie": "probonto:k0000500", + "name": "LogNormal4" + }, + { + "curie": "probonto:k0000428", + "name": "LogNormal1" + }, + { + "curie": "probonto:k0000553", + "name": "LogNormal6" + }, + { + "curie": "probonto:k0001028", + "name": "LogNormal7" + } + ], + "parameters": [ + { + "curie": "probonto:k0000533", + "name": "meanLog", + "symbol": "\\mu", + "short_name": "mean of log(x)" + }, + { + "curie": "probonto:k0000534", + "name": "precision", + "symbol": "\\tau", + "short_name": "precision" + } + ] + }, + { + "curie": "probonto:k0000535", + "name": "SkewNormal1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000540", + "name": "location", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0000541", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale" + }, + { + "curie": "probonto:k0000542", + "name": "shape", + "symbol": "\\alpha", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0000543", + "name": "Frechet2", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000550", + "name": "shape", + "symbol": "\\alpha", + "short_name": "shape" + }, + { + "curie": "probonto:k0000551", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale" + }, + { + "curie": "probonto:k0000552", + "name": "locationOfMinimum", + "symbol": "m", + "short_name": "location of minimum" + } + ] + }, + { + "curie": "probonto:k0000553", + "name": "LogNormal6", + "equivalent": [ + { + "curie": "probonto:k0000428", + "name": "LogNormal1" + }, + { + "curie": "probonto:k0000453", + "name": "LogNormal2" + }, + { + "curie": "probonto:k0000478", + "name": "LogNormal3" + }, + { + "curie": "probonto:k0000500", + "name": "LogNormal4" + }, + { + "curie": "probonto:k0000526", + "name": "LogNormal5" + }, + { + "curie": "probonto:k0001028", + "name": "LogNormal7" + } + ], + "parameters": [ + { + "curie": "probonto:k0000560", + "name": "median", + "symbol": "m", + "short_name": "median / geometric mean" + }, + { + "curie": "probonto:k0000561", + "name": "geomStdev", + "symbol": "\\sigma_g", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0000562", + "name": "StandardNormal1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000569", + "name": "mean", + "symbol": "\\mu", + "short_name": "mean" + }, + { + "curie": "probonto:k0000570", + "name": "stdev", + "symbol": "\\sigma", + "short_name": "standard deviation" + } + ] + }, + { + "curie": "probonto:k0000571", + "name": "Gamma1", + "equivalent": [ + { + "curie": "probonto:k0000418", + "name": "Exponential1" + }, + { + "curie": "probonto:k0000597", + "name": "Gamma2" + } + ], + "parameters": [ + { + "curie": "probonto:k0000578", + "name": "shape", + "symbol": "k", + "short_name": "shape" + }, + { + "curie": "probonto:k0000579", + "name": "scale", + "symbol": "\\theta", + "short_name": "scale" + } + ] + }, + { + "curie": "probonto:k0000580", + "name": "LogUniform1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000585", + "name": "minimum", + "symbol": "min", + "short_name": "minimum" + }, + { + "curie": "probonto:k0000586", + "name": "maximum", + "symbol": "max", + "short_name": "maximum" + } + ] + }, + { + "curie": "probonto:k0000587", + "name": "StandardUniform1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000595", + "name": "minimum", + "symbol": "a", + "short_name": "minimum" + }, + { + "curie": "probonto:k0000596", + "name": "maximum", + "symbol": "b", + "short_name": "maximum" + } + ] + }, + { + "curie": "probonto:k0000597", + "name": "Gamma2", + "equivalent": [ + { + "curie": "probonto:k0000571", + "name": "Gamma1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000602", + "name": "shape", + "symbol": "r", + "short_name": "shape" + }, + { + "curie": "probonto:k0000603", + "name": "rate", + "symbol": "\\mu", + "short_name": "rate" + } + ] + }, + { + "curie": "probonto:k0000604", + "name": "Lomax1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000611", + "name": "scale", + "symbol": "\\lambda", + "short_name": "scale" + }, + { + "curie": "probonto:k0000612", + "name": "shape", + "symbol": "\\alpha", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0000613", + "name": "StudentT1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000620", + "name": "degreesOfFreedom", + "symbol": "\\nu", + "short_name": "degrees of freedom" + } + ] + }, + { + "curie": "probonto:k0000621", + "name": "GeneralizedGamma1", + "equivalent": [ + { + "curie": "probonto:k0000670", + "name": "GeneralizedGamma3" + } + ], + "parameters": [ + { + "curie": "probonto:k0000627", + "name": "scale", + "symbol": "a", + "short_name": "scale" + }, + { + "curie": "probonto:k0000628", + "name": "shape1", + "symbol": "d", + "short_name": "shape" + }, + { + "curie": "probonto:k0000629", + "name": "shape2", + "symbol": "p", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0000630", + "name": "MixtureDistribution1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000634", + "name": "weight", + "symbol": "\\pi_1, \\ldots, \\pi_k", + "short_name": "mixing coefficients" + } + ] + }, + { + "curie": "probonto:k0000635", + "name": "StudentT2", + "equivalent": [ + { + "curie": "probonto:k0000613", + "name": "StudentT1" + }, + { + "curie": "probonto:k0001091", + "name": "StudentT3" + } + ], + "parameters": [ + { + "curie": "probonto:k0000641", + "name": "mean", + "symbol": "\\mu", + "short_name": "mean" + }, + { + "curie": "probonto:k0000642", + "name": "scale", + "symbol": "\\tau", + "short_name": "scale" + }, + { + "curie": "probonto:k0000643", + "name": "degreesOfFreedom", + "symbol": "k", + "short_name": "degrees of freedom" + } + ] + }, + { + "curie": "probonto:k0000644", + "name": "GeneralizedGamma2", + "equivalent": [ + { + "curie": "probonto:k0000418", + "name": "Exponential1" + }, + { + "curie": "probonto:k0000800", + "name": "Weibull1" + }, + { + "curie": "probonto:k0000299", + "name": "ChiSquared1" + }, + { + "curie": "probonto:k0000621", + "name": "GeneralizedGamma1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000650", + "name": "location", + "symbol": "a", + "short_name": "location" + }, + { + "curie": "probonto:k0000651", + "name": "scale", + "symbol": "b", + "short_name": "scale" + }, + { + "curie": "probonto:k0000652", + "name": "shape1", + "symbol": "c", + "short_name": "shape1" + }, + { + "curie": "probonto:k0000653", + "name": "shape2", + "symbol": "k", + "short_name": "shape2" + } + ] + }, + { + "curie": "probonto:k0000654", + "name": "Multinomial1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000659", + "name": "numberOfTrials", + "symbol": "n", + "short_name": "number of trials" + }, + { + "curie": "probonto:k0000660", + "name": "probabilityOfSuccess", + "symbol": "p_1, \\ldots, p_k", + "short_name": "event probabilities" + } + ] + }, + { + "curie": "probonto:k0000661", + "name": "Triangular1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000667", + "name": "lowerLimit", + "symbol": "a", + "short_name": "lower limit" + }, + { + "curie": "probonto:k0000668", + "name": "upperLimit", + "symbol": "b", + "short_name": "upper limit" + }, + { + "curie": "probonto:k0000669", + "name": "shape", + "symbol": "c", + "short_name": "shape (mode)" + } + ] + }, + { + "curie": "probonto:k0000670", + "name": "GeneralizedGamma3", + "equivalent": [ + { + "curie": "probonto:k0000621", + "name": "GeneralizedGamma1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000673", + "name": "scale", + "symbol": "r", + "short_name": "scale" + }, + { + "curie": "probonto:k0000674", + "name": "shape1", + "symbol": "\\mu", + "short_name": "shape" + }, + { + "curie": "probonto:k0000675", + "name": "shape2", + "symbol": "\\beta", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0000676", + "name": "MultivariateGaussianProcess1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000679", + "name": "kernelMatrix", + "symbol": "\\Sigma", + "short_name": "symmetric, positive definite kernel matrix" + }, + { + "curie": "probonto:k0000680", + "name": "inverseScale", + "symbol": "w", + "short_name": "vector of positive inverse scales" + } + ] + }, + { + "curie": "probonto:k0000681", + "name": "TruncatedNormal1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000686", + "name": "mean", + "symbol": "\\mu", + "short_name": "mean" + }, + { + "curie": "probonto:k0000687", + "name": "stdev", + "symbol": "\\sigma", + "short_name": "standard deviation" + }, + { + "curie": "probonto:k0000688", + "name": "lowerBound", + "symbol": "a", + "short_name": "lower bound" + }, + { + "curie": "probonto:k0000689", + "name": "upperBound", + "symbol": "b", + "short_name": "upper bound" + } + ] + }, + { + "curie": "probonto:k0000690", + "name": "GeneralizedNegativeBinomial1", + "equivalent": [ + { + "curie": "probonto:k0000117", + "name": "Binomial1" + }, + { + "curie": "probonto:k0000161", + "name": "NegativeBinomial4" + }, + { + "curie": "probonto:k0000154", + "name": "InverseBinomial1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000695", + "name": "theta", + "symbol": "\\theta", + "short_name": "scale" + }, + { + "curie": "probonto:k0000696", + "name": "beta", + "symbol": "\\beta", + "short_name": "shape1" + }, + { + "curie": "probonto:k0000697", + "name": "m", + "symbol": "m", + "short_name": "shape2" + } + ] + }, + { + "curie": "probonto:k0000698", + "name": "MultivariateGaussianProcess2", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000701", + "name": "choleskyFactor", + "symbol": "L", + "short_name": "lower triangular matrix" + }, + { + "curie": "probonto:k0000702", + "name": "inverseScale", + "symbol": "w", + "short_name": "vector of positive inverse scales" + } + ] + }, + { + "curie": "probonto:k0000703", + "name": "Uniform1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000710", + "name": "minimum", + "symbol": "a", + "short_name": "minimum" + }, + { + "curie": "probonto:k0000711", + "name": "maximum", + "symbol": "b", + "short_name": "maximum" + } + ] + }, + { + "curie": "probonto:k0000712", + "name": "GeneralizedPoisson1", + "equivalent": [ + { + "curie": "probonto:k0000735", + "name": "GeneralizedPoisson2" + } + ], + "parameters": [ + { + "curie": "probonto:k0000717", + "name": "rate", + "symbol": "\\theta", + "short_name": "Poisson intensity" + }, + { + "curie": "probonto:k0000718", + "name": "dispersion", + "symbol": "\\delta", + "short_name": "dispersion" + } + ] + }, + { + "curie": "probonto:k0000719", + "name": "MultivariateNormal1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000725", + "name": "mean", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0000726", + "name": "covarianceMatrix", + "symbol": "\\Sigma", + "short_name": "covariance matrix" + } + ] + }, + { + "curie": "probonto:k0000727", + "name": "UniformDiscrete1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000733", + "name": "minimum", + "symbol": "a", + "short_name": "minimum" + }, + { + "curie": "probonto:k0000734", + "name": "maximum", + "symbol": "b", + "short_name": "maximum" + } + ] + }, + { + "curie": "probonto:k0000735", + "name": "GeneralizedPoisson2", + "equivalent": [ + { + "curie": "probonto:k0000712", + "name": "GeneralizedPoisson1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000740", + "name": "mean", + "symbol": "\\mu", + "short_name": "mean" + }, + { + "curie": "probonto:k0000741", + "name": "dispersion", + "symbol": "\\delta", + "short_name": "dispersion" + } + ] + }, + { + "curie": "probonto:k0000742", + "name": "MultivariateNormal2", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000748", + "name": "mean", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0000749", + "name": "precisionMatrix", + "symbol": "T", + "short_name": "precision matrix" + } + ] + }, + { + "curie": "probonto:k0000750", + "name": "UniformDiscrete2", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000757", + "name": "numberOfValues", + "symbol": "n", + "short_name": "number of values" + } + ] + }, + { + "curie": "probonto:k0000758", + "name": "GeneralizedPoisson3", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000763", + "name": "mean", + "symbol": "\\mu", + "short_name": "mean" + }, + { + "curie": "probonto:k0000764", + "name": "dispersion", + "symbol": "\\alpha", + "short_name": "dispersion" + } + ] + }, + { + "curie": "probonto:k0000765", + "name": "MultivariateNormal3", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000771", + "name": "mean", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0000772", + "name": "choleskyFactor", + "symbol": "L", + "short_name": "lower triangular matrix" + } + ] + }, + { + "curie": "probonto:k0000773", + "name": "VonMises1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000780", + "name": "location", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0000781", + "name": "concentration", + "symbol": "\\kappa", + "short_name": "concentration" + } + ] + }, + { + "curie": "probonto:k0000782", + "name": "Geometric1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000789", + "name": "probability", + "symbol": "p", + "short_name": "success probability" + } + ] + }, + { + "curie": "probonto:k0000790", + "name": "MultivariateStudentT1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0000797", + "name": "mean", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0000798", + "name": "covarianceMatrix", + "symbol": "\\Sigma", + "short_name": "covariance matrix" + }, + { + "curie": "probonto:k0000799", + "name": "degreesOfFreedom", + "symbol": "\\nu", + "short_name": "degrees of freedom" + } + ] + }, + { + "curie": "probonto:k0000800", + "name": "Weibull1", + "equivalent": [ + { + "curie": "probonto:k0000022", + "name": "Weibull2" + }, + { + "curie": "probonto:k0000418", + "name": "Exponential1" + }, + { + "curie": "probonto:k0000462", + "name": "Rayleigh1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000809", + "name": "scale", + "symbol": "\\lambda", + "short_name": "scale" + }, + { + "curie": "probonto:k0000810", + "name": "shape", + "symbol": "k", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0000982", + "name": "HalfNormal2", + "equivalent": [ + { + "curie": "probonto:k0000068", + "name": "HalfNormal1" + } + ], + "parameters": [ + { + "curie": "probonto:k0000987", + "name": "location", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0000988", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale" + } + ] + }, + { + "curie": "probonto:k0001028", + "name": "LogNormal7", + "equivalent": [ + { + "curie": "probonto:k0000428", + "name": "LogNormal1" + }, + { + "curie": "probonto:k0000453", + "name": "LogNormal2" + }, + { + "curie": "probonto:k0000478", + "name": "LogNormal3" + }, + { + "curie": "probonto:k0000500", + "name": "LogNormal4" + }, + { + "curie": "probonto:k0000526", + "name": "LogNormal5" + }, + { + "curie": "probonto:k0000553", + "name": "LogNormal6" + } + ], + "parameters": [ + { + "curie": "probonto:k0001035", + "name": "mean", + "symbol": "\\mu_N", + "short_name": "mean of x" + }, + { + "curie": "probonto:k0001036", + "name": "stdev", + "symbol": "\\sigma_N", + "short_name": "standard deviation" + } + ] + }, + { + "curie": "probonto:k0001044", + "name": "Trapezoidal1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001049", + "name": "lowerBound", + "symbol": "a", + "short_name": "Lower bound" + }, + { + "curie": "probonto:k0001050", + "name": "levelStart", + "symbol": "b", + "short_name": "Level start" + }, + { + "curie": "probonto:k0001051", + "name": "levelEnd", + "symbol": "c", + "short_name": "Level end" + }, + { + "curie": "probonto:k0001052", + "name": "upperBound", + "symbol": "d", + "short_name": "Upper bound" + } + ] + }, + { + "curie": "probonto:k0001082", + "name": "Amoroso1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001084", + "name": "location", + "symbol": "a", + "short_name": "location parameter" + }, + { + "curie": "probonto:k0001085", + "name": "scale", + "symbol": "\\theta", + "short_name": "scale parameter" + }, + { + "curie": "probonto:k0001086", + "name": "shape1", + "symbol": "\\alpha", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0001087", + "name": "shape2", + "symbol": "\\beta", + "short_name": "shape paremeter" + } + ] + }, + { + "curie": "probonto:k0001088", + "name": "LKJCorrelation2", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001090", + "name": "shape", + "symbol": "\\eta", + "short_name": "shape " + } + ] + }, + { + "curie": "probonto:k0001091", + "name": "StudentT3", + "equivalent": [ + { + "curie": "probonto:k0000635", + "name": "StudentT2" + } + ], + "parameters": [ + { + "curie": "probonto:k0001093", + "name": "degreesOfFreedom", + "symbol": "\\nu", + "short_name": "degrees of freedom" + }, + { + "curie": "probonto:k0001094", + "name": "location", + "symbol": "\\mu", + "short_name": "mean" + }, + { + "curie": "probonto:k0001095", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale" + } + ] + }, + { + "curie": "probonto:k0001105", + "name": "Arcsine2", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001112", + "name": "lowerBound", + "symbol": "a", + "short_name": "lower bound" + }, + { + "curie": "probonto:k0001113", + "name": "upperBound", + "symbol": "b", + "short_name": "upper bound" + } + ] + }, + { + "curie": "probonto:k0001114", + "name": "NoncentralBeta1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001117", + "name": "noncentrality", + "symbol": "\\lambda", + "short_name": "noncentrality parameter" + }, + { + "curie": "probonto:k0001118", + "name": "shape1", + "symbol": "\\alpha", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0001119", + "name": "shape2", + "symbol": "\\beta", + "short_name": "shape parameter" + } + ] + }, + { + "curie": "probonto:k0001120", + "name": "AsymmetricLaplace1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001125", + "name": "location", + "symbol": "\\mu", + "short_name": "location parameter" + }, + { + "curie": "probonto:k0001126", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale parameter" + } + ] + }, + { + "curie": "probonto:k0001127", + "name": "NoncentralChiSquared1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001132", + "name": "noncentrality", + "symbol": "\\delta", + "short_name": "noncentrality parameter" + }, + { + "curie": "probonto:k0001133", + "name": "degreesOfFreedom", + "symbol": "n", + "short_name": "degrees of freedom" + } + ] + }, + { + "curie": "probonto:k0001143", + "name": "NoncentralF1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001148", + "name": "noncentrality", + "symbol": "\\lambda", + "short_name": "noncentrality parameter" + }, + { + "curie": "probonto:k0001149", + "name": "degreesOfFreedom1", + "symbol": "m", + "short_name": "degrees of freedom" + }, + { + "curie": "probonto:k0001150", + "name": "degreesOfFreedom2", + "symbol": "n", + "short_name": "degrees of freedom" + } + ] + }, + { + "curie": "probonto:k0001151", + "name": "TwoSidedPower1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001158", + "name": "lowerBound", + "symbol": "a", + "short_name": "Lower bound" + }, + { + "curie": "probonto:k0001159", + "name": "upperBound", + "symbol": "b", + "short_name": "upper bound" + }, + { + "curie": "probonto:k0001160", + "name": "location", + "symbol": "m", + "short_name": "location" + }, + { + "curie": "probonto:k0001161", + "name": "shape", + "symbol": "n", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0001162", + "name": "NoncentralT1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001165", + "name": "noncentrality", + "symbol": "\\lambda", + "short_name": "noncentrality parameter" + }, + { + "curie": "probonto:k0001166", + "name": "degreesOfFreedom", + "symbol": "n", + "short_name": "degrees of freedom" + } + ] + }, + { + "curie": "probonto:k0001167", + "name": "BetaNegativeBinomial1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001171", + "name": "shape1", + "symbol": "\\alpha", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0001172", + "name": "shape2", + "symbol": "\\beta", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0001173", + "name": "numberOfSuccesses", + "symbol": "n", + "short_name": "number of successes" + } + ] + }, + { + "curie": "probonto:k0001176", + "name": "WeibullDiscrete1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001181", + "name": "shape1", + "symbol": "p", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0001182", + "name": "shape2", + "symbol": "\\beta", + "short_name": "shape parameter" + } + ] + }, + { + "curie": "probonto:k0001183", + "name": "Borel1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001186", + "name": "shape", + "symbol": "\\mu", + "short_name": "rate" + } + ] + }, + { + "curie": "probonto:k0001194", + "name": "WignerSemicircle1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001201", + "name": "radius", + "symbol": "R", + "short_name": "radius" + } + ] + }, + { + "curie": "probonto:k0001202", + "name": "Makeham1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001211", + "name": "delta", + "symbol": "\\delta", + "short_name": "Makeham1.delta" + }, + { + "curie": "probonto:k0001212", + "name": "kappa", + "symbol": "\\kappa", + "short_name": "Makeham1.kappa" + }, + { + "curie": "probonto:k0001213", + "name": "gamma", + "symbol": "\\gamma", + "short_name": "Makeham1.gamma" + } + ] + }, + { + "curie": "probonto:k0001214", + "name": "Power1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001221", + "name": "scale", + "symbol": "\\alpha", + "short_name": "scale parameter" + }, + { + "curie": "probonto:k0001222", + "name": "shape", + "symbol": "\\beta", + "short_name": "shape parameter" + } + ] + }, + { + "curie": "probonto:k0001223", + "name": "MaxwellBoltzmann1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001229", + "name": "scale", + "symbol": "a", + "short_name": "scale parameter" + } + ] + }, + { + "curie": "probonto:k0001230", + "name": "PowerNormal1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001233", + "name": "shape", + "symbol": "\\lambda", + "short_name": "transforming parameter" + }, + { + "curie": "probonto:k0001234", + "name": "location", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0001235", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale " + } + ] + }, + { + "curie": "probonto:k0001236", + "name": "YuleSimon1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001242", + "name": "shape", + "symbol": "\\rho", + "short_name": "shape parameter" + } + ] + }, + { + "curie": "probonto:k0001243", + "name": "Chi1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001249", + "name": "degreesOfFreedom", + "symbol": "k", + "short_name": "degrees of freedom" + } + ] + }, + { + "curie": "probonto:k0001250", + "name": "InverseChiSquare1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001256", + "name": "degreesOfFreedom", + "symbol": "\\nu", + "short_name": "degrees of freedom" + } + ] + }, + { + "curie": "probonto:k0001257", + "name": "SinhArcsinh1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001259", + "name": "location", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0001260", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale" + }, + { + "curie": "probonto:k0001261", + "name": "skewness", + "symbol": "\\nu", + "short_name": "left hand tail" + }, + { + "curie": "probonto:k0001262", + "name": "kurtosis", + "symbol": "\\tau", + "short_name": "right hand tail" + } + ] + }, + { + "curie": "probonto:k0001263", + "name": "Zeta1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001268", + "name": "shape", + "symbol": "\\alpha", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0001269", + "name": "Dagum1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001276", + "name": "shape1", + "symbol": "p", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0001277", + "name": "shape2", + "symbol": "a", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0001278", + "name": "scale", + "symbol": "b", + "short_name": "scale parameter" + } + ] + }, + { + "curie": "probonto:k0001279", + "name": "SinhArcsinh2", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001282", + "name": "location", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0001283", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale" + }, + { + "curie": "probonto:k0001284", + "name": "skewness", + "symbol": "\\epsilon", + "short_name": "skewness" + }, + { + "curie": "probonto:k0001285", + "name": "kurtosis", + "symbol": "\\delta", + "short_name": "kurtosis" + } + ] + }, + { + "curie": "probonto:k0001286", + "name": "Zipf1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001291", + "name": "shape", + "symbol": "\\alpha", + "short_name": "shape" + }, + { + "curie": "probonto:k0001292", + "name": "numberOfElements", + "symbol": "n", + "short_name": "number of elements" + } + ] + }, + { + "curie": "probonto:k0001293", + "name": "JohnsonSB1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001296", + "name": "shape1", + "symbol": "\\gamma", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0001297", + "name": "shape2", + "symbol": "\\delta", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0001298", + "name": "location", + "symbol": "\\mu", + "short_name": "location parameter" + }, + { + "curie": "probonto:k0001299", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale parameter" + } + ] + }, + { + "curie": "probonto:k0001314", + "name": "JohnsonSL1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001317", + "name": "shape1", + "symbol": "\\gamma", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0001318", + "name": "shape2", + "symbol": "\\delta", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0001319", + "name": "location", + "symbol": "\\mu", + "short_name": "location parameter" + }, + { + "curie": "probonto:k0001320", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale parameter" + } + ] + }, + { + "curie": "probonto:k0001328", + "name": "JohnsonSU1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001331", + "name": "shape1", + "symbol": "\\gamma", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0001332", + "name": "shape2", + "symbol": "\\delta", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0001333", + "name": "location", + "symbol": "\\mu", + "short_name": "location parameter" + }, + { + "curie": "probonto:k0001334", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale parameter" + } + ] + }, + { + "curie": "probonto:k0001337", + "name": "JohnsonSN1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001340", + "name": "shape1", + "symbol": "\\gamma", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0001341", + "name": "shape2", + "symbol": "\\delta", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0001342", + "name": "location", + "symbol": "\\mu", + "short_name": "location parameter" + }, + { + "curie": "probonto:k0001343", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale parameter" + } + ] + }, + { + "curie": "probonto:k0001344", + "name": "Muth1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001350", + "name": "shape", + "symbol": "\\kappa", + "short_name": "shape parameter" + } + ] + }, + { + "curie": "probonto:k0001351", + "name": "StandardPower1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001359", + "name": "shape", + "symbol": "\\beta", + "short_name": "shape parameter" + } + ] + }, + { + "curie": "probonto:k0001360", + "name": "Kumaraswamy1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001368", + "name": "shape1", + "symbol": "a", + "short_name": "shape parameter" + }, + { + "curie": "probonto:k0001369", + "name": "shape2", + "symbol": "b", + "short_name": "shape parameter" + } + ] + }, + { + "curie": "probonto:k0001379", + "name": "StandardTwoSidedPower1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001384", + "name": "location", + "symbol": "m", + "short_name": "location" + }, + { + "curie": "probonto:k0001385", + "name": "shape", + "symbol": "n", + "short_name": "shape" + } + ] + }, + { + "curie": "probonto:k0001386", + "name": "FoldedNormal1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001391", + "name": "location", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0001392", + "name": "scale", + "symbol": "\\sigma", + "short_name": "scale" + } + ] + }, + { + "curie": "probonto:k0001393", + "name": "Levy1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001400", + "name": "location", + "symbol": "\\mu", + "short_name": "location" + }, + { + "curie": "probonto:k0001401", + "name": "scale", + "symbol": "c", + "short_name": "scale" + } + ] + }, + { + "curie": "probonto:k0001402", + "name": "LKJCorrelation1", + "equivalent": [], + "parameters": [ + { + "curie": "probonto:k0001404", + "name": "shape", + "symbol": "\\eta", + "short_name": "shape " + } + ] + } + ] diff --git a/gollm/openai/prompts/petrinet_config.py b/gollm/openai/prompts/petrinet_config.py index 1bc4d66..17918b5 100644 --- a/gollm/openai/prompts/petrinet_config.py +++ b/gollm/openai/prompts/petrinet_config.py @@ -2,15 +2,22 @@ You are a helpful agent designed to find initial parameters for a given petri net model file and a given research paper describing the mathematical model. Use the following petri net json file as a reference: {petrinet}. Do not respond in full sentences, only populate the JSON output with conditions and parameters. - Assume that parameter fields with missing values may have multiple different sets values discussed in the user provided text for different conditions.\n Return the different sets of initial parameters for the petri net model file like so: {{"conditions": {{"condition_1": "description of condition_1", "condition_2": "description of condition_2", ...}}, "parameters": [{{ - "id": "beta", - "value": {{'condition_1': 0.1, 'condition_2': 0.2}}, - "description": "Description of the parameter beta", - "units": {{ "expression": "1.0e-9*mole/liter", "expression_mathml": "1.0000000000000001e-9moleliter" }} + "id": "beta", + "name": "β", + "value": {{'condition_1': 0.1, 'condition_2': 0.2}}, + "description": "infection rate", + "units": {{ "expression": "1/(person*day)", "expression_mathml": "1personday" }} + "distribution": {{ + "type": "Uniform1", + "parameters": {{ + "minimum": 2.6e-7, + "maximum": 2.8e-7 + }} + }}, .... }} ], @@ -18,25 +25,16 @@ If a condition is not mentioned in the following text body, then the value should be set to the string "null". Be sure to use consistent naming conventions for the conditions. Instead of 'condition_1' and 'condition_2'.. use names that are descriptive of the conditions. - Populate the description, and the units fields for each parameter. If the description can not be found, use the parameter's name if available, otherwise set it to "null". - For units, provide both "units.expression" (a unicode string) and "units.expression_mathml" (MathML format). If the unit is not provided or invalid, omit the units field. + For each parameter, following below instructions, fill the value for `name`, `description`, `units`, and `distribution` fields if not provided in the petrinet file. + - For the name, try best to give a name incorporating all the information you have. Try deriving the name from the id whenever it makes sense. Here are some example of id to name mappings: {{ id: "beta", name: "β" }},{{ id: "gamma", name: "γ" }}, {{ id: "S0", name: "S₀" }}, {{ id: "I0", name: "R₀" }}, {{ id: "beta", name: "β" }} etc. If name can't be generated, omit the field. + - For the description, provide long-form description of the parameter. If the description can not be found, set it to an empty string "", + - For units, provide both "units.expression" (a unicode string) and "units.expression_mathml" (MathML format). Make sure both units are valid and 'units.expression' and 'units.expression_mathml' represents the same unit. If the unit is not found or not valid, omit the units field. + - For the distribution, provide the type of distribution and the parameters for the distribution. The type and the parameters must match corresponding ontology in the user provided provided probability distribution ontology. If the valid distribution is not found, omit the distribution field. Only use parameters found in the reference petrinet file provided above. + Ensure that the output follows the above petri net format and can be serialized as a JSON. Specifically populate parameters and initials. Use the following - text body to answer the user's query: --START USER PROVIDED TEXT-- {research_paper}--END USER PROVIDED TEXT--\n\n Answer: + text body to answer the user's query: --START USER PROVIDED TEXT-- {research_paper}--END USER PROVIDED TEXT--\n\n --START USER PROVIDED PROBABILITY DISTRIBUTION ONTOLOGY-- {pb} --END USER PROVIDED PROBABILITY DISTRIBUTION ONTOLOGY-- Answer: {{ """ - # For units, provide both "units.expression" (a unicode string) and "units.expression_mathml" (MathML format). If the unit is not provided or invalid, set the 'units' field to "null". - - -# If a condition is not mentioned in the following text body, then the value should be set to the string "null". Be sure to use consistent naming conventions for the conditions. -# Instead of 'condition_1' and 'condition_2'.. use names that are descriptive of the conditions. - -# Populate the description, and the units fields for each parameter. If the description can not be found, use the parameter's name if available, otherwise set it to "null". -# For units, provide both "units.expression" with a unicode string representing the expression and "units.expression_mathml" with the MathML representation of the expression. If the unit expression is not extracted from the text body, not a valid unit, then the value of the 'units' field should be set to "null". -# Only use parameters found in the reference petrinet file provided above. -# Ensure that the output follows the above petri net format and can be serialized as a JSON. Specifically populate parameters and initials. Use the following -# text body to answer the user's query: --START USER PROVIDED TEXT-- {research_paper}--END USER PROVIDED TEXT--\n\n Answer: -# {{ -# """ diff --git a/gollm/openai/tool_utils.py b/gollm/openai/tool_utils.py index fb64ef6..753807e 100644 --- a/gollm/openai/tool_utils.py +++ b/gollm/openai/tool_utils.py @@ -30,10 +30,13 @@ def model_config_chain(research_paper: str, amr: str) -> any: print("Reading model config from research paper: {}".format(research_paper[:100])) research_paper = remove_references(research_paper) research_paper = normalize_greek_alphabet(research_paper) + with open('./probonto.json', 'r') as f: + pb = json.load(f) prompt = PETRINET_PROMPT.format( petrinet=escape_curly_braces(amr), research_paper=escape_curly_braces(research_paper), + pb=escape_curly_braces(pb) ) client = OpenAI() output = client.chat.completions.create( From ac474201c5cccc4af1a13e07deba5b8e7c77196b Mon Sep 17 00:00:00 2001 From: Jaehwan Ryu Date: Tue, 9 Jul 2024 10:37:23 -0400 Subject: [PATCH 03/13] Updated prompt --- gollm/openai/prompts/petrinet_config.py | 5 ++--- gollm/openai/{ => prompts}/probonto.json | 0 gollm/openai/tool_utils.py | 9 ++++----- 3 files changed, 6 insertions(+), 8 deletions(-) rename gollm/openai/{ => prompts}/probonto.json (100%) diff --git a/gollm/openai/prompts/petrinet_config.py b/gollm/openai/prompts/petrinet_config.py index 17918b5..9d24266 100644 --- a/gollm/openai/prompts/petrinet_config.py +++ b/gollm/openai/prompts/petrinet_config.py @@ -29,12 +29,11 @@ - For the name, try best to give a name incorporating all the information you have. Try deriving the name from the id whenever it makes sense. Here are some example of id to name mappings: {{ id: "beta", name: "β" }},{{ id: "gamma", name: "γ" }}, {{ id: "S0", name: "S₀" }}, {{ id: "I0", name: "R₀" }}, {{ id: "beta", name: "β" }} etc. If name can't be generated, omit the field. - For the description, provide long-form description of the parameter. If the description can not be found, set it to an empty string "", - For units, provide both "units.expression" (a unicode string) and "units.expression_mathml" (MathML format). Make sure both units are valid and 'units.expression' and 'units.expression_mathml' represents the same unit. If the unit is not found or not valid, omit the units field. - - For the distribution, provide the type of distribution and the parameters for the distribution. The type and the parameters must match corresponding ontology in the user provided provided probability distribution ontology. If the valid distribution is not found, omit the distribution field. + - For the distribution, if present, provide 'distribution.type' and 'distribution.parameters' using 'name' and 'parameters' from the following probability distribution ontology JSON. If the valid distribution is not found, omit the distribution field. --START PROBABILITY DISTRIBUTION ONTOLOGY JSON-- {pb} --END PROBABILITY DISTRIBUTION ONTOLOGY JSON-- Only use parameters found in the reference petrinet file provided above. Ensure that the output follows the above petri net format and can be serialized as a JSON. Specifically populate parameters and initials. Use the following - text body to answer the user's query: --START USER PROVIDED TEXT-- {research_paper}--END USER PROVIDED TEXT--\n\n --START USER PROVIDED PROBABILITY DISTRIBUTION ONTOLOGY-- {pb} --END USER PROVIDED PROBABILITY DISTRIBUTION ONTOLOGY-- Answer: + text body to answer the user's query: --START USER PROVIDED TEXT-- {research_paper}--END USER PROVIDED TEXT--\n\n Answer: {{ """ - diff --git a/gollm/openai/probonto.json b/gollm/openai/prompts/probonto.json similarity index 100% rename from gollm/openai/probonto.json rename to gollm/openai/prompts/probonto.json diff --git a/gollm/openai/tool_utils.py b/gollm/openai/tool_utils.py index 753807e..4ca3042 100644 --- a/gollm/openai/tool_utils.py +++ b/gollm/openai/tool_utils.py @@ -1,4 +1,5 @@ import json +import os from openai import OpenAI, AsyncOpenAI from typing import List from gollm.utils import ( @@ -30,13 +31,14 @@ def model_config_chain(research_paper: str, amr: str) -> any: print("Reading model config from research paper: {}".format(research_paper[:100])) research_paper = remove_references(research_paper) research_paper = normalize_greek_alphabet(research_paper) - with open('./probonto.json', 'r') as f: + + with open(os.getcwd() + '/gollm/openai/prompts/probonto.json', 'r') as f: pb = json.load(f) prompt = PETRINET_PROMPT.format( petrinet=escape_curly_braces(amr), research_paper=escape_curly_braces(research_paper), - pb=escape_curly_braces(pb) + pb=escape_curly_braces(json.dumps(pb)) ) client = OpenAI() output = client.chat.completions.create( @@ -54,9 +56,6 @@ def model_config_chain(research_paper: str, amr: str) -> any: ) config = postprocess_oai_json(output.choices[0].message.content) return config - # print(config) - # return model_config_adapter(config) - def model_card_chain(research_paper: str = None, amr: str = None) -> dict: print("Creating model card...") From d210bc8a2b329abb07a68e3fef4b1d482758076f Mon Sep 17 00:00:00 2001 From: Jaehwan Ryu Date: Tue, 9 Jul 2024 11:32:58 -0400 Subject: [PATCH 04/13] Updated prompt --- gollm/openai/prompts/petrinet_config.py | 6 +++--- gollm/openai/tool_utils.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gollm/openai/prompts/petrinet_config.py b/gollm/openai/prompts/petrinet_config.py index 9d24266..d84e726 100644 --- a/gollm/openai/prompts/petrinet_config.py +++ b/gollm/openai/prompts/petrinet_config.py @@ -26,10 +26,10 @@ Instead of 'condition_1' and 'condition_2'.. use names that are descriptive of the conditions. For each parameter, following below instructions, fill the value for `name`, `description`, `units`, and `distribution` fields if not provided in the petrinet file. - - For the name, try best to give a name incorporating all the information you have. Try deriving the name from the id whenever it makes sense. Here are some example of id to name mappings: {{ id: "beta", name: "β" }},{{ id: "gamma", name: "γ" }}, {{ id: "S0", name: "S₀" }}, {{ id: "I0", name: "R₀" }}, {{ id: "beta", name: "β" }} etc. If name can't be generated, omit the field. + - For the name, extract from the user provided text or derive it from the id whenever possible. Here are some examples of id to name mappings: {{ id: "beta", name: "β" }}, {{ id: "gamma", name: "γ" }}, {{ id: "S0", name: "S₀" }}, {{ id: "I0", name: "R₀" }}. If a name can't be generated, omit the field. - For the description, provide long-form description of the parameter. If the description can not be found, set it to an empty string "", - - For units, provide both "units.expression" (a unicode string) and "units.expression_mathml" (MathML format). Make sure both units are valid and 'units.expression' and 'units.expression_mathml' represents the same unit. If the unit is not found or not valid, omit the units field. - - For the distribution, if present, provide 'distribution.type' and 'distribution.parameters' using 'name' and 'parameters' from the following probability distribution ontology JSON. If the valid distribution is not found, omit the distribution field. --START PROBABILITY DISTRIBUTION ONTOLOGY JSON-- {pb} --END PROBABILITY DISTRIBUTION ONTOLOGY JSON-- + - For units, provide both "units.expression" (a unicode string) and "units.expression_mathml" (MathML format). Ensure both units are valid and represent the same unit. If the unit is not found or not valid, omit the units field. + - For the distribution, if present, provide 'distribution.type' and 'distribution.parameters' using 'name' and 'parameters' from the following probability distribution ontology JSON. If a valid distribution is not found, omit the distribution field. --START PROBABILITY DISTRIBUTION ONTOLOGY JSON-- {pb} --END PROBABILITY DISTRIBUTION ONTOLOGY JSON-- Only use parameters found in the reference petrinet file provided above. diff --git a/gollm/openai/tool_utils.py b/gollm/openai/tool_utils.py index 4ca3042..b51dcd9 100644 --- a/gollm/openai/tool_utils.py +++ b/gollm/openai/tool_utils.py @@ -6,7 +6,6 @@ remove_references, normalize_greek_alphabet, exceeds_tokens, - model_config_adapter, postprocess_oai_json, ) from gollm.openai.prompts.petrinet_config import PETRINET_PROMPT From 54df0c485710b6c4c5ea47977bc2efa69fb837f1 Mon Sep 17 00:00:00 2001 From: Jaehwan Ryu Date: Tue, 9 Jul 2024 14:36:02 -0400 Subject: [PATCH 05/13] Updated adapter --- gollm/openai/prompts/petrinet_config.py | 2 +- gollm/openai/tool_utils.py | 3 ++- gollm/utils.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gollm/openai/prompts/petrinet_config.py b/gollm/openai/prompts/petrinet_config.py index d84e726..6e1147f 100644 --- a/gollm/openai/prompts/petrinet_config.py +++ b/gollm/openai/prompts/petrinet_config.py @@ -29,7 +29,7 @@ - For the name, extract from the user provided text or derive it from the id whenever possible. Here are some examples of id to name mappings: {{ id: "beta", name: "β" }}, {{ id: "gamma", name: "γ" }}, {{ id: "S0", name: "S₀" }}, {{ id: "I0", name: "R₀" }}. If a name can't be generated, omit the field. - For the description, provide long-form description of the parameter. If the description can not be found, set it to an empty string "", - For units, provide both "units.expression" (a unicode string) and "units.expression_mathml" (MathML format). Ensure both units are valid and represent the same unit. If the unit is not found or not valid, omit the units field. - - For the distribution, if present, provide 'distribution.type' and 'distribution.parameters' using 'name' and 'parameters' from the following probability distribution ontology JSON. If a valid distribution is not found, omit the distribution field. --START PROBABILITY DISTRIBUTION ONTOLOGY JSON-- {pb} --END PROBABILITY DISTRIBUTION ONTOLOGY JSON-- + - For the distribution, if present, provide 'distribution.type' and 'distribution.parameters' using 'name' and 'parameters' from the following probability distribution ontology JSON. If a valid distribution is not found, omit the distribution field. Make sure following JSON content is only used for the distribution field and must not affect other fields. --START PROBABILITY DISTRIBUTION ONTOLOGY JSON-- {pb} --END PROBABILITY DISTRIBUTION ONTOLOGY JSON-- Only use parameters found in the reference petrinet file provided above. diff --git a/gollm/openai/tool_utils.py b/gollm/openai/tool_utils.py index b51dcd9..850b4a0 100644 --- a/gollm/openai/tool_utils.py +++ b/gollm/openai/tool_utils.py @@ -6,6 +6,7 @@ remove_references, normalize_greek_alphabet, exceeds_tokens, + model_config_adapter, postprocess_oai_json, ) from gollm.openai.prompts.petrinet_config import PETRINET_PROMPT @@ -54,7 +55,7 @@ def model_config_chain(research_paper: str, amr: str) -> any: ], ) config = postprocess_oai_json(output.choices[0].message.content) - return config + return model_config_adapter(config) def model_card_chain(research_paper: str = None, amr: str = None) -> dict: print("Creating model card...") diff --git a/gollm/utils.py b/gollm/utils.py index f5e26cf..1efe5e6 100644 --- a/gollm/utils.py +++ b/gollm/utils.py @@ -98,7 +98,7 @@ def model_config_adapter(model_config: dict) -> dict: for param_data in model_config["parameters"]: param_value = param_data["value"].get(condition_name) condition_data["parameters"].append( - {"id": param_data["id"], "value": param_value} + {"id": param_data["id"], "value": param_value, "name": param_data.get("name"), "description": param_data.get("description"), "units": param_data.get("units"), "distribution": param_data.get("distribution")} ) output_json["conditions"].append(condition_data) return output_json From b6024286d149621f4390d4f0353e2493cc674d8f Mon Sep 17 00:00:00 2001 From: Jaehwan Ryu Date: Tue, 9 Jul 2024 14:37:57 -0400 Subject: [PATCH 06/13] Updated function return type --- gollm/openai/tool_utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gollm/openai/tool_utils.py b/gollm/openai/tool_utils.py index 850b4a0..4f71538 100644 --- a/gollm/openai/tool_utils.py +++ b/gollm/openai/tool_utils.py @@ -26,8 +26,7 @@ def escape_curly_braces(text: str): return text.replace("{", "{{").replace("}", "}}") -# def model_config_chain(research_paper: str, amr: str) -> dict: -def model_config_chain(research_paper: str, amr: str) -> any: +def model_config_chain(research_paper: str, amr: str) -> dict: print("Reading model config from research paper: {}".format(research_paper[:100])) research_paper = remove_references(research_paper) research_paper = normalize_greek_alphabet(research_paper) From 346cf70041528c93243b6ac3a796783972cd40d5 Mon Sep 17 00:00:00 2001 From: Jaehwan Ryu Date: Tue, 9 Jul 2024 14:39:41 -0400 Subject: [PATCH 07/13] Added comment --- gollm/openai/tool_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gollm/openai/tool_utils.py b/gollm/openai/tool_utils.py index 4f71538..4bbfbf7 100644 --- a/gollm/openai/tool_utils.py +++ b/gollm/openai/tool_utils.py @@ -31,6 +31,7 @@ def model_config_chain(research_paper: str, amr: str) -> dict: research_paper = remove_references(research_paper) research_paper = normalize_greek_alphabet(research_paper) + # probonto ontology file copied from https://github.com/gyorilab/mira/blob/e468059089681c7cd457acc51821b5bd1074df04/mira/dkg/resources/probonto.json with open(os.getcwd() + '/gollm/openai/prompts/probonto.json', 'r') as f: pb = json.load(f) From 3460672162f4df3fc1b16402156ae35e300b3d1d Mon Sep 17 00:00:00 2001 From: Jaehwan Ryu Date: Tue, 9 Jul 2024 17:03:04 -0400 Subject: [PATCH 08/13] Updated setup file to include json files --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 0763f90..1126ebf 100644 --- a/setup.py +++ b/setup.py @@ -11,5 +11,6 @@ "regex", "tiktoken", ], + package_data={"gollm": ["*.json"]}, python_requires=">=3.8", ) From 0c1b44fa8a0d458b0592d5c926589aeb76bbdf2b Mon Sep 17 00:00:00 2001 From: Jaehwan Ryu Date: Tue, 9 Jul 2024 17:07:34 -0400 Subject: [PATCH 09/13] Updated setup file to include json files recursivly --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1126ebf..67d3e53 100644 --- a/setup.py +++ b/setup.py @@ -11,6 +11,6 @@ "regex", "tiktoken", ], - package_data={"gollm": ["*.json"]}, + package_data={"gollm": ["**/*.json"]}, python_requires=">=3.8", ) From 02e09a38727a64541c0043f06e3978ea23344b32 Mon Sep 17 00:00:00 2001 From: Jaehwan Ryu Date: Tue, 9 Jul 2024 17:13:18 -0400 Subject: [PATCH 10/13] include package data --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 67d3e53..4fb3cec 100644 --- a/setup.py +++ b/setup.py @@ -12,5 +12,6 @@ "tiktoken", ], package_data={"gollm": ["**/*.json"]}, + include_package_data=True, python_requires=">=3.8", ) From 7c939d56dcf8690462a3955e3a739a5ad5bfe6c4 Mon Sep 17 00:00:00 2001 From: Jaehwan Ryu Date: Tue, 9 Jul 2024 17:27:03 -0400 Subject: [PATCH 11/13] Iclude json files in prompt directory --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4fb3cec..fb97aaf 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ "regex", "tiktoken", ], - package_data={"gollm": ["**/*.json"]}, + package_data={"gollm.openai.prompts": ["*.json"]}, include_package_data=True, python_requires=">=3.8", ) From 4d396c9ff945eef9ac40b8905656bf44663028f9 Mon Sep 17 00:00:00 2001 From: Jaehwan Ryu Date: Tue, 9 Jul 2024 17:41:14 -0400 Subject: [PATCH 12/13] Updated file path --- gollm/openai/tool_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gollm/openai/tool_utils.py b/gollm/openai/tool_utils.py index 4bbfbf7..597db87 100644 --- a/gollm/openai/tool_utils.py +++ b/gollm/openai/tool_utils.py @@ -18,6 +18,7 @@ from gollm.openai.react import OpenAIAgent, AgentExecutor, ReActManager from gollm.openai.toolsets import DatasetConfig +SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) def escape_curly_braces(text: str): """ @@ -32,7 +33,8 @@ def model_config_chain(research_paper: str, amr: str) -> dict: research_paper = normalize_greek_alphabet(research_paper) # probonto ontology file copied from https://github.com/gyorilab/mira/blob/e468059089681c7cd457acc51821b5bd1074df04/mira/dkg/resources/probonto.json - with open(os.getcwd() + '/gollm/openai/prompts/probonto.json', 'r') as f: + json_path = os.path.join(SCRIPT_DIR, 'prompts', 'probonto.json') + with open(json_path, 'r') as f: pb = json.load(f) prompt = PETRINET_PROMPT.format( From ce4a56d78a6e772ddee1c45608ea78ca1892d5aa Mon Sep 17 00:00:00 2001 From: Jaehwan Ryu Date: Tue, 9 Jul 2024 17:46:01 -0400 Subject: [PATCH 13/13] Update indentation --- gollm/openai/tool_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gollm/openai/tool_utils.py b/gollm/openai/tool_utils.py index 597db87..7f49846 100644 --- a/gollm/openai/tool_utils.py +++ b/gollm/openai/tool_utils.py @@ -6,7 +6,7 @@ remove_references, normalize_greek_alphabet, exceeds_tokens, - model_config_adapter, + model_config_adapter, postprocess_oai_json, ) from gollm.openai.prompts.petrinet_config import PETRINET_PROMPT