> **Experimental**
>
> `@aws-cdk/aws-bedrock-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# PromptPreProcessingConfigCustomParser

Configuration for the pre-processing step.

Extends: PromptPreProcessingConfigCustomParser
Extends: PromptStepConfigBase

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`bedrock/agents/prompt-override.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-bedrock-alpha/bedrock/agents/prompt-override.ts#L149)

## Example

```ts
const parserFunction = new lambda.Function(this, 'ParserFunction', {
  runtime: lambda.Runtime.PYTHON_3_10,
  handler: 'index.handler',
  code: lambda.Code.fromAsset('lambda'),
});

const agent = new bedrock.Agent(this, 'Agent', {
  foundationModel: bedrock.BedrockFoundationModel.AMAZON_NOVA_LITE_V1,
  instruction: 'You are a helpful assistant.',
  promptOverrideConfiguration: bedrock.PromptOverrideConfiguration.withCustomParser({
    parser: parserFunction,
    preProcessingStep: {
      stepType: bedrock.AgentStepType.PRE_PROCESSING,
      useCustomParser: true
    }
  })
});
```

## Properties

- `customPromptTemplate`: string — The custom prompt template to be used.

  **Default:** The default prompt template will be used.

- `inferenceConfig`: [InferenceConfiguration](/cdk/api/v2/docs/@aws-cdk_aws-bedrock-alpha.InferenceConfiguration.html) — The inference configuration parameters to use.

  **Default:** undefined - Default inference configuration will be used

- `stepEnabled`: boolean — Whether to enable or skip this step in the agent sequence.

  **Default:** The default state for each step type is as follows. PRE_PROCESSING – ENABLED ORCHESTRATION – ENABLED KNOWLEDGE_BASE_RESPONSE_GENERATION – ENABLED POST_PROCESSING – DISABLED

- `stepType`: [AgentStepType](/cdk/api/v2/docs/@aws-cdk_aws-bedrock-alpha.AgentStepType.html) (required) — The type of step this configuration applies to.

- `useCustomParser`: boolean = false — Whether to use the custom Lambda parser defined for the sequence.
