Should Retrieve • AI Agent SDK
should_retrieve: Determine if retrieval should be performed for a query.
should_retrieve
Method
</div>
This is a method of the RetrievalConfig class in the retrieval_config module.
Determine if retrieval should be performed for a query.
Signature
def should_retrieve(query: str, force: bool, skip: bool) -> boolParameters
ParamField
strThe user query
ParamField
boolForce retrieval regardless of policy
ParamField
boolSkip retrieval regardless of policy
Returns
ResponseField
boolTrue if retrieval should be performed
Source
View on GitHubpraisonaiagents/rag/retrieval_config.py at line 335