RAG Remember Component
Use the RAG Remember component to add or update information in your agent's long-term memory. This component allows the agent to learn new facts, documents, or data, making its knowledge base expandable and dynamic.
Why this matters
What You’ll Configure
- Define the Namespace and Source Details
- Provide the Source Data
- Handle the Output
- Best Practices
- Troubleshooting Tips
- What to Try Next
Step 1: Define the Namespace and Source Details
Specify where to store the information and how to identify it.
Setting | Required? | Description |
---|---|---|
Namespace | Yes | Select the knowledge base (namespace) where this information will be stored. |
Source Identifier | Yes | A unique ID for this piece of data. If an entry with this ID already exists, it will be updated. Otherwise, a new one will be created. |
Label | No | A human-readable name or description for the data source, which can help with organization. |
Metadata | No | A JSON object for storing additional, structured information about the data source (e.g., {"category": "product_docs", "version": 1.2} ). |
Using Source Identifiers
Step 2: Provide the Source Data
This is the actual content you want the agent to remember.
Input | Required? | Description |
---|---|---|
Source | Yes | The data to be stored in the knowledge base. This is typically a large block of text, but can be other data types. You can also connect additional custom inputs to be stored as metadata. |
Step 3: Handle the Output
The component provides a simple success or failure indicator.
Output | Description |
---|---|
Success | Returns true if the data was successfully added or updated, otherwise returns an empty value. |
Best Practices
- Keep Data Chunking in Mind: RAG systems work best with well-structured, reasonably sized chunks of text. Instead of remembering a single 100-page document, consider breaking it into smaller sections or paragraphs and remembering each one individually with its own source identifier.
- Use Rich Metadata: Good metadata is key to effective searching later on. Include relevant keywords, categories, dates, or source information to help the RAG Search Component find the most relevant information.
- Create Dynamic Learning Loops: Have your agent take the output of a conversation or an analysis from an LLM and feed it into
RAG Remember
. This allows the agent to learn from its interactions. - Structure Your Namespaces: Use different namespaces to separate different types of knowledge (e.g., "product-manuals," "customer-faq," "internal-policies").
Troubleshooting Tips
If your agent isn't remembering...
What to Try Next
- After a conversation with a user, use a GenAI LLM Component to summarize the key takeaways, and then use
RAG Remember
to store that summary in a "conversation-history" namespace. - Create a workflow that reads files from a folder, loops through them with ForEach, and uses
RAG Remember
to add each file's content to the knowledge base. - Pair this component with RAG Search and RAG Forget to build a complete lifecycle for your agent's knowledge management.