8.4 KiB
App 4 - Multi-agent Customer Chatbot: Office Writing Tools Sales & Support
1. Overview
The "App 4 - Multi-agent customer chatbot" is an advanced conversational AI designed to act as a dedicated Sales Manager and Customer Support Representative for office writing tools. Its primary function is to assist users in finding the perfect product by understanding their needs, providing comprehensive details, and simulated availability directly from a product catalog. The chatbot leverages a knowledge base of office writing tools and a powerful LLM to deliver human-like, context-aware responses.
2. Key Features
- Conversational Interface: Users can ask natural language questions about office writing tools (e.g., "Show me pens under $10" or "Do you have eco-friendly notebooks?").
- Product Information Retrieval: Utilizes a dedicated knowledge base (
office_writing_tools_catalog.csv) to retrieve relevant product details. - Hybrid Search: Combines vector search (semantic understanding) and full-text search (keyword matching) for comprehensive and accurate product retrieval.
- Weighted Retrieval: Prioritizes semantic understanding (60%) over keyword matching (40%) to cater to both conceptual and specific product queries.
- Contextual Responses: The LLM maintains conversational context, allowing for follow-up questions and a natural interaction flow.
- Detailed Product Answers: Provides comprehensive details, features, and simulated availability for identified products.
- Gemini-powered LLM: Employs the
gemini-2.5-flash-litemodel for efficient and high-quality natural language generation.
3. Technical Configuration
3.1. Application Details
- App Name: App 4 - Multi-agent customer chatbot
- Description: Documentation, PDF, and source can be found under the following link:
https://drive.google.com/drive/folders/13IXNtJGFKZnBelD2caNwWF8qo8LAVnos?usp=sharing - Icon: 🤖
- Mode: Advanced Chat
- Version: 0.5.0
3.2. Workflow Structure
The chatbot operates on a sequential workflow:
- User Input: Receives the user's natural language query.
- Knowledge Retrieval: Processes the user's query against the
office_writing_tools_catalog.csvknowledge base. - LLM (Language Model): Receives the user's query and the retrieved context from the knowledge base, then generates a human-like response.
- Answer: Delivers the LLM's response to the user.
3.3. Knowledge Base (office_writing_tools_catalog.csv)
- Purpose: Stores detailed information for 100 diverse office writing tools, including
product_id,product_name,category,description,price,size,color, andmaterial. - Chunk Settings:
- Chunking Mode: General text chunking.
- Delimiter:
\n(single newline character) - Ensures each product record is treated as a distinct chunk. - Maximum Chunk Length: 1024 characters.
- Chunk Overlap: 50 characters.
- Text Pre-processing Rules: Replaces consecutive spaces, newlines, and tabs; URLs and email addresses are not deleted.
- Index Method: High Quality (uses embedding model for precise retrieval).
- Embedding Model:
text-embedding-3-large(orgemini-embedding-001as specified in the workflow). - Retrieval Setting:
- Type: Hybrid Search (Vector Search + Full-Text Search).
- Rerank Model: Disabled (due to platform limitations).
- Weighted Score: Enabled, with a balance of Semantic 0.6 and Keyword 0.4.
- Top K: 4 (retrieves the top 4 most relevant chunks).
- Score Threshold: Not explicitly set in the YAML, implying a default or disabled state.
3.4. LLM (Language Model)
- Provider: langgenius/gemini/google
- Model Name:
gemini-2.5-flash-lite - Mode: Chat
- Temperature: 0.7 (provides a balance of creativity and consistency in responses).
- Context: Enabled, using
sys.queryfor user input. - System Prompt:
Welcome! I am your dedicated Sales Manager and Customer Support Representative for office writing tools. My goal is to help you find the perfect product by deeply understanding your needs and providing comprehensive details, features, and—most importantly—up-to-the-minute availability straight from our inventory. You are a dedicated Sales Manager and Customer Support Representative specializing in office writing tools. Your primary goal is to assist customers in finding the perfect product by deeply understanding their needs and providing comprehensive details, features, and up-to-the-minute availability from our inventory. When a user asks a question, use the provided context about our office writing tools catalog to formulate your response. **Instructions:** 1. **Identify User Intent:** Understand what the user is looking for (e.g., specific product, category, recommendation, comparison, price range, attributes). 2. **Utilize Context:** Refer to the `office_writing_tools_catalog.csv` data provided in the `{{knowledge.office_writing_too...}}` variable. Extract relevant product names, categories, descriptions, prices, sizes, colors, and materials. 3. **Provide Comprehensive Details:** For identified products, list key features, attributes, and pricing. 4. **Maintain Conversational Context:** Respond in a friendly, helpful, and professional tone. Remember previous turns in the conversation. 5. **Address Availability (Simulated):** Since we don't have real-time inventory, you can phrase availability generally, e.g., "These items are typically in stock," or "We usually have a good selection of these available." 6. **Handle No Matches:** If the provided context does not contain information relevant to the user's query, politely state that you couldn't find a matching product in the catalog and offer to help with something else or suggest broader categories. 7. **Encourage Further Questions:** Always invite follow-up questions to continue assisting the user. **Example Interaction Flow:** User: "Do you have blue ballpoint pens?" AI: "Yes, we certainly do! We have the 'Blue Ballpoint Pen' which is a classic retractable pen with smooth blue ink, priced at $1.50. It's a medium size and made of plastic. These are typically in stock. Is there anything else you'd like to know about it, or perhaps another type of pen?" User: "I need something for organizing my desk." AI: "Certainly! For organizing your desk, we have a few great options. For example, the 'Desk Organizer' is a multi-compartment item for pens, pencils, and small items, priced at $19.99, made of mesh metal. We also have the 'Document Tray (Mesh)' for letter/A4 papers at $17.50, and a 'Pen Holder' for $7.00. Which of these sounds most interesting, or would you like to explore other desk accessories?" Now, based on the user's {{#sys.query#}} provide the best possible answer using the provided {{#context#}}.
3.5. Other Features
- File Upload: Disabled.
- Image Upload: Disabled.
- Retriever Resource: Enabled.
- Sensitive Word Avoidance: Disabled.
- Speech-to-Text/Text-to-Speech: Disabled.
- Suggested Questions: Disabled.
4. Usage and Interaction Tips
Users can interact with the chatbot by asking natural language questions about office writing tools. Here are some examples of what you can ask:
- Find Specific Products: "Do you have a blue ballpoint pen?", "Show me mechanical pencils.", "I need a black permanent marker."
- Explore Categories: "What kind of notebooks are available?", "List all desk accessories.", "Show me your cutting tools."
- Get Product Details: "Tell me about the 'Fountain Pen (Black Ink)'.", "What's the price of the 'Electric Pencil Sharpener'?", "What material is the 'Desk Organizer' made from?"
- Compare Items: "What's the difference between a gel pen and a rollerball pen?", "Which is better for detailed work: fine-tip markers or colored pencils?"
- Ask for Recommendations: "Suggest some eco-friendly writing tools.", "I need something for organizing documents, any ideas?", "What are good options for presentations?"
- Filter by Attributes: "Show me pens under $10.", "Do you have any large desk pads?", "Are there any white erasers?"
The chatbot is designed to maintain conversational context, so feel free to ask follow-up questions to refine your search or get more details.