Docs: Use memory (#12599)

### What problem does this PR solve?


### Type of change


- [x] Documentation Update
This commit is contained in:
writinwaters
2026-01-14 09:40:31 +08:00
committed by GitHub
parent 0795616b34
commit 36b0835740
3 changed files with 68 additions and 2 deletions

View File

@ -21,3 +21,9 @@ The message to send out. Click `(x)` or type `/` to quickly insert variables.
Click **+ Add message** to add message options. When multiple messages are supplied, the **Message** component randomly selects one to send.
### Save to memory
Select the corresponding Memory in the **Message** component under **Save to Memory**:
![](https://raw.githubusercontent.com/infiniflow/ragflow-docs/main/images/save_to_memory.png)

View File

@ -76,13 +76,15 @@ Select the query source for retrieval. Defaults to `sys.query`, which is the def
The **Retrieval** component relies on query variables to specify its queries. All global variables defined before the **Retrieval** component can also be used as queries. Use the `(x)` button or type `/` to show all the available query variables.
### Knowledge bases
### Retrieval from
Select the dataset(s) to retrieve data from.
Select the dataset(s) and memory to retrieve data from.
- If no dataset is selected, meaning conversations with the agent will not be based on any dataset, ensure that the **Empty response** field is left blank to avoid an error.
- If you select multiple datasets, you must ensure that the datasets you select use the same embedding model; otherwise, an error message would occur.
![](https://raw.githubusercontent.com/infiniflow/ragflow-docs/main/images/retrieve_from_memory.PNG)
### Similarity threshold
RAGFlow employs a combination of weighted keyword similarity and weighted vector cosine similarity during retrieval. This parameter sets the threshold for similarities between the user query and chunks stored in the datasets. Any chunk with a similarity score below this threshold will be excluded from the results.

View File

@ -0,0 +1,58 @@
---
sidebar_position: 1
slug: /use_memory
sidebar_custom_props: {
categoryIcon: LucideMonitorCog
}
---
# Use memory
RAGFlow's Memory module is built to save everything, including conversation that happens while an Agent is working. It keeps the raw logs of conversations, like what a user says and what the AI says back. It also saves extra information created during the chat, like summaries or notes the AI makes about the interaction. Its main jobs are to make conversations flow smoothly from one to the next, to allow the AI to remember personal details about a user, and to let the AI learn from all its past talks.
This module does more than just store the raw data. It is smart enough to sort information into different useful types. It can pull out key facts and meanings (semantic memory), remember specific events and stories from past chats (episodic memory), and hold details needed for the current task (working memory). This turns a simple log into an organized library of past experiences.
Because of this, users can easily bring back any saved information into a new conversation. This past context helps the AI stay on topic and avoid repeating itself, making chats feel more connected and natural. More importantly, it gives the AI a reliable history to think from, which makes its answers more accurate and useful.
## Create memory
The Memory module offers streamlined, centralized management of all memories.
When creating a Memory, users can precisely define which types of information to extract, helping ensure that only relevant data is captured and organized. From the navigation path Overview >> Memory, users can then perform key management actions, including renaming memories, organizing them, and sharing them with team members to support collaborative workflows.
![](https://raw.githubusercontent.com/infiniflow/ragflow-docs/main/images/memory_interface.PNG)
## Manage memory
Within an individual Memory page, you can fine-tune how saved entries are used during Agent calls. Each entry can be selectively enabled or disabled, allowing you to control which pieces of information remain active without permanently removing anything.
When certain details are no longer relevant, you can also choose to forget specific memory entries entirely. This keeps the Memory clean, focused, and easier to maintain over time, ensuring that Agents rely only on uptodate and useful information.
![](https://raw.githubusercontent.com/infiniflow/ragflow-docs/main/images/memory_interface.PNG)
Manually forgotten memory entries are completely excluded from the results returned by Agent calls, ensuring they no longer influence downstream behavior. This helps keep responses focused on the most relevant and intentionally retained information.
When the Memory reaches its storage limit and the automatic forgetting policy is applied, entries that were previously forgotten manually are also prioritized for removal. This allows the system to reclaim capacity more intelligently while respecting earlier user curation decisions.
## Enhance Agent context
Under **Retrieval** and **Message** component settings, a new Memory invocation capability is available. In the Message component, users can configure the Agent to write selected data into a designated Memory, while the Retrieval component can be set to read from that same Memory to answer future queries. This enables a simple Q&A bot Agent to accumulate context over time and respond with richer, memory-aware answers.
### Retrieve from memory
For any Agent configuration that uses Memory, a **Retrieval** component is required to bring stored information back into the conversation. By including Retrieval alongside Memory-aware components, the Agent can consistently recall and apply relevant past data whenever it is needed.
![](https://raw.githubusercontent.com/infiniflow/ragflow-docs/main/images/retrieve_from_memory.PNG)
### Save to memory
At the same time you have finished **Retrieval** component settings, select the corresponding Memory in the **Message** component under **Save to Memory**:
![](https://raw.githubusercontent.com/infiniflow/ragflow-docs/main/images/save_to_memory.png)