Called after the prompt succeeds; returns the raw result (InferProcessor.afterPromptExecute).
Called before the prompt's context is built (InferProcessor.beforeBuildContext).
Called immediately before the prompt runs (InferProcessor.beforePromptExecute).
Builds the data object passed to the prompt (InferProcessor.buildPromptData).
The record's data for the prompt's user turn, or null for none (InferProcessor.BuildUserMessage).
How a driver calls back into
InferProcessor's overridable steps, so that a processor extension registered underDataFeatureSpec.ProcessorExtensionKeykeeps working whichever driver runs.InferProcessorbuilds this from closures over its own protected hooks.The contract for drivers. Every driver must call
BeforeBuildContextand thenBuildPromptDataonce per record, before computing anything, so that an extension's context shaping applies to every pipeline type.BeforePromptExecuteandAfterPromptExecuteare LLM-shaped: they take the chat prompt'sAIPromptParamsandAIPromptRunResult. A driver that runs anAIPromptRunnerchat prompt must call both. A driver that doesn't (a Decision model, for example) doesn't call them. An extension that overridesbeforePromptExecuteorafterPromptExecutetherefore stops firing once its pipeline switches to such a type, and should move that logic intobuildPromptDataor into the driver.