Lesson 3. Memory and Knowledge#
Why This Matters#
The model doesn't remember past conversations (unless configured). For an agent to "know" facts about your business, you need a knowledge base.
Key Idea#
Knowledge base = source of truth for the agent
Without a knowledge base, the model relies on "general knowledge" and can make mistakes. With a base — it searches for answers in your documents.
Types of Memory#
1. Short-term Memory (Conversation Context)
The model remembers the current conversation within the context window.
Example:
- Client: "Hello, I'd like to book a haircut"
- Agent: "Sure! For what date?"
- Client: "Friday"
- Agent: "Great, booking you for Friday. What time works for you?"
The model remembers it's about a haircut and Friday.
Limitation: memory resets when leaving the conversation (unless long-term memory is configured).
2. Long-term Memory (Saved Between Sessions)
Some platforms (e.g., Zapier Chatbots) allow saving user information between conversations.
Example:
- First booking: "What's your name?" → Ivan
- Second booking: "Hello, Ivan! What service would you like to book?"
What can be saved:
- name, contacts
- preferences
- action history
Important: don't save sensitive data without consent.
3. Knowledge Base (Documents and Facts)
A knowledge base is files the model "reads" when answering.
What to put there:
- FAQ (frequent questions)
- price list
- rules and policies
- service/product descriptions
- company policies
How it works:
- Client asks a question
- Model searches for the answer in the knowledge base
- Finds relevant chunks
- Forms an answer based on them
Example: Knowledge base: "Nationwide delivery 3–7 days, free from $50"
Question: "How much is delivery?"
Agent: "Nationwide delivery is free for orders over $50, otherwise $3. Delivery time: 3–7 days."
How to Format a Knowledge Base#
Format 1: FAQ (question-answer)
Question: How do I book a service?
Answer: Message us on Telegram @salon or call +1 (999) 123-45-67.
Question: What services do you offer?
Answer: Haircut, coloring, manicure, pedicure, massage.
Question: How much is a haircut?
Answer: Women's haircut — from $15, men's — from $8.
Format 2: Structured Document
# Beauty Spot Salon Services
## Haircut
- Women's: from $15
- Men's: from $8
- Children's: from $6
## Coloring
- Full: from $30
- Roots: from $20
- Highlights: from $40
## Hours
Mon–Fri: 10:00–20:00
Sat–Sun: 11:00–19:00
Format 3: Table (if lots of data)
| Service | Price | Duration |
|---|---|---|
| Women's haircut | $15 | 60 min. |
| Men's haircut | $8 | 30 min. |
| Coloring | from $30 | 120 min. |
How to Update the Knowledge Base#
Rule: the knowledge base must be up to date.
Plan:
- once a month — check prices and terms
- when changes occur — update immediately
- collect questions the agent couldn't answer → add to the base
Example:
Client asked: "Do you have children's haircuts?"
Agent: "Sorry, I couldn't find that information"
→ add to base: "Children's haircut — from $6"
Check Your Understanding#
- What types of memory does an agent have?
- What is a knowledge base and why is it needed?
- How do you format a knowledge base?
- How often should you update the base?