@memberjunction/record-set-processor 6.2.0-edge.0 → 6.2.0-edge.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RecordProcessExecutor.d.ts +4 -0
- package/dist/RecordProcessExecutor.d.ts.map +1 -1
- package/dist/RecordProcessExecutor.js +17 -42
- package/dist/RecordProcessExecutor.js.map +1 -1
- package/dist/feature-pipeline-drivers/BaseFeaturePipelineDriver.d.ts +92 -0
- package/dist/feature-pipeline-drivers/BaseFeaturePipelineDriver.d.ts.map +1 -0
- package/dist/feature-pipeline-drivers/BaseFeaturePipelineDriver.js +26 -0
- package/dist/feature-pipeline-drivers/BaseFeaturePipelineDriver.js.map +1 -0
- package/dist/feature-pipeline-drivers/DecisionFeaturePipelineDriver.d.ts +79 -0
- package/dist/feature-pipeline-drivers/DecisionFeaturePipelineDriver.d.ts.map +1 -0
- package/dist/feature-pipeline-drivers/DecisionFeaturePipelineDriver.js +257 -0
- package/dist/feature-pipeline-drivers/DecisionFeaturePipelineDriver.js.map +1 -0
- package/dist/feature-pipeline-drivers/LLMFeaturePipelineDriver.d.ts +23 -0
- package/dist/feature-pipeline-drivers/LLMFeaturePipelineDriver.d.ts.map +1 -0
- package/dist/feature-pipeline-drivers/LLMFeaturePipelineDriver.js +85 -0
- package/dist/feature-pipeline-drivers/LLMFeaturePipelineDriver.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/processors/ActionRecordProcessor.d.ts +6 -0
- package/dist/processors/ActionRecordProcessor.d.ts.map +1 -1
- package/dist/processors/ActionRecordProcessor.js +15 -3
- package/dist/processors/ActionRecordProcessor.js.map +1 -1
- package/dist/processors/AgentRecordProcessor.d.ts +2 -0
- package/dist/processors/AgentRecordProcessor.d.ts.map +1 -1
- package/dist/processors/AgentRecordProcessor.js +5 -1
- package/dist/processors/AgentRecordProcessor.js.map +1 -1
- package/dist/processors/FeaturePipelineEscalation.d.ts +155 -0
- package/dist/processors/FeaturePipelineEscalation.d.ts.map +1 -0
- package/dist/processors/FeaturePipelineEscalation.js +208 -0
- package/dist/processors/FeaturePipelineEscalation.js.map +1 -0
- package/dist/processors/InferProcessor.d.ts +210 -5
- package/dist/processors/InferProcessor.d.ts.map +1 -1
- package/dist/processors/InferProcessor.js +608 -96
- package/dist/processors/InferProcessor.js.map +1 -1
- package/dist/processors/WriteBackProcessor.d.ts +2 -0
- package/dist/processors/WriteBackProcessor.d.ts.map +1 -1
- package/dist/processors/WriteBackProcessor.js +10 -4
- package/dist/processors/WriteBackProcessor.js.map +1 -1
- package/dist/watermark/WatermarkService.d.ts +4 -0
- package/dist/watermark/WatermarkService.d.ts.map +1 -1
- package/dist/watermark/WatermarkService.js +6 -2
- package/dist/watermark/WatermarkService.js.map +1 -1
- package/dist/writeBack.d.ts +11 -1
- package/dist/writeBack.d.ts.map +1 -1
- package/dist/writeBack.js +5 -1
- package/dist/writeBack.js.map +1 -1
- package/package.json +17 -16
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Escalation for Decision Feature Pipelines (§3.6 rule 8, in bulk). A record the decision
|
|
3
|
+
* model answers below the spec's `Escalation.BelowConfidence` floor is re-run through an LLM Feature
|
|
4
|
+
* Pipeline, and that pipeline's answer replaces the decision's.
|
|
5
|
+
*
|
|
6
|
+
* {@link FeaturePipelineEscalator} loads and checks the escalation target once per run, and runs the
|
|
7
|
+
* records that escalate through the target's normal batch path, in the target's own context. Each
|
|
8
|
+
* pipeline caches only its own answers: the target's Dedup Cache holds the LLM answers, and the Decision
|
|
9
|
+
* pipeline's holds only the answers its decision model gave with confidence. `InferProcessor` decides
|
|
10
|
+
* which records escalate, and records their final answers in `MJ: Feature Values`.
|
|
11
|
+
*
|
|
12
|
+
* @module @memberjunction/record-set-processor
|
|
13
|
+
*/
|
|
14
|
+
import type { IMetadataProvider } from '@memberjunction/core';
|
|
15
|
+
import type { MJRecordProcessEntity } from '@memberjunction/core-entities';
|
|
16
|
+
import type { RecordProcessorContext, RecordRef, RecordResult } from '@memberjunction/record-set-processor-base';
|
|
17
|
+
import { type DataFeatureOutput, type DataFeatureSpec } from '@memberjunction/feature-pipelines';
|
|
18
|
+
/** A Decision pipeline's escalation settings (`DataFeatureSpec.Escalation`). */
|
|
19
|
+
export type FeaturePipelineEscalationSettings = NonNullable<DataFeatureSpec['Escalation']>;
|
|
20
|
+
/**
|
|
21
|
+
* The processor an escalated record runs through. It is the escalation target's `InferProcessor`, built
|
|
22
|
+
* from its `MJ: Record Processes` row exactly as `RecordProcessExecutor` builds any Infer pipeline.
|
|
23
|
+
*/
|
|
24
|
+
export interface EscalationTargetProcessor {
|
|
25
|
+
/** The target pipeline's spec. */
|
|
26
|
+
readonly Spec: DataFeatureSpec | undefined;
|
|
27
|
+
/** The `MJ: AI Prompts` ID the target runs. */
|
|
28
|
+
readonly PromptID: string;
|
|
29
|
+
/** The hash that versions the target's output constraints. */
|
|
30
|
+
readonly ConstraintHash: string;
|
|
31
|
+
/** Whether the target writes `MJ: Feature Values` history. Off for an escalation target: the Decision pipeline records the final answer. */
|
|
32
|
+
WritesHistory: boolean;
|
|
33
|
+
/** The target's normal batch path: validation and violation policy apply exactly as when it runs on its own. */
|
|
34
|
+
ProcessBatch(records: RecordRef[], context: RecordProcessorContext): Promise<Map<string, RecordResult>>;
|
|
35
|
+
}
|
|
36
|
+
/** Builds an Infer Feature Pipeline's processor from its `MJ: Record Processes` row. */
|
|
37
|
+
export type EscalationTargetBuilder = (pipeline: MJRecordProcessEntity, provider: IMetadataProvider) => EscalationTargetProcessor;
|
|
38
|
+
/** One output the decision model answered below the floor, or without a confidence. */
|
|
39
|
+
export interface BelowFloorOutput {
|
|
40
|
+
/** The output's name. */
|
|
41
|
+
OutputName: string;
|
|
42
|
+
/** The decision model's confidence; absent when it returned none. */
|
|
43
|
+
Confidence?: number;
|
|
44
|
+
}
|
|
45
|
+
/** A record to escalate, and the outputs that sent it. */
|
|
46
|
+
export interface EscalationRequest {
|
|
47
|
+
/** The record. */
|
|
48
|
+
Record: RecordRef;
|
|
49
|
+
/** The outputs below the floor. Never empty. */
|
|
50
|
+
BelowFloor: BelowFloorOutput[];
|
|
51
|
+
}
|
|
52
|
+
/** An escalated record's answer from the target pipeline, already validated by it. */
|
|
53
|
+
export interface EscalatedAnswer {
|
|
54
|
+
/** The target's validated payload, shaped by the target's output Refs. */
|
|
55
|
+
Payload: unknown;
|
|
56
|
+
/** The target pipeline's outputs, so the payload can be read by output name. */
|
|
57
|
+
TargetOutputs: DataFeatureOutput[];
|
|
58
|
+
/** The `MJ: AI Prompts` ID of the target's prompt. */
|
|
59
|
+
PromptID: string;
|
|
60
|
+
/** The target's `MJ: AI Prompt Runs` row (from its cache, when its answer was cached). */
|
|
61
|
+
AIPromptRunID?: string;
|
|
62
|
+
/** The target's prompt version hash for the answer. */
|
|
63
|
+
PromptVersionHash?: string;
|
|
64
|
+
/** The target's constraint hash. */
|
|
65
|
+
ConstraintHash: string;
|
|
66
|
+
/** The target's own Dedup Cache entry for the answer, when the target caches. */
|
|
67
|
+
FeatureValueCacheID?: string;
|
|
68
|
+
/** For the history row's reasoning: that the record escalated, to which pipeline, and from what confidence. */
|
|
69
|
+
Note: string;
|
|
70
|
+
/** Why the record escalated (`Decision confidence below 0.7 (IsVIP 0.4)`), for a failure message. */
|
|
71
|
+
EscalationReason: string;
|
|
72
|
+
/** The target pipeline's name, for a failure message. */
|
|
73
|
+
PipelineName: string;
|
|
74
|
+
/** The reasoning of the history row that links the superseded decision's prompt run to the process run. */
|
|
75
|
+
SupersededNote: string;
|
|
76
|
+
}
|
|
77
|
+
/** Why an escalation failed. The message carries both reasons: why the record escalated, and why that failed. */
|
|
78
|
+
export interface EscalationFailure {
|
|
79
|
+
/** Both reasons. */
|
|
80
|
+
ErrorMessage: string;
|
|
81
|
+
/** The target's failed `MJ: AI Prompt Runs` row, when there is one. */
|
|
82
|
+
AIPromptRunID?: string;
|
|
83
|
+
}
|
|
84
|
+
/** The outcome of escalating one record. Narrow it with `'ErrorMessage' in outcome`. */
|
|
85
|
+
export type EscalationOutcome = EscalatedAnswer | EscalationFailure;
|
|
86
|
+
/**
|
|
87
|
+
* Escalates a Decision pipeline's borderline records to an LLM Feature Pipeline. One instance serves one
|
|
88
|
+
* processor instance, which is one run, so the target is loaded and checked once per run.
|
|
89
|
+
*/
|
|
90
|
+
export declare class FeaturePipelineEscalator {
|
|
91
|
+
private readonly settings;
|
|
92
|
+
private readonly decisionOutputs;
|
|
93
|
+
private readonly buildTarget;
|
|
94
|
+
/** The target resolution, started on first use and shared by every record that escalates. */
|
|
95
|
+
private targetResolution?;
|
|
96
|
+
/**
|
|
97
|
+
* @param settings - The Decision pipeline's `Escalation` settings.
|
|
98
|
+
* @param decisionOutputs - The Decision pipeline's outputs: each one's confidence is checked, and the target must produce each one.
|
|
99
|
+
* @param buildTarget - Builds the target's processor from its row, as `RecordProcessExecutor` does.
|
|
100
|
+
*/
|
|
101
|
+
constructor(settings: FeaturePipelineEscalationSettings, decisionOutputs: DataFeatureOutput[], buildTarget: EscalationTargetBuilder);
|
|
102
|
+
/** The `MJ: Record Processes` ID of the LLM pipeline records escalate to. */
|
|
103
|
+
get PipelineID(): string;
|
|
104
|
+
/** The confidence floor. */
|
|
105
|
+
get BelowConfidence(): number;
|
|
106
|
+
/**
|
|
107
|
+
* The outputs whose confidence is below the floor, or missing. Any one of them escalates the whole
|
|
108
|
+
* record; an empty list means the decision stands.
|
|
109
|
+
*/
|
|
110
|
+
BelowFloor(confidence: Record<string, number> | undefined): BelowFloorOutput[];
|
|
111
|
+
/**
|
|
112
|
+
* Runs the records through the target together, through its normal batch path. Every request gets an
|
|
113
|
+
* outcome. When the target cannot be loaded or used, every request fails, naming the pipeline and why.
|
|
114
|
+
*/
|
|
115
|
+
Escalate(requests: EscalationRequest[], context: RecordProcessorContext): Promise<Map<string, EscalationOutcome>>;
|
|
116
|
+
/** Why a record escalated, for its failure message. */
|
|
117
|
+
private escalationReason;
|
|
118
|
+
/** Loads and checks the target once per instance; every later call shares the result, success or failure. */
|
|
119
|
+
private resolveTarget;
|
|
120
|
+
/** Runs {@link resolveTarget}, turning a failure into the message each escalating record fails with. */
|
|
121
|
+
private resolveTargetOrError;
|
|
122
|
+
/** Loads the target row, checks it, builds its processor and checks its spec. */
|
|
123
|
+
private loadTarget;
|
|
124
|
+
/** Loads the target's `MJ: Record Processes` row through the run's provider. */
|
|
125
|
+
private loadTargetRow;
|
|
126
|
+
/** Builds the target's processor, naming the pipeline when it cannot be built. */
|
|
127
|
+
private buildTargetProcessor;
|
|
128
|
+
/**
|
|
129
|
+
* Runs the requests' records through the target's batch path, in the target's own context: the run's
|
|
130
|
+
* context with `recordProcessID` set to the target pipeline, so the target's Dedup Cache lookups and
|
|
131
|
+
* writes use its own entries. A thrown error fails each of the records.
|
|
132
|
+
*/
|
|
133
|
+
private runTarget;
|
|
134
|
+
/** Turns the target's result for one record into its outcome. */
|
|
135
|
+
private toOutcome;
|
|
136
|
+
}
|
|
137
|
+
/** The outputs below the floor, for a message: `Seniority 0.42, IsVIP none`. */
|
|
138
|
+
export declare function DescribeBelowFloor(belowFloor: BelowFloorOutput[]): string;
|
|
139
|
+
/**
|
|
140
|
+
* The history note for an escalated record: that it escalated, to which pipeline, and from what
|
|
141
|
+
* confidence. When the target's payload carries its own `reasoning`, it follows the note.
|
|
142
|
+
*/
|
|
143
|
+
export declare function BuildEscalationNote(pipelineName: string, floor: number, belowFloor: BelowFloorOutput[], targetPayload: unknown): string;
|
|
144
|
+
/**
|
|
145
|
+
* Why an escalated record failed: why it escalated (`Decision confidence below 0.7 (IsVIP 0.4)`), and why
|
|
146
|
+
* its escalation to the named LLM pipeline failed.
|
|
147
|
+
*/
|
|
148
|
+
export declare function DescribeEscalationFailure(escalationReason: string, pipelineName: string, reason: string): string;
|
|
149
|
+
/**
|
|
150
|
+
* The reasoning of the history row that records a superseded decision. That row carries the decision
|
|
151
|
+
* model's prompt run and its confidence, with no values, so the process run accounts for both model calls
|
|
152
|
+
* an escalated record made; the escalated answer is the record's value.
|
|
153
|
+
*/
|
|
154
|
+
export declare function BuildSupersededDecisionNote(pipelineName: string, floor: number, belowFloor: BelowFloorOutput[]): string;
|
|
155
|
+
//# sourceMappingURL=FeaturePipelineEscalation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeaturePipelineEscalation.d.ts","sourceRoot":"","sources":["../../src/processors/FeaturePipelineEscalation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACjH,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,eAAe,EAGvB,MAAM,mCAAmC,CAAC;AAE3C,gFAAgF;AAChF,MAAM,MAAM,iCAAiC,GAAG,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;AAE3F;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACtC,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,SAAS,CAAC;IAC3C,+CAA+C;IAC/C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,8DAA8D;IAC9D,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,4IAA4I;IAC5I,aAAa,EAAE,OAAO,CAAC;IACvB,gHAAgH;IAChH,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;CAC3G;AAED,wFAAwF;AACxF,MAAM,M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M,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEhH;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAKvH"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Escalation for Decision Feature Pipelines (§3.6 rule 8, in bulk). A record the decision
|
|
3
|
+
* model answers below the spec's `Escalation.BelowConfidence` floor is re-run through an LLM Feature
|
|
4
|
+
* Pipeline, and that pipeline's answer replaces the decision's.
|
|
5
|
+
*
|
|
6
|
+
* {@link FeaturePipelineEscalator} loads and checks the escalation target once per run, and runs the
|
|
7
|
+
* records that escalate through the target's normal batch path, in the target's own context. Each
|
|
8
|
+
* pipeline caches only its own answers: the target's Dedup Cache holds the LLM answers, and the Decision
|
|
9
|
+
* pipeline's holds only the answers its decision model gave with confidence. `InferProcessor` decides
|
|
10
|
+
* which records escalate, and records their final answers in `MJ: Feature Values`.
|
|
11
|
+
*
|
|
12
|
+
* @module @memberjunction/record-set-processor
|
|
13
|
+
*/
|
|
14
|
+
import { FindEscalationTargetRowProblem, FindEscalationTargetSpecProblem, } from '@memberjunction/feature-pipelines';
|
|
15
|
+
/**
|
|
16
|
+
* Escalates a Decision pipeline's borderline records to an LLM Feature Pipeline. One instance serves one
|
|
17
|
+
* processor instance, which is one run, so the target is loaded and checked once per run.
|
|
18
|
+
*/
|
|
19
|
+
export class FeaturePipelineEscalator {
|
|
20
|
+
/**
|
|
21
|
+
* @param settings - The Decision pipeline's `Escalation` settings.
|
|
22
|
+
* @param decisionOutputs - The Decision pipeline's outputs: each one's confidence is checked, and the target must produce each one.
|
|
23
|
+
* @param buildTarget - Builds the target's processor from its row, as `RecordProcessExecutor` does.
|
|
24
|
+
*/
|
|
25
|
+
constructor(settings, decisionOutputs, buildTarget) {
|
|
26
|
+
this.settings = settings;
|
|
27
|
+
this.decisionOutputs = decisionOutputs;
|
|
28
|
+
this.buildTarget = buildTarget;
|
|
29
|
+
}
|
|
30
|
+
/** The `MJ: Record Processes` ID of the LLM pipeline records escalate to. */
|
|
31
|
+
get PipelineID() {
|
|
32
|
+
return this.settings.PipelineID;
|
|
33
|
+
}
|
|
34
|
+
/** The confidence floor. */
|
|
35
|
+
get BelowConfidence() {
|
|
36
|
+
return this.settings.BelowConfidence;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The outputs whose confidence is below the floor, or missing. Any one of them escalates the whole
|
|
40
|
+
* record; an empty list means the decision stands.
|
|
41
|
+
*/
|
|
42
|
+
BelowFloor(confidence) {
|
|
43
|
+
const below = [];
|
|
44
|
+
for (const output of this.decisionOutputs) {
|
|
45
|
+
const value = confidence?.[output.Name];
|
|
46
|
+
if (typeof value !== 'number' || !Number.isFinite(value)) {
|
|
47
|
+
below.push({ OutputName: output.Name });
|
|
48
|
+
}
|
|
49
|
+
else if (value < this.settings.BelowConfidence) {
|
|
50
|
+
below.push({ OutputName: output.Name, Confidence: value });
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return below;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Runs the records through the target together, through its normal batch path. Every request gets an
|
|
57
|
+
* outcome. When the target cannot be loaded or used, every request fails, naming the pipeline and why.
|
|
58
|
+
*/
|
|
59
|
+
async Escalate(requests, context) {
|
|
60
|
+
const outcomes = new Map();
|
|
61
|
+
if (requests.length === 0) {
|
|
62
|
+
return outcomes;
|
|
63
|
+
}
|
|
64
|
+
const resolution = await this.resolveTargetOrError(context, context.entityID ?? requests[0].Record.EntityID);
|
|
65
|
+
if ('ErrorMessage' in resolution) {
|
|
66
|
+
for (const request of requests) {
|
|
67
|
+
outcomes.set(request.Record.RecordID, { ErrorMessage: `${this.escalationReason(request.BelowFloor)}; ${resolution.ErrorMessage}` });
|
|
68
|
+
}
|
|
69
|
+
return outcomes;
|
|
70
|
+
}
|
|
71
|
+
const results = await this.runTarget(resolution, requests, context);
|
|
72
|
+
for (const request of requests) {
|
|
73
|
+
outcomes.set(request.Record.RecordID, this.toOutcome(request, results.get(request.Record.RecordID), resolution));
|
|
74
|
+
}
|
|
75
|
+
return outcomes;
|
|
76
|
+
}
|
|
77
|
+
/** Why a record escalated, for its failure message. */
|
|
78
|
+
escalationReason(belowFloor) {
|
|
79
|
+
return `Decision confidence below ${this.settings.BelowConfidence} (${DescribeBelowFloor(belowFloor)})`;
|
|
80
|
+
}
|
|
81
|
+
/** Loads and checks the target once per instance; every later call shares the result, success or failure. */
|
|
82
|
+
async resolveTarget(context, entityID) {
|
|
83
|
+
this.targetResolution ??= this.loadTarget(context, entityID);
|
|
84
|
+
return this.targetResolution;
|
|
85
|
+
}
|
|
86
|
+
/** Runs {@link resolveTarget}, turning a failure into the message each escalating record fails with. */
|
|
87
|
+
async resolveTargetOrError(context, entityID) {
|
|
88
|
+
try {
|
|
89
|
+
return await this.resolveTarget(context, entityID);
|
|
90
|
+
}
|
|
91
|
+
catch (e) {
|
|
92
|
+
return { ErrorMessage: e instanceof Error ? e.message : String(e) };
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/** Loads the target row, checks it, builds its processor and checks its spec. */
|
|
96
|
+
async loadTarget(context, entityID) {
|
|
97
|
+
const row = await this.loadTargetRow(context);
|
|
98
|
+
const label = `Escalation pipeline '${row.Name}' (${row.ID})`;
|
|
99
|
+
const rowProblem = FindEscalationTargetRowProblem(row, entityID);
|
|
100
|
+
if (rowProblem) {
|
|
101
|
+
throw new Error(`${label} ${rowProblem}.`);
|
|
102
|
+
}
|
|
103
|
+
const processor = this.buildTargetProcessor(row, context, label);
|
|
104
|
+
const specProblem = FindEscalationTargetSpecProblem(processor.Spec, this.decisionOutputs);
|
|
105
|
+
if (specProblem) {
|
|
106
|
+
throw new Error(`${label} ${specProblem}.`);
|
|
107
|
+
}
|
|
108
|
+
// The Decision pipeline records each escalated record's final answer, so the target records none
|
|
109
|
+
processor.WritesHistory = false;
|
|
110
|
+
return { Processor: processor, ID: row.ID, Name: row.Name };
|
|
111
|
+
}
|
|
112
|
+
/** Loads the target's `MJ: Record Processes` row through the run's provider. */
|
|
113
|
+
async loadTargetRow(context) {
|
|
114
|
+
const pipelineID = this.settings.PipelineID;
|
|
115
|
+
const row = await context.provider.GetEntityObject('MJ: Record Processes', context.contextUser);
|
|
116
|
+
const loaded = await row.Load(pipelineID);
|
|
117
|
+
if (!loaded) {
|
|
118
|
+
throw new Error(`Escalation pipeline '${pipelineID}' was not found in MJ: Record Processes.`);
|
|
119
|
+
}
|
|
120
|
+
return row;
|
|
121
|
+
}
|
|
122
|
+
/** Builds the target's processor, naming the pipeline when it cannot be built. */
|
|
123
|
+
buildTargetProcessor(row, context, label) {
|
|
124
|
+
try {
|
|
125
|
+
return this.buildTarget(row, context.provider);
|
|
126
|
+
}
|
|
127
|
+
catch (e) {
|
|
128
|
+
throw new Error(`${label} could not be built: ${e instanceof Error ? e.message : String(e)}`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Runs the requests' records through the target's batch path, in the target's own context: the run's
|
|
133
|
+
* context with `recordProcessID` set to the target pipeline, so the target's Dedup Cache lookups and
|
|
134
|
+
* writes use its own entries. A thrown error fails each of the records.
|
|
135
|
+
*/
|
|
136
|
+
async runTarget(target, requests, context) {
|
|
137
|
+
const targetContext = { ...context, recordProcessID: target.ID };
|
|
138
|
+
try {
|
|
139
|
+
return await target.Processor.ProcessBatch(requests.map((r) => r.Record), targetContext);
|
|
140
|
+
}
|
|
141
|
+
catch (e) {
|
|
142
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
143
|
+
return new Map(requests.map((r) => [r.Record.RecordID, { Status: 'Failed', ErrorMessage: message }]));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/** Turns the target's result for one record into its outcome. */
|
|
147
|
+
toOutcome(request, result, target) {
|
|
148
|
+
if (!result || result.Status !== 'Succeeded') {
|
|
149
|
+
return {
|
|
150
|
+
ErrorMessage: DescribeEscalationFailure(this.escalationReason(request.BelowFloor), target.Name, result?.ErrorMessage ?? 'it returned no result'),
|
|
151
|
+
AIPromptRunID: result?.AIPromptRunID,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
return {
|
|
155
|
+
Payload: result.ResultPayload,
|
|
156
|
+
TargetOutputs: target.Processor.Spec?.Outputs ?? [],
|
|
157
|
+
PromptID: target.Processor.PromptID,
|
|
158
|
+
AIPromptRunID: result.AIPromptRunID,
|
|
159
|
+
PromptVersionHash: result.PromptVersionHash,
|
|
160
|
+
ConstraintHash: target.Processor.ConstraintHash,
|
|
161
|
+
FeatureValueCacheID: result.FeatureValueCacheID,
|
|
162
|
+
Note: BuildEscalationNote(target.Name, this.settings.BelowConfidence, request.BelowFloor, result.ResultPayload),
|
|
163
|
+
EscalationReason: this.escalationReason(request.BelowFloor),
|
|
164
|
+
PipelineName: target.Name,
|
|
165
|
+
SupersededNote: BuildSupersededDecisionNote(target.Name, this.settings.BelowConfidence, request.BelowFloor),
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/** The outputs below the floor, for a message: `Seniority 0.42, IsVIP none`. */
|
|
170
|
+
export function DescribeBelowFloor(belowFloor) {
|
|
171
|
+
return belowFloor
|
|
172
|
+
.map((b) => `${b.OutputName} ${b.Confidence === undefined ? 'none' : Number(b.Confidence.toFixed(4))}`)
|
|
173
|
+
.join(', ');
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* The history note for an escalated record: that it escalated, to which pipeline, and from what
|
|
177
|
+
* confidence. When the target's payload carries its own `reasoning`, it follows the note.
|
|
178
|
+
*/
|
|
179
|
+
export function BuildEscalationNote(pipelineName, floor, belowFloor, targetPayload) {
|
|
180
|
+
const note = `Escalated to LLM pipeline '${pipelineName}': decision confidence below ${floor} (${DescribeBelowFloor(belowFloor)}).`;
|
|
181
|
+
const reasoning = readReasoning(targetPayload);
|
|
182
|
+
return reasoning ? `${note}\n\n${reasoning}` : note;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Why an escalated record failed: why it escalated (`Decision confidence below 0.7 (IsVIP 0.4)`), and why
|
|
186
|
+
* its escalation to the named LLM pipeline failed.
|
|
187
|
+
*/
|
|
188
|
+
export function DescribeEscalationFailure(escalationReason, pipelineName, reason) {
|
|
189
|
+
return `${escalationReason}; escalation to LLM pipeline '${pipelineName}' failed: ${reason}`;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* The reasoning of the history row that records a superseded decision. That row carries the decision
|
|
193
|
+
* model's prompt run and its confidence, with no values, so the process run accounts for both model calls
|
|
194
|
+
* an escalated record made; the escalated answer is the record's value.
|
|
195
|
+
*/
|
|
196
|
+
export function BuildSupersededDecisionNote(pipelineName, floor, belowFloor) {
|
|
197
|
+
return (`Superseded: decision confidence below ${floor} (${DescribeBelowFloor(belowFloor)}), so the record escalated to ` +
|
|
198
|
+
`LLM pipeline '${pipelineName}', whose answer is the record's value. This row records the decision model's prompt run.`);
|
|
199
|
+
}
|
|
200
|
+
/** The `reasoning` a payload carries, when it is a non-empty string. */
|
|
201
|
+
function readReasoning(payload) {
|
|
202
|
+
if (typeof payload !== 'object' || payload === null || !('reasoning' in payload)) {
|
|
203
|
+
return undefined;
|
|
204
|
+
}
|
|
205
|
+
const reasoning = payload.reasoning;
|
|
206
|
+
return typeof reasoning === 'string' && reasoning.trim().length > 0 ? reasoning : undefined;
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=FeaturePipelineEscalation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeaturePipelineEscalation.js","sourceRoot":"","sources":["../../src/processors/FeaturePipelineEscalation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,EAGH,8BAA8B,EAC9B,+BAA+B,GAClC,MAAM,mCAAmC,CAAC;AAqF3C;;;GAGG;AACH,M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