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. Override LLM Model (if available)

Projects are configured with an LLM model to use by default. You may want to override this for a specific variable because:

  • This variable is very complicated, so you want a more capable or reasoning model.
  • You want to test outputs from a different model.

Override model

  • To require a specific model for this variable, use the dropdown.
  • Models must be set up by a Brim Admin to appear here.
  • This overrides the "Use Advanced model" option below.

Use Advanced Model

Enable this option if you want Brim to use the most advanced model configured 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.


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.