Flow description
Purpose and benefits
This workflow defines a Customer Service Chatbot that leverages internal knowledge sources to provide users with accurate, helpful, and context-aware responses. The flow is designed to automate customer interactions, streamline support, and ensure that users receive timely and relevant answers.
Main Flow Steps
1. Chat Session Initiation and Welcome
- Chat Opened Trigger: The flow begins by detecting when a user opens a chat session.
- Welcome Message: A friendly, informative welcome message is displayed to the user, inviting them to ask questions and explaining the chatbot’s purpose.
- Output Display: The welcome message is shown in the chat interface, ensuring users feel guided from their very first interaction.
- Chat Input: Whenever a user sends a message or query, it is captured for processing.
- Chat History: The conversation history is retrieved and made available for context, enabling the bot to provide coherent, continuous support.
- Document Retriever: The user’s query is used to search connected knowledge sources or documentation, retrieving the most relevant information for the current question.
3. Dynamic Prompt Construction
- Prompt Template: A dynamic prompt is assembled using several variables:
- {input}: The user’s latest message.
- {chat_history}: The ongoing conversation with the user.
- {context}: Knowledge snippets retrieved from internal sources.
- The prompt instructs the AI to act as a helpful customer service bot, answer concisely, and offer a support link if the answer is not known.
Prompt Example Structure
Section | Content |
---|
System Message | “You are a helpful AI customer service bot…” |
Chat History | Recent conversation with the user |
Knowledge | Retrieved documents or knowledge snippets |
User Input | User’s current question |
Answer | Response generated by the AI |
4. AI Response Generation
- Generator Node: The constructed prompt is sent to an AI model (LLM), which generates a relevant and accurate reply using the provided context and history.
5. Presenting the Response
- Chat Output: The generated answer is displayed back to the user in the chat interface, closing the response loop and awaiting further user input if necessary.
Workflow Visualization
Below is a simplified sequence of the main nodes and their roles:
Step | Node/Component | Purpose |
---|
1 | Chat Opened Trigger | Detects new chat sessions and starts workflow |
2 | Message Widget | Sends welcome message |
3 | Chat Output | Displays messages to the user |
4 | Chat Input | Receives user messages |
5 | Chat History | Retrieves recent conversation |
6 | Document Retriever | Searches knowledge sources |
7 | Prompt Template | Crafts context-rich prompts for the AI |
8 | Generator | Uses AI to generate responses |
9 | Chat Output | Sends generated response to the user |
Benefits and Usefulness
- Scalability: The workflow can handle many simultaneous customer queries without human intervention, allowing businesses to scale customer support effortlessly.
- Automation: By automating information retrieval and response generation, the chatbot reduces manual workload and ensures consistency in support quality.
- Context Awareness: By incorporating chat history and knowledge retrieval, the bot provides relevant, personalized, and up-to-date responses.
- Easy Customization: The system message and prompt template can be easily modified to reflect company branding or policy changes.
- Fallback Support: If the bot cannot answer a question, it proactively offers a support link, keeping the customer experience positive.
Use Cases
- Customer support for e-commerce, SaaS, or service companies.
- Answering FAQs and resolving common issues.
- Providing guided onboarding for new users.
- Scaling support during high-traffic periods.
This workflow empowers organizations to deliver responsive, accurate, and scalable customer service with minimal manual intervention, enhancing both efficiency and customer satisfaction.