Skip to content

Unable to filter using metadata in the new version #2188

@kiran-bal

Description

@kiran-bal

Iam using R2R version 3.6.1 with ollama - llama3.1 model. I have added a pdf document to the R2R using the custom ingestion_mode. When iam using the rag stream iam unable the filter not getting applied. Please see the below code and let me know if this is not the right approach for metadata filtering in rag stream.

search_settings = {
    "use_semantic_search": True,
    "filters": {"metadata.doc_type": {"$eq": "video"}}
}


result =r2r_client.retrieval.rag(
query=query,
task_prompt=R2R_DOC_CHAT_TEMPLATE,
search_settings=search_settings,
rag_generation_config={
    "stream": True
}
)

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