Skip to content

Expose NumberInRange operator in workflow builder UI#2229

Open
patricknihranz wants to merge 2 commits intomainfrom
pn/expose-number-in-range-operator
Open

Expose NumberInRange operator in workflow builder UI#2229
patricknihranz wants to merge 2 commits intomainfrom
pn/expose-number-in-range-operator

Conversation

@patricknihranz
Copy link
Copy Markdown
Contributor

Summary

  • The (Number) in range operator was already implemented in the evaluation engine (BINARY_OPERATORS dict) and included in the BinaryStatement comparator union, but was missing from the prepare_operators_descriptions() introspection export
  • Adds NumberInRange to the import and operator_types list in introspection/core.py so the operator appears in the /workflows/blocks/describe endpoint and workflow builder UI
  • Enables confidence range filtering (e.g., 25%-45%) in Detections Filter and Continue If blocks

Test plan

  • Verify (Number) in range appears in the operator descriptions returned by /workflows/blocks/describe
  • Create a workflow with a Detections Filter using (Number) in range comparator with a [min, max] right operand
  • Confirm detections are filtered to only those within the specified confidence range

🤖 Generated with Claude Code

The (Number) in range operator was already implemented in the evaluation
engine and BinaryStatement union but was not included in the introspection
export, making it invisible to the workflow builder UI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@patricknihranz patricknihranz force-pushed the pn/expose-number-in-range-operator branch from 7a4516d to 3ace1e7 Compare April 15, 2026 01:44
@rafel-roboflow
Copy link
Copy Markdown
Contributor

Hello Patrick, is it possible you forgot to add/ commit some files?

I don't see NumberInRange in inference/core/workflows/core_steps/common/query_language/introspection/core.py

Adds the NumberInRange BinaryOperator class and its evaluation lambda so
the operator exposed in the workflow builder UI has a working backend.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants