Skip to content

KnowledgeBaseRetrievalResult

Source code in docs_src/capo_bedrock_agent_runtime/types/knowledge_base_retrieval_result.py
class KnowledgeBaseRetrievalResult(TypedDict, closed=True):
    content: "capo_bedrock_agent_runtime.types.retrieval_result_content.RetrievalResultContent"
    """<p>Contains information about the content of the chunk.</p>"""
    location: NotRequired[
        "capo_bedrock_agent_runtime.types.retrieval_result_location.RetrievalResultLocation"
    ]
    """<p>Contains information about the location of the data source.</p>"""
    score: NotRequired["float"]
    """<p>The level of relevance of the result to the query.</p>"""
    metadata: NotRequired[
        "capo_bedrock_agent_runtime.types.retrieval_result_metadata.RetrievalResultMetadata"
    ]
    """<p>Contains metadata attributes and their values for the file in the data source. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-ds.html#kb-ds-metadata">Metadata and filtering</a>.</p>"""
    document_id: NotRequired["capo_bedrock_agent_runtime.types.document_id.DocumentId"]
    """<p>The unique identifier of the document. Use with <code>GetDocumentContent</code> to retrieve the full document.</p>"""

content instance-attribute

Contains information about the content of the chunk.

document_id instance-attribute

document_id: NotRequired[DocumentId]

The unique identifier of the document. Use with GetDocumentContent to retrieve the full document.

location instance-attribute

location: NotRequired[RetrievalResultLocation]

Contains information about the location of the data source.

metadata instance-attribute

metadata: NotRequired[RetrievalResultMetadata]

Contains metadata attributes and their values for the file in the data source. For more information, see Metadata and filtering.

score instance-attribute

score: NotRequired[float]

The level of relevance of the result to the query.