Skip to content

KnowledgeBaseFlowNodeConfiguration

Source code in docs_src/capo_bedrock_agent/types/knowledge_base_flow_node_configuration.py
class KnowledgeBaseFlowNodeConfiguration(TypedDict, closed=True):
    knowledge_base_id: (
        "capo_bedrock_agent.types.flow_knowledge_base_id.FlowKnowledgeBaseId"
    )
    """<p>The unique identifier of the knowledge base to query.</p>"""
    model_id: NotRequired[
        "capo_bedrock_agent.types.knowledge_base_model_identifier.KnowledgeBaseModelIdentifier"
    ]
    """<p>The unique identifier of the model or <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html">inference profile</a> to use to generate a response from the query results. Omit this field if you want to return the retrieved results as an array.</p>"""
    guardrail_configuration: NotRequired[
        "capo_bedrock_agent.types.guardrail_configuration.GuardrailConfiguration"
    ]
    """<p>Contains configurations for a guardrail to apply during query and response generation for the knowledge base in this configuration.</p>"""
    number_of_results: NotRequired["int"]
    """<p>The number of results to retrieve from the knowledge base.</p>"""
    prompt_template: NotRequired[
        "capo_bedrock_agent.types.knowledge_base_prompt_template.KnowledgeBasePromptTemplate"
    ]
    """<p>A custom prompt template to use with the knowledge base for generating responses.</p>"""
    inference_configuration: NotRequired[
        "capo_bedrock_agent.types.prompt_inference_configuration.PromptInferenceConfiguration"
    ]
    """<p>Contains inference configurations for the prompt.</p>"""
    reranking_configuration: NotRequired[
        "capo_bedrock_agent.types.vector_search_reranking_configuration.VectorSearchRerankingConfiguration"
    ]
    """<p>The configuration for reranking the retrieved results from the knowledge base to improve relevance.</p>"""
    orchestration_configuration: NotRequired[
        "capo_bedrock_agent.types.knowledge_base_orchestration_configuration.KnowledgeBaseOrchestrationConfiguration"
    ]
    """<p>The configuration for orchestrating the retrieval and generation process in the knowledge base node.</p>"""

guardrail_configuration instance-attribute

guardrail_configuration: NotRequired[GuardrailConfiguration]

Contains configurations for a guardrail to apply during query and response generation for the knowledge base in this configuration.

inference_configuration instance-attribute

inference_configuration: NotRequired[PromptInferenceConfiguration]

Contains inference configurations for the prompt.

knowledge_base_id instance-attribute

knowledge_base_id: FlowKnowledgeBaseId

The unique identifier of the knowledge base to query.

model_id instance-attribute

model_id: NotRequired[KnowledgeBaseModelIdentifier]

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.

number_of_results instance-attribute

number_of_results: NotRequired[int]

The number of results to retrieve from the knowledge base.

orchestration_configuration instance-attribute

orchestration_configuration: NotRequired[KnowledgeBaseOrchestrationConfiguration]

The configuration for orchestrating the retrieval and generation process in the knowledge base node.

prompt_template instance-attribute

prompt_template: NotRequired[KnowledgeBasePromptTemplate]

A custom prompt template to use with the knowledge base for generating responses.

reranking_configuration instance-attribute

reranking_configuration: NotRequired[VectorSearchRerankingConfiguration]

The configuration for reranking the retrieved results from the knowledge base to improve relevance.