Loading
About Salesforce Data 360
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Retriever Filters Reference

          Retriever Filters Reference

          Configure filter conditions for retrieval accuracy when you create or test retrievers in AI Models (formerly Einstein Studio). Use filter conditions to filter records retrieved for search queries. You can configure up to ten filter conditions for an individual retriever.

          Supported Operators in Filter Conditions

          Operator Example [Field]{Operator}[Value]
          Equal To Make Equal To Honda
          Not Equal To Trim Not Equal To High-End
          Greater Than ModelYear Greater Than 2000
          Less Than ModelYear Less Than 2025
          Like ModelName Like Civic
          Note
          Note

          When you define filter conditions for retrievers with the Like operator, don’t add a trailing % to match values. A trailing % is appended internally to match values. In other applications like Prompt Builder or Flow Builder, you have to append a trailing% to include partial matches. For example, a retriever with a dynamic filter condition that uses the Like operator requires the trailing % in a prompt template.

          Review these guidelines for supported datatypes.

          • Text: Maximum 255 character and 254 characters with the Like operator.
          • Boolean: Supports True or False values.
          • Number: Maximum 255 Characters and 254 with the Like operator.
          • Date: Enter date in the format, Dec 31, 2024.

          Field values can't include single quotes.

          Filter Condition Logic

          Combine filter conditions with conditional logic to filter records retrieved.

          Use Filter When Conditional Logic Example
          All Conditions Are Met AND ModelType Equal To Sedan AND ModelYear Greater Than 2000
          Any Condition Is Met OR ModelType Equal To Sedan OR ModelType Equal To Hatchback
          Custom Condition Is Met

          The condition is built from the numbered filter conditions by using a custom logic.

          Custom conditions include all filter conditions defined with a valid format. For example, when there are 3 filter conditions, a valid format can be 1 AND (2 OR 3) or (1 OR 2) AND (NOT 3).

          ModelName Equal To Civic AND (ModelType Equal To Sedan OR ModelType Equal To Hatchback)

          (Model Equal To Civic OR Model Equal To Odyssey) AND (NOT Trim Equal To A-Spec)

          Dynamic Filter Conditions

          Dynamic filter conditions accept values at run time. Configure up to ten dynamic filter conditions and provide values at run time when you test a retriever in the retriever playground or in prompt templates.

          You can enter a placeholder value, or AI Models includes a variable by default. For example, Itemname Equal To {!$ItemName}. Review these guidelines for valid placeholder values.

          • Contain only alphanumeric characters and non-consecutive underscores
          • Begin with a letter
          • Don't include spaces
          • Don't end with an underscore
          • Have a maximum character length of 40
          • Are unique across all pre-filter fields
           
          Loading
          Salesforce Help | Article