Lewati ke konten utama

Conversation Flow

Overview

Conversation Flow is the dynamic conversational pathway between a user and an agent in the Perfect10 platform. This system is designed to provide contextual, personalized, and relevant responses based on user input and ongoing conversation memory.

Conversation Architecture

Main Components

1. Intent & Entity Recognition

  • The system identifies the intent behind the user's input.
  • Detects key entities such as product names, dates, numbers, locations, etc.

2. Memory (Short-Term & Long-Term)

  • Short-Term Memory: Context from the most recent messages.
  • Long-Term Memory: Explicitly stored key facts, such as user preferences, ticket IDs, etc.

3. RAG (Retrieval-Augmented Generation)

  • The system retrieves additional information from the Knowledge Base when needed.
  • Can be triggered automatically or by the agent.

4. Response Generation

  • Uses an LLM (e.g., Gemini, GPT-4) to compose responses based on input, memory, and relevant documents.

5. Conversation Routing (Optional)

  • Redirects the conversation to a different agent or a human if needed.
  • Used in complex workflows (e.g., customer service escalation, internal approvals, etc.).

Conversation Modes

Perfect10 supports several conversation types:

ModeDescription
Open ChatFreeform conversation without structural constraints
Form-likeStructured interaction, e.g., filling out forms, surveys, or registrations
Guided FlowUses buttons, quick replies, and predefined scenarios
Multi-turn ReasoningEnables the system to address complex questions step-by-step

Example Conversation Flow

Case 1: Customer wants to check delivery status

  1. User: "I want to know the status of my order."
  2. Agent: "Could you provide your order number?"
  3. User: "INV-3921"
  4. Agent:
    • Checks the system via API
    • Responds: "Your order INV-3921 is currently being packaged and will be shipped tomorrow."

Case 2: Financial calculation using Calculator Tools

  1. User: "I need to calculate the compound interest for my investment."
  2. Agent: "I can help you with that! Please provide the principal amount, interest rate, and time period."
  3. User: "Principal: $10,000, Rate: 8% per year, Time: 5 years"
  4. Agent:
    • Uses Calculator Tools: 10000 * (1 + 0.08)^5
    • Responds: "Your investment will grow to $14,693.28 after 5 years with compound interest."

Case 3: Statistical analysis using Calculator Tools

  1. User: "What's the average score of my students?"
  2. Agent: "Please provide the student scores."
  3. User: "Scores: 85, 92, 78, 88, 95, 82"
  4. Agent:
    • Uses Calculator Tools: (85 + 92 + 78 + 88 + 95 + 82) / 6
    • Responds: "The average score is 86.67."

Action Integration (Agent Action)

Agents can perform specific actions, such as:

  • Mathematical Calculations: Using Calculator Tools for financial analysis, statistical computations
  • Web Search: Querying external APIs for real-time information
  • URL Access: Retrieving content from web pages
  • Data Processing: Saving data to a database, triggering internal workflows
  • API Integration: Executing plugins or commands through external services

Tips for Designing Conversation Flows

  • Use a consistent agent persona.
  • Create fallback responses for unrecognized inputs.
  • Avoid asking too many questions in a single response.
  • Implement input validation in structured chat modes.
  • Consider using quick replies for faster interactions.

Logging & Analysis

Every conversation flow is logged in detail:

  • User and agent messages
  • Documents used (if RAG)
  • Actions executed
  • Response time and token usage
  • Session ID for tracking