Retrieval Policy • Rust AI Agent SDK
RetrievalPolicy: Retrieval policy for RAG
RetrievalPolicy
Defined in the extras module.
Rust AI Agent SDK
Retrieval policy for RAG
Fields
| Name | Type | Description |
|---|---|---|
Always | variant | – |
retrieve | variant | – |
context | variant | – |
default | variant | Always retrieve context |
Always | variant | Always retrieve context |
Never | variant | – |
retrieve | variant | – |
context | variant | – |
Never | variant | Never retrieve context |
Retrieve | variant | – |
only | variant | – |
when | variant | – |
needed | variant | – |
OnDemand | variant | Retrieve only when needed |
Retrieve | variant | – |
based | variant | – |
on | variant | – |
similarity | variant | – |
threshold | variant | – |
Threshold | variant | Retrieve based on similarity threshold |
Source
View on GitHubpraisonai/src/parity/extras.rs at line 0