Interface CfnFlowPropsMixin.KnowledgeBaseFlowNodeConfigurationProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnFlowPropsMixin.KnowledgeBaseFlowNodeConfigurationProperty.Jsii$Proxy
- Enclosing class:
CfnFlowPropsMixin
This node takes a query as the input and returns, as the output, the retrieved responses directly (as an array) or a response generated based on the retrieved responses. For more information, see Node types in a flow in the Amazon Bedrock User Guide.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cfnpropertymixins.services.bedrock.*;
Object additionalModelRequestFields;
KnowledgeBaseFlowNodeConfigurationProperty knowledgeBaseFlowNodeConfigurationProperty = KnowledgeBaseFlowNodeConfigurationProperty.builder()
.guardrailConfiguration(GuardrailConfigurationProperty.builder()
.guardrailIdentifier("guardrailIdentifier")
.guardrailVersion("guardrailVersion")
.build())
.inferenceConfiguration(PromptInferenceConfigurationProperty.builder()
.text(PromptModelInferenceConfigurationProperty.builder()
.maxTokens(123)
.stopSequences(List.of("stopSequences"))
.temperature(123)
.topP(123)
.build())
.build())
.knowledgeBaseId("knowledgeBaseId")
.modelId("modelId")
.numberOfResults(123)
.orchestrationConfiguration(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())
.promptTemplate(KnowledgeBasePromptTemplateProperty.builder()
.textPromptTemplate("textPromptTemplate")
.build())
.rerankingConfiguration(VectorSearchRerankingConfigurationProperty.builder()
.bedrockRerankingConfiguration(VectorSearchBedrockRerankingConfigurationProperty.builder()
.metadataConfiguration(MetadataConfigurationForRerankingProperty.builder()
.selectionMode("selectionMode")
.selectiveModeConfiguration(RerankingMetadataSelectiveModeConfigurationProperty.builder()
.fieldsToExclude(List.of(FieldForRerankingProperty.builder()
.fieldName("fieldName")
.build()))
.fieldsToInclude(List.of(FieldForRerankingProperty.builder()
.fieldName("fieldName")
.build()))
.build())
.build())
.modelConfiguration(VectorSearchBedrockRerankingModelConfigurationProperty.builder()
.additionalModelRequestFields(additionalModelRequestFields)
.modelArn("modelArn")
.build())
.numberOfRerankedResults(123)
.build())
.type("type")
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final classAn implementation forCfnFlowPropsMixin.KnowledgeBaseFlowNodeConfigurationProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default ObjectContains configurations for a guardrail to apply during query and response generation for the knowledge base in this configuration.default ObjectContains inference configurations for the prompt.default StringThe unique identifier of the knowledge base to query.default StringThe unique identifier of the model or inference profile to use to generate a response from the query results.default NumberThe number of results to retrieve from the knowledge base.default ObjectThe configuration for orchestrating the retrieval and generation process in the knowledge base node.default ObjectA custom prompt template to use with the knowledge base for generating responses.default ObjectThe configuration for reranking the retrieved results from the knowledge base to improve relevance.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getGuardrailConfiguration
Contains configurations for a guardrail to apply during query and response generation for the knowledge base in this configuration.Returns union: either
IResolvableorCfnFlowPropsMixin.GuardrailConfigurationProperty- See Also:
-
getInferenceConfiguration
Contains inference configurations for the prompt.Returns union: either
IResolvableorCfnFlowPropsMixin.PromptInferenceConfigurationProperty- See Also:
-
getKnowledgeBaseId
The unique identifier of the knowledge base to query.- See Also:
-
getModelId
The unique identifier of the model or inference profile to use to generate a response from the query results. Omit this field if you want to return the retrieved results as an array.- See Also:
-
getNumberOfResults
The number of results to retrieve from the knowledge base.- See Also:
-
getOrchestrationConfiguration
The configuration for orchestrating the retrieval and generation process in the knowledge base node.Returns union: either
IResolvableorCfnFlowPropsMixin.KnowledgeBaseOrchestrationConfigurationProperty- See Also:
-
getPromptTemplate
A custom prompt template to use with the knowledge base for generating responses.Returns union: either
IResolvableorCfnFlowPropsMixin.KnowledgeBasePromptTemplateProperty- See Also:
-
getRerankingConfiguration
The configuration for reranking the retrieved results from the knowledge base to improve relevance.Returns union: either
IResolvableorCfnFlowPropsMixin.VectorSearchRerankingConfigurationProperty- See Also:
-
builder
@Stability(Stable) static CfnFlowPropsMixin.KnowledgeBaseFlowNodeConfigurationProperty.Builder builder()
-