Knowledge Management - Build Log System & FAQ
In this chapter, you'll learn how to use the log system to build a powerful knowledge database and continuously improve your agents.
🧠 What is Knowledge Management?
Knowledge Management means that you:
- ✅ Collect: Store frequent questions and proven answers
- ✅ Organize: Categorize knowledge in a structured way
- ✅ Reuse: Agents access stored knowledge
- ✅ Improve: Continuously update and expand knowledge
Goal: Your agents get better over time because they can draw on a growing knowledge base.
🎯 Benefits of a Knowledge Database
1. Consistent Answers
- Same questions always answered the same way
- No contradictory information
2. Faster Answers
- Agent doesn't need to "think", but finds answer in database
- Fewer tool calls = lower costs
3. Better Quality
- Proven answers are saved
- Incorrect answers can be corrected
4. Cost Savings
- Fewer tokens through direct retrieval of answers
- Prompt caching works better with same questions
5. Easy Maintenance
- Central management of all answers
- Changes immediately effective for all agents
🔧 The Two Important Tools
1. search_logs - Retrieve Knowledge
What does it do? Searches the knowledge database for matching questions and answers.
When does the agent use it?
- When a question is asked that is similar to previous questions
- Before calling other tools
- To give consistent answers
Example:
User: "How long does shipping take?"
Agent calls: search_logs("shipping duration")
Result:
- Question: "How long does delivery take?"
Answer: "Within Germany 2-3 business days, EU 5-7 business days."
Tags: shipping
Agent responds: "Within Germany, shipping takes 2-3 business days..."
2. create_log_entry - Save Knowledge
What does it do? Saves a new question-answer combination in the knowledge database.
When does the agent use it?
- When a new, frequent question has been answered
- When important information should be saved for the future
- Manually, when you create FAQs
Example:
create_log_entry(
question: "Can I pay by invoice?",
answer: "Yes, invoice payment is possible from a minimum order value of $50.",
context: "Payment methods",
tags: ["payment", "invoice"]
)
📖 Step-by-Step: Build Knowledge Database
Phase 1: First Week - Collect
Goal: Identify frequent questions
Enable Logging (if not already done)
- Plugin Configuration → "Enable Thread Logging" = Yes
Let Your Agent Work
- Test yourself with typical customer questions
- Let real customers interact with the agent
Activate
search_logsandcreate_log_entryTools- In agent configuration
Add Instructions:
ALWAYS use the search_logs tool first before calling other tools.
When you answer a frequent question, save it with create_log_entry
for the future.
Phase 2: After One Week - Analyze
Goal: Identify top questions
Go to Assistant Logs
- 5E OAI Agent Manager → Assistant Logs
Filter by Time Period
- Last 7 days
Identify Frequent Questions:
Example list:
- "How long does shipping take?" → 25 times
- "Can I return?" → 18 times
- "What payment methods are there?" → 15 times
- "Do you have a store?" → 12 times
- "How do I find my size?" → 10 times
Phase 3: Create FAQ Entries
Goal: Save top 10 questions as FAQ
Manually via Backend Chat:
Open Backend Chat
- 5E OAI Agent Manager → Chat (Backend)
Send to Agent:
Please create a log entry:
Question: "How long does shipping take?"
Answer: "Within the US 2-3 business days, international 5-7 business days, worldwide 10-14 business days. Express shipping (1 business day) available for additional fee."
Context: "Shipping information for standard and express shipping"
Tags: shipping, deliveryAgent executes
create_log_entry- Entry is saved in database
Repeat for all top questions
Programmatically (for developers):
$logService->createLogEntry(
question: 'How long does shipping take?',
answer: 'Within the US 2-3 business days...',
context: 'Shipping information',
tags: ['shipping', 'delivery']
);
Phase 4: Test & Optimize
Goal: Ensure knowledge is retrieved
Ask Test Questions:
Ask a saved question in backend chat:
"How long does the shipment take?"(Similar, but not identical to the saved question)
Check in Logs:
- Did the agent call
search_logs? - Did it find the correct answer?
- Was the answer consistent?
- Did the agent call
If Problems:
Agent doesn't find entry:
- Search term too specific → Make entries more general
- Tool not activated → Activate
search_logs
Agent doesn't use
search_logs:- Instructions too vague → Explicitly mention that it should use it
Answer is wrong:
- Edit the log entry
- Update the answer
🏗️ Structure of Your Knowledge Database
Create Categories with Tags
Use Tags to organize knowledge:
| Tag | Description | Examples |
|---|---|---|
shipping | Everything about delivery | Delivery time, shipping costs, tracking |
returns | Returns & exchanges | Return period, return address, costs |
payment | Payment methods & invoices | Invoice, PayPal, credit card, installment |
product | Product information | Materials, sizes, colors, care |
size | Size advice | Size charts, fit, exchange |
voucher | Vouchers & discounts | Redeeming, validity, combinability |
account | Customer accounts | Registration, password, change data |
contact | Contact options | Hours, email, phone, store |
Example Structure
Knowledge Database
│
├── Shipping (Tag: shipping)
│ ├── "How long does shipping take?"
│ ├── "What does shipping cost?"
│ ├── "Can I track shipping?"
│ └── "Do you ship internationally?"
│
├── Returns (Tag: returns)
│ ├── "Can I return?"
│ ├── "How long do I have?"
│ ├── "Who pays for return shipping?"
│ └── "Where do I send the return?"
│
├── Payment (Tag: payment)
│ ├── "What payment methods are there?"
│ ├── "Can I pay by invoice?"
│ ├── "Is installment payment possible?"
│ └── "When will I be charged?"
│
└── ...
📝 Best Practices for Log Entries
1. Formulate Questions Generally
❌ Bad:
Question: "I ordered on Dec 15, when will my package arrive?"
→ Too specific, only helps this one customer
✅ Good:
Question: "How long does shipping take?"
→ General, helps many customers
2. Answers Should Be Complete
❌ Bad:
Answer: "2-3 days"
→ Unclear, without context
✅ Good:
Answer: "Within the US, delivery time is 2-3 business days from shipment. You will receive a shipping confirmation with tracking number via email."
→ Complete, clear, helpful
3. Use Meaningful Context
The context helps the search_logs tool find relevant entries.
Examples:
Question: "How long does shipping take?"
Context: "Standard shipping within US and international, including express option"
Question: "Can I pay by invoice?"
Context: "Payment methods invoice payment, requirements and minimum order value"
4. Set Appropriate Tags
An entry can have multiple tags:
Question: "How does a return work?"
Tags: returns, shipping, return
5. Update Outdated Entries
When information changes, update the log entries!
Example:
Old shipping time: 3-5 days New shipping time: 2-3 days
→ Update the entry so customers get correct info
🔄 Maintain Knowledge Database
Regular Maintenance (monthly)
1. Identify Outdated Entries
Questions you should ask yourself:
- Has information changed? (e.g., new shipping times)
- Are products no longer available?
- Have prices/conditions changed?
2. Remove Duplicates
Sometimes multiple entries are created for the same question:
- "How long does shipping take?"
- "How long does delivery take?"
- "When will my package arrive?"
Solution:
- Keep the best entry
- Delete duplicates
3. Add New Top Questions
Analyze monthly:
- What new questions came up frequently?
- Which answers were particularly good?
- What is still missing from the knowledge database?
4. Check Quality
Random samples:
- Search for random tags
- Read through the answers
- Are they still current and correct?
🎓 Advanced Strategies
1. Sales Channel-Specific Knowledge
If you operate multiple shops (e.g., US, Canada):
Strategy:
- Create separate log entries per sales channel
- Example: Shipping times are different in Canada than in the US
Implementation:
United States:
Question: "How long does shipping take?"
Answer: "2-3 business days"
Sales Channel: US Shop
Canada:
Question: "How long does shipping take?"
Answer: "3-5 business days"
Sales Channel: Canadian Shop
2. Season-Specific Knowledge
At certain times, answers change:
Example Christmas Season:
Question: "How long does shipping take?"
Answer: "Due to high order volume during the Christmas season, delivery time is currently 5-7 business days. Please order by Dec 18 to receive in time for Christmas."
Context: "Shipping Christmas 2025"
Tags: shipping, christmas
After the season:
- Replace the entry with the standard answer again
3. Hierarchical Knowledge
Use context to create a hierarchy:
General:
Question: "Can I return?"
Answer: "Yes, 14-day right of withdrawal."
Specific (for certain products):
Question: "Can I return personalized items?"
Answer: "No, personalized items are excluded from the right of withdrawal."
Context: "Returns personalized products exception"
The agent finds the specific entry for "personalized", otherwise the general one.
4. Multi-Step Instructions
For complex processes:
Question: "How do I create a return?"
Answer: "
1. Log in to your customer account
2. Go to 'My Orders'
3. Select the order
4. Click 'Return items'
5. Select the items and reason
6. Print the return label
7. Stick it on the package
8. Drop it off at the post office
You will receive a confirmation via email. The refund will be processed within 5 business days after receipt of the return.
"
Tags: returns, instructions, step-by-step
📊 Measure Success
KPIs (Key Performance Indicators)
1. Number of Log Entries
Goal: Continuous growth
- After 1 month: 20-30 entries
- After 3 months: 50-80 entries
- After 6 months: 100-150 entries
2. Usage of search_logs
Goal: Frequent use
Analyze in logs:
- How often is
search_logscalled? - How often does it find matching entries?
Ideal:
- 60-80% of all conversations use
search_logs - 70-90% of searches find relevant entries
3. Consistency of Answers
Goal: Same questions = Same answers
Test:
- Ask the same question multiple times (slightly rephrased)
- Check if answers are consistent
Example:
- "How long does shipping take?"
- "When will my package arrive?"
- "How long does delivery take?"
All should contain the same core information.
4. Cost Savings
Goal: Lower token usage through knowledge retrieval
Compare:
- Without knowledge database: Agent calls tools every time → high costs
- With knowledge database: Agent finds answer in logs → low costs
Example calculation:
Without knowledge management:
Question: "How long does shipping take?"
→ Agent calls product_search, get_shipping_info
→ 2,500 tokens = $0.0038
With knowledge management:
Question: "How long does shipping take?"
→ Agent calls search_logs, finds answer
→ 800 tokens = $0.0012
Savings: 68% lower costs!
🛠️ Tools for Knowledge Management
Use in Backend Chat
Create log entry:
Create a log entry:
Question: "Do you have a store?"
Answer: "No, we are a pure online shop. But you're welcome to order our products online and return them free of charge if you don't like them."
Context: "Store availability"
Tags: contact, store
Search log entries:
Search in logs for: "Returns"
Agent shows you all relevant entries.
Edit log entries (manually):
- Go to 5E OAI Agent Manager → Assistant Logs
- Search for the entry
- Click "Edit"
- Change question, answer or tags
- Save
💡 Practice Example: Build FAQ Database
Scenario: Fashion Shop
You run an online shop for clothing.
Step 1: Collect Top 10 Questions
After 2 weeks of operation, you've identified:
- How do I find my size?
- How long does shipping take?
- Can I return?
- Do you have this in another color?
- How does the size run?
- Can I pay by invoice?
- When will my order be shipped?
- How can I track my order?
- Do you have a store?
- How do I care for the material?
Step 2: Create Log Entries
Entry 1: Size finding
Question: "How do I find my size?"
Answer: "In each product description you'll find a size chart. Measure your chest, waist and hip circumference and compare them with our chart. If you have questions, our size advisor tool will help!"
Context: "Size chart usage instructions"
Tags: size, help, instructions
Entry 2: Shipping time
Question: "How long does shipping take?"
Answer: "Within the US 2-3 business days, international 5-7 business days. Express (1 business day) available for additional fee. You'll receive a shipping confirmation with tracking number."
Context: "Shipping times standard express US international"
Tags: shipping, delivery time
Entry 3: Returns
Question: "Can I return?"
Answer: "Yes! 30-day return policy. Free return shipping with included label. Money back within 5 business days after receipt."
Context: "Return policy period costs process"
Tags: returns, return, exchange
... and so on for all top 10 questions.
Step 3: Adapt Agent Instructions
Add:
IMPORTANT: ALWAYS use search_logs first before calling other tools.
We have an extensive FAQ database for common questions about:
- Sizes and fit
- Shipping and delivery
- Returns and exchanges
- Payment methods
- Materials and care
If you find an answer in the logs, use it!
Step 4: Test
Ask test questions:
- "How fast does my package arrive?" → Should find shipping time info
- "Does size M fit me?" → Should refer to size chart
- "Can I exchange?" → Should find return info
Step 5: Expand
After one month:
- Identify new frequent questions
- Create log entries
- Knowledge database grows to 50+ entries
Result:
- Consistent, fast answers
- 60% fewer tool calls
- 45% cost savings
- More satisfied customers
🎯 Summary
Core Concepts:
- Knowledge Database = Collection of question-answer pairs
search_logs= Tool for retrieving knowledgecreate_log_entry= Tool for saving knowledge- Tags = Categorization and organization
- Context = Additional search terms for better matches
Success Formula:
Collect frequent questions
↓
Save as log entries
↓
Agent uses search_logs
↓
Faster, consistent answers
↓
Lower costs, higher quality
Quick-Start Checklist:
- Activate
search_logsandcreate_log_entrytools - Adapt instructions: "ALWAYS use search_logs first"
- First week: Collect logs
- Identify top 10 questions
- Create FAQ entries
- Test: Does agent find entries?
- Monthly: Add new questions, update outdated ones
- Measure success: Consistency, costs, usage
Next Steps
You now have a strategy for effective knowledge management!
➡️ Cost Management - Monitor and optimize costs
➡️ Best Practices - More optimization tips
➡️ Back to Main Documentation