Sematic Control Filter
The semantic control filter is a method to filter the controls based on the semantic similarity between the agent's plan and the control's text using their embeddings.
Configuration
To activate the semantic control filtering, you need to add SEMANTIC
to the CONTROL_FILTER
list in the config_dev.yaml
file. Below is the detailed sematic control filter configuration in the config_dev.yaml
file:
CONTROL_FILTER
: A list of filtering methods that you want to apply to the controls. To activate the semantic control filtering, addSEMANTIC
to the list.CONTROL_FILTER_TOP_K_SEMANTIC
: The number of controls to keep after filtering.CONTROL_FILTER_MODEL_SEMANTIC_NAME
: The control filter model name for semantic similarity. By default, it is set to "all-MiniLM-L6-v2".
Reference
Bases: BasicControlFilter
A class that represents a semantic model for control filtering.
control_filter(control_dicts, plans, top_k)
Filters control items based on their similarity to a set of keywords.
Parameters: |
|
---|
Returns: |
|
---|
Source code in automator/ui_control/control_filter.py
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
|
control_filter_score(control_text, plans)
Calculates the score for a control item based on the similarity between its text and a set of keywords.
Parameters: |
|
---|
Returns: |
|
---|
Source code in automator/ui_control/control_filter.py
197 198 199 200 201 202 203 204 205 206 207 |
|