Semantic Memory

Master how AI agents store and organize facts, knowledge, and concepts in structured semantic memory systems

The Knowledge Library: What is Semantic Memory?

Imagine your brain as a vast library filled with facts, concepts, and general knowledgeβ€”"Paris is the capital of France,""water freezes at 0Β°C," "Python is a programming language." This is semantic memory: knowledge about the world that isn't tied to personal experiences.

For AI agents, semantic memory is their knowledge baseβ€”structured facts, relationships, and concepts they use to understand, reason, and respond intelligently. Unlike episodic memory (which stores personal experiences like "yesterday's conversation"), semantic memory stores general truths that persist across contexts.

Let's explore how agents organize and retrieve this knowledge to act intelligently.

Interactive: Episodic vs Semantic Memory

Toggle between memory types to see how they differ in structure and purpose.

πŸ“…

Episodic Memory (Personal Experiences)

Memories tied to specific events, times, and contexts.

Example
"The user asked about API pricing yesterday at 3 PM"
Structure
Timestamped, contextualized, sequential
βœ… Best For
  • β€’ Conversation history
  • β€’ User preferences
  • β€’ Past interactions
πŸ“ Retrieval
  • β€’ By time/date
  • β€’ By context
  • β€’ By user ID
πŸ”„ Nature
  • β€’ Constantly growing
  • β€’ Time-sensitive
  • β€’ User-specific

🧠 Why Agents Need Semantic Memory

  • β€’Intelligent Responses: Answer questions using domain knowledge
  • β€’Reasoning: Make inferences from related concepts
  • β€’Consistency: Provide reliable information across sessions
  • β€’Learning: Build on existing knowledge to understand new concepts

πŸ—οΈ Key Components

  • β€’Concepts: Entities and ideas (e.g., "Python", "API")
  • β€’Relationships: How concepts connect ("is-a", "has-property")
  • β€’Attributes: Properties of concepts (color, size, type)
  • β€’Hierarchies: Category structures (inheritance, taxonomy)

πŸ’‘ Key Distinction

Episodic Memory:

"I remember when you told me your birthday last Tuesday."

Semantic Memory:

"I know that birthdays are annual celebrations marking the day someone was born."