# KnowledgeBaseOrchestrationConfigurationProperty

Configures how the knowledge base orchestrates the retrieval and generation process, allowing for customization of prompts, inference parameters, and performance settings.

- Source: Generated at build time
- Type last changed: v2.201.0 · 13 Jun 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrock as bedrock } from 'aws-cdk-lib';

declare const additionalModelRequestFields: any;
const knowledgeBaseOrchestrationConfigurationProperty: bedrock.CfnFlowVersion.KnowledgeBaseOrchestrationConfigurationProperty = {
  additionalModelRequestFields: additionalModelRequestFields,
  inferenceConfig: {
    text: {
      maxTokens: 123,
      stopSequences: ['stopSequences'],
      temperature: 123,
      topP: 123,
    },
  },
  performanceConfig: {
    latency: 'latency',
  },
  promptTemplate: {
    textPromptTemplate: 'textPromptTemplate',
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

# additional_model_request_fields: Any

knowledge_base_orchestration_configuration_property = bedrock.CfnFlowVersion.KnowledgeBaseOrchestrationConfigurationProperty(
    additional_model_request_fields=additional_model_request_fields,
    inference_config=bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty(
        text=bedrock.CfnFlowVersion.PromptModelInferenceConfigurationProperty(
            max_tokens=123,
            stop_sequences=["stopSequences"],
            temperature=123,
            top_p=123
        )
    ),
    performance_config=bedrock.CfnFlowVersion.PerformanceConfigurationProperty(
        latency="latency"
    ),
    prompt_template=bedrock.CfnFlowVersion.KnowledgeBasePromptTemplateProperty(
        text_prompt_template="textPromptTemplate"
    )
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.*;

Object additionalModelRequestFields;

KnowledgeBaseOrchestrationConfigurationProperty knowledgeBaseOrchestrationConfigurationProperty = KnowledgeBaseOrchestrationConfigurationProperty.builder()
        .additionalModelRequestFields(additionalModelRequestFields)
        .inferenceConfig(PromptInferenceConfigurationProperty.builder()
                .text(PromptModelInferenceConfigurationProperty.builder()
                        .maxTokens(123)
                        .stopSequences(List.of("stopSequences"))
                        .temperature(123)
                        .topP(123)
                        .build())
                .build())
        .performanceConfig(PerformanceConfigurationProperty.builder()
                .latency("latency")
                .build())
        .promptTemplate(KnowledgeBasePromptTemplateProperty.builder()
                .textPromptTemplate("textPromptTemplate")
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock;

var additionalModelRequestFields;

var knowledgeBaseOrchestrationConfigurationProperty = new KnowledgeBaseOrchestrationConfigurationProperty {
    AdditionalModelRequestFields = additionalModelRequestFields,
    InferenceConfig = new PromptInferenceConfigurationProperty {
        Text = new PromptModelInferenceConfigurationProperty {
            MaxTokens = 123,
            StopSequences = new [] { "stopSequences" },
            Temperature = 123,
            TopP = 123
        }
    },
    PerformanceConfig = new PerformanceConfigurationProperty {
        Latency = "latency"
    },
    PromptTemplate = new KnowledgeBasePromptTemplateProperty {
        TextPromptTemplate = "textPromptTemplate"
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var additionalModelRequestFields interface{}

knowledgeBaseOrchestrationConfigurationProperty := &KnowledgeBaseOrchestrationConfigurationProperty{
	AdditionalModelRequestFields: additionalModelRequestFields,
	InferenceConfig: &PromptInferenceConfigurationProperty{
		Text: &PromptModelInferenceConfigurationProperty{
			MaxTokens: jsii.Number(123),
			StopSequences: []*string{
				jsii.String("stopSequences"),
			},
			Temperature: jsii.Number(123),
			TopP: jsii.Number(123),
		},
	},
	PerformanceConfig: &PerformanceConfigurationProperty{
		Latency: jsii.String("latency"),
	},
	PromptTemplate: &KnowledgeBasePromptTemplateProperty{
		TextPromptTemplate: jsii.String("textPromptTemplate"),
	},
}
```

## Properties

- `additionalModelRequestFields`: any — The additional model-specific request parameters as key-value pairs to be included in the request to the foundation model.

- `inferenceConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFlowVersion.PromptInferenceConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty.html) — Contains inference configurations for the prompt.

- `performanceConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFlowVersion.PerformanceConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnFlowVersion.PerformanceConfigurationProperty.html) — The performance configuration options for the knowledge base retrieval and generation process.

- `promptTemplate`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFlowVersion.KnowledgeBasePromptTemplateProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnFlowVersion.KnowledgeBasePromptTemplateProperty.html) — A custom prompt template for orchestrating the retrieval and generation process.
