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. 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.


2. 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.


You can see the default template if you want to understand (or copy) it.

Warning: Changing the prompt template can have unexpected impact on your downstream data. This is not recommended unless you have prompt engineering experience.


3. 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).


You can see the default template if you want to understand (or copy) it.

Warning: Changing the aggregation prompt template can have unexpected impact on your downstream data. This is not recommended unless you have prompt engineering experience.


4. Index Type

This describes how Brim decides which snippets of text are relevant.

  • Keyword: Uses a strict interpretation of keywords from the variable name to find snippets.
  • Embedding: Uses a similarity index from the variable name to find snippets.
  • Hybrid: Does a mixture of keyword and embedding.

Hybrid is the correct choice for most variables.


Saving Your Changes

Once you've adjusted these settings, click “Save Variable” to apply changes and return to your variable list.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.