Advanced Settings for Brim Variables
Brim gives you precise control over how variables behave in your project. When you are creating or editing a variable, you can click the “Show Advanced Settings” to find additional options that affect generation behavior, LLM usage, aggregation configuration, and document-level constraints. Here’s how to use each setting.
1. Instrument
Choose which instrument the variable belongs to. Instruments are useful for organizing related variables into logical groups (e.g., Demographics, Labs). To assign, either
- Select from the dropdown to add the variable to an existing instrument. The variable will start at the end of the selected instrument.
- Select "Create New Instrument...", and type in the name of the Instrument you'd like to create.
Variables in the same instrument are shown together in project views and can be ordered relative to one another.
2. Include Variable in Generation
Check this box to enable Brim to generate values for this variable. If this is unchecked, the variable is stored but won’t be populated through document processing. This defaults to checked.
Enable for: Most variables, most of the time.
Disable if: This is a derived or helper field you plan to populate manually
3. Use Advanced LLM Model (if available)
Enable this option if you want Brim to use its most advanced model for generating the value of this variable. This can improve accuracy for complex fields but may increase generation time or cost. This defaults to unchecked.
Enable for: nuanced or sensitive variables that require deeper language understanding
Disable for: most variables, most of the time.
ℹ️ Note: If disabled, Brim uses its default model, which is faster and cheaper. Contact your system admin for more information about model costs at your organization.
4. Only Use True Value in Aggregation
When this is checked, Brim will only consider values labeled as “True” (affirmative) when aggregating across documents. This is useful for boolean-style variables like "History of Smoking."
Enable for: binary variables where "True" carries meaning, and "False" should be excluded from the aggregate output.
5. Aggregation Option Definitions
Define a set of possible answer options when aggregating this variable, and the meaning of each.
Example:
her2-positive: IHC score of 3+. her2-negative: IHC score of 0 or 1 her2-low: IHC score of 1+ or 2+ with a negative FISH test equivocal: IHC test result is unclear
Brim will choose from your options. Clear definitions help Brim consistently score and reason about variable outputs.
6. Prompt Template
Customize the format used to generate instances of your variable. Brim will use this template to guide the LLM to output structured JSON with the abstracted value, raw source text, and confidence level.
Warning: Changing the prompt template can have unexpected impact on your downstream data. This is not recommended unless you have prompt engineering experience.
7. Aggregation Prompt Template
This prompt is used when Brim needs to combine multiple instances into a single aggregated value (for one per patient and one per note variables).
Warning: Changing the aggregation prompt template can have unexpected impact on your downstream data. This is not recommended unless you have prompt engineering experience.
8. Restrict Variable to Specific Documents
You can specify a list of document types to be evaluated when computing this variable. One type per line.
Leave this empty to include all document types (also the default state).
Example:
Progress Report Pathology Report
Note: This uses the "Note Title" field from the data import to Brim. Documents with that do not have their correct name in the Note Title cannot correctly use this functionality.
9. Document Start Date / End Date
Use these fields to restrict abstraction to a specific date range of documents. Brim will ignore documents outside this window when generating the variable value.
You can use document start date, document end date, or both.
Format dates as "YYYY-MM-DD"
Saving Your Changes
Once you've adjusted these settings, click “Save Variable” to apply changes and return to your variable list.