Threshold Cutoff

This module is inspired by our similarity threshold cutoff module. Filters the contents, scores, and ids based on a previous result’s scores.

📣 Keeps at least one item per query if all scores are below the threshold.

Module Parameters

  • threshold : The threshold value to filter out the contents. If the score is below the threshold, the content will be filtered out. This is essential to run the module, so you have to set this parameter.

  • reverse : If True, the lower the score, the better. Default is False.

Example config.yaml

modules:
  - module_type: threshold_cutoff
    threshold: 0.85