Skip to content

Chunks not retrieved from Azure AI Search Knowledge Source #8

@arnabbiswas1

Description

@arnabbiswas1

Because of the following code retrieval is failing silently. It's not returning any error, but it's not retrieving any chunks as well.

KnowledgeRetrievalLowReasoningEffort should be replaced with KnowledgeRetrievalLowReasoningEffort()

result = retrieval_client.retrieve(
    retrieval_request=KnowledgeBaseRetrievalRequest(
        messages=[
            KnowledgeBaseMessage(
                role="user",
                content=[KnowledgeBaseMessageTextContent(text=query)],
            )
        ],
        knowledge_source_params=[
            SearchIndexKnowledgeSourceParams(
                knowledge_source_name=KNOWLEDGE_SOURCE_NAME,
                include_references=True,
                include_reference_source_data=True,
            )
        ],
        include_activity=True,
        retrieval_reasoning_effort=KnowledgeRetrievalLowReasoningEffort,
    )
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions