Skip to main content

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

An agent's true power comes from its knowledge. The RAG Remember component is how you teach your agent new things, turning it from a static tool into a learning system that can grow and adapt over time with new information.

What You’ll Configure

Step 1: Define the Namespace and Source Details

Specify where to store the information and how to identify it.

SettingRequired?Description
NamespaceYesSelect the knowledge base (namespace) where this information will be stored.
Source IdentifierYesA 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.
LabelNoA human-readable name or description for the data source, which can help with organization.
MetadataNoA JSON object for storing additional, structured information about the data source (e.g., {"category": "product_docs", "version": 1.2}).
Using Source Identifiers

Think of the Source Identifier as a filename. It gives you a way to reference, update, or delete this specific piece of knowledge later using the RAG Forget Component.

Step 2: Provide the Source Data

This is the actual content you want the agent to remember.

InputRequired?Description
SourceYesThe 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.

OutputDescription
SuccessReturns 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...
  • Check the Success Output: If the Success output is empty, the operation failed. This could be due to invalid inputs, incorrect namespace permissions, or a problem with the underlying data store.
  • Data Cannot Be Found Later: Ensure you are using the correct Namespace when you try to search for the data. Also, check that your Source data is descriptive enough to be found by a search query.
  • Updating vs. Creating: Remember that if you use an existing Source Identifier, you will overwrite the previous entry. If you want to add new information, ensure you use a new, unique identifier.

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.