Member Junction
    Preparing search index...

    Runs an AI Prompt per record and returns its structured output (write-back is the wrapper's job). A pipeline whose spec sets Escalation computes a whole batch before recording any of it, so its batch path does not call ProcessRecord once per record: an extension that overrides ProcessRecord does not see those records.

    Implements

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    • Parameters

      • promptID: string

        The MJ: AI Prompts ID to run for each record.

      • inputMapping: Record<string, string>

        Mapping shaping the data passed to the prompt; undefined for the default ({ record }).

      • spec: DataFeatureSpec

        The DataFeatureSpec defining outputs, constraints, and caching policy; undefined when there is none.

      • outputMappingText: string

        The Record Process's OutputMapping text, part of the spec hash (null when it has none).

      Returns InferProcessor

    Properties

    DefaultDryRunSampleSize: 25

    Default dry-run sample cap for Infer pipelines over a stored scope (every previewed record calls the model).

    FailRunOnRecordError: true

    An Infer run that completed with one or more failed records ends with status Failed.

    inputMapping: Record<string, string>

    Mapping shaping the data passed to the prompt; undefined for the default ({ record }).

    outputMappingText: string

    The Record Process's OutputMapping text, part of the spec hash (null when it has none).

    PipelineVersion: number = null

    The pipeline version this run computes under (part of the Feature Value key); null until resolved.

    promptID: string

    The MJ: AI Prompts ID to run for each record.

    The DataFeatureSpec defining outputs, constraints, and caching policy; undefined when there is none.

    WritesHistory: boolean = true

    Whether this processor writes its records' MJ: Feature Values (off on a Decision pipeline's escalation target).

    BELOW_CONFIDENCE_KEY: "_belowConfidence" = '_belowConfidence'

    The reserved payload key listing the outputs withheld below their confidence floor (cached with the outputs).

    DRIVER_CONFIDENCE_KEY: "_confidence" = '_confidence'

    The reserved payload key holding the driver's own per-output confidences (cached with the outputs).

    RESERVED_PAYLOAD_KEYS: readonly string[] = ...

    The payload keys this processor reserves; they ride in the cached and result payloads.

    Accessors

    • get EscalatedRecordCount(): number

      How many records this processor has escalated to its spec's Escalation pipeline. A processor serves one run, so this is the run's count. It counts every record whose answer was escalated, including the records that shared a Dedup Cache key with one, and the escalations that failed.

      Returns number

    Methods

    • Layer 2 output validation hook. Evaluates outputs against declared constraints, applies OnViolation policies (fail, null, coerce-to-other), and builds the processed payload. replacedOutputs names the outputs whose value a null or coerce-to-other policy replaced.

      Parameters

      Returns Promise<
          {
              errorMessage?: string;
              payload?: unknown;
              replacedOutputs?: string[];
              valid: boolean;
          },
      >

    • The TSType a constraint implies for an output with no write target (no column to take one from): 'number' for numeric and money, 'boolean' for boolean, 'Date' for date; undefined for the others.

      Parameters

      • constraintType: "boolean" | "enum" | "lookup" | "numeric" | "money" | "date" | "freetext"

      Returns string

    • Builds the processor for an Infer Feature Pipeline from its MJ: Record Processes row: parses and validates the DataFeatureSpec in Configuration (and its materialization targets), and creates the spec's ProcessorExtensionKey subclass when it names one. RecordProcessExecutor builds every Infer pipeline this way, and so does a Decision pipeline's escalation to an LLM pipeline.

      Parameters

      • rp: MJRecordProcessEntity

        The pipeline's row (WorkType Infer).

      • Optionalprovider: IMetadataProvider

        The provider whose metadata the materialization targets are checked against (default: the global one).

      Returns InferProcessor

      Error when the row has no PromptID, its Configuration is not valid JSON, its spec or materialization targets are invalid, or its ProcessorExtensionKey is not registered.