Layered Reasoning with Dependent Variables
Brim enables layered reasoning through a concept called Dependent Variables.
Dependent variables can make decisions based on the values of multiple variables or dependent variables.
Fields
Name.
This name should be descriptive.
Variable type.
This describes the type of data the system should return. The options are:
- Text. No restrictions on format.
- Boolean. The value must be True or False.
- Integer. The value must be a whole integer or number.
- Float. The value is a number that could be whole or fractional.
- Timestamp. The value is a date and time.
Instructions.
This is the most important part of the dependent variable definition. It tells the AI what it means to correctly label the variable. A good instruction includes:
- A clear definition of the variable.
- Semantics necessary to guide how to abstract values
- Temporal considerations. Is this historical? Current?
- One or more examples.
You can reference other variables or dependent variables in the instruction by using an open curly bracket (" { ") and selecting the variable or dependent variable you want to reference from the list.
This will allow the LLM to understand exactly how to use the input variables you specify. Learn more about referencing variables. If you add a variable or dependent variable in this way, Brim will add it to the inputs when you save the Dependent Variable.
Variables/Dependent Variables
- A list of variables and dependent variables that the dependent variable should use as input to its decision.
Option definitions.
If your variable has a limited set of options (for example, "Stage I", "Stage II", and "Stage III"), define them here. Don't forget to include options for unknown or not found.
Default value for empty response.
Dependent variables return one value per patient. The default value for empty response determines what the LLM should respond for a patience when it finds no relevant evidence. This defaults to "None", but could be "False", "No evidence", or another value depending on your application.
Optional/Advanced Fields
Include decision in generation
If false, this dependent variable will be skipped during generation
Prompt template
This allows you to edit the prompt template for a dependent variable. We recommend using the default prompt, which contains best practices for abstracting variables. If your prompt gets out of sync with the default, you can click "see default template", and "Use Default Prompt" to restore to the prompt.
Reference today's date.
If your variable needs to know today's date to be computed correctly, check this box.
Enable for: Variables that need today's date specifically
Disable for: Most variables.
Use Advanced LLM Model (if available)
If you want Brim to use the advanced LLM model.
More about Dependent Variables
You can create dependent variables directly in Brim, add from the Brim Variable Library, or import dependent variables via a CSV.
Brim can automatically create a dependent variable and the required input variables. This is handy for setting up complex logic like clinical trials.
