Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:FlowiseAI Flowise EvaluatorConstant

From Leeroopedia
Knowledge Sources
Domains Evaluations, Configuration
Last Updated 2026-02-12 07:00 GMT

Overview

evaluatorConstant is a JavaScript module that exports three constant arrays defining the available evaluator definitions, evaluator type categories, and numeric comparison operators used throughout the evaluation system.

Description

This module provides the static configuration data that drives the evaluator selection UI. The evaluators array defines 15 individual evaluator items across text, JSON, and numeric types, each with a type, name, label, and description. The evaluatorTypes array categorizes evaluators into four groups: text-based result evaluation, JSON response evaluation, numeric metrics evaluation, and LLM-based grading. The numericOperators array defines six comparison operators (equals, not equals, greater than, less than, and their inclusive variants) used for numeric evaluator thresholds.

Usage

Import these constants wherever evaluator configuration dropdowns, type selectors, or numeric operator pickers are needed. They serve as the single source of truth for available evaluator options in the Flowise evaluation UI.

Code Reference

Source Location

Signature

export const evaluators = [ ... ]       // 15 evaluator definitions
export const evaluatorTypes = [ ... ]   // 4 evaluator type categories
export const numericOperators = [ ... ] // 6 numeric comparison operators

Import

import { evaluators, evaluatorTypes, numericOperators } from '@/views/evaluators/evaluatorConstant'

I/O Contract

Inputs

Name Type Required Description
N/A N/A N/A This module has no inputs; it exports static constant data

Outputs

Name Type Description
evaluators Array<{type, name, label, description}> Array of 15 evaluator definitions with types: text (ContainsAny, ContainsAll, DoesNotContainAny, DoesNotContainAll, StartsWith, NotStartsWith), json (IsValidJSON, IsNotValidJSON), and numeric (totalTokens, promptTokens, completionTokens, apiLatency, llm, chain, responseLength)
evaluatorTypes Array<{label, name, description}> Array of 4 evaluator categories: text, json, numeric, and llm
numericOperators Array<{label, name}> Array of 6 comparison operators: equals, notEquals, greaterThan, lessThan, greaterThanOrEquals, lessThanOrEquals

Usage Examples

Basic Usage

import { evaluators, evaluatorTypes, numericOperators } from '@/views/evaluators/evaluatorConstant'

// Filter evaluators by type
const textEvaluators = evaluators.filter(e => e.type === 'text')

// Display evaluator types in a dropdown
evaluatorTypes.map(type => (
    <option key={type.name} value={type.name}>{type.label}</option>
))

// Use numeric operators for threshold comparison
const selectedOperator = numericOperators.find(op => op.name === 'greaterThan')

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment