A recall method selects relevant episodes from persistent memory for use during a task. Episodes are recalled within the task-execution lifecycle; the retrieval method and storage backend must be chosen together because the backend constrains which retrieval options are practical. section 7.1.2 section 7.7
Two common retrieval choices are:
- Recency retrieves recent records; a simple file-based store can support this approach. section 7.1.2
- Semantic similarity retrieves records by meaning and requires a vector store. section 7.1.2
Table 7.3 Recipes for Memory instances
|
Recipe
|
Description
|
|
recency_memory(path, max_results)
|
Returns a recency-based
Memory using the JSONMemoryStore as its
data backend.
|
|
similarity_memory(collection,
max_results)
|
Returns a
similarity-based Memory
using the QdrantMemoryStore
as its data backend.
|
|
reflective_memory(llm, collection,
max_results, template)
|
Returns a Memory
instance backed by QdrantMemoryStore
where Episode records
are reflected on by an LLM to generate lessons that can be applied to future
task executions.
|
Compare preconfigured recency, similarity, and reflective memory recipes and their backends. section 7.4.2
