Skip to main content

User Guide

This guide explains how to create and manage Decision Trees and connect them to CX Assistants.

Creating a Decision Tree

Step 1: Navigate to Decision Trees

  1. Log in to the Deepdesk Admin interface
  2. In the left sidebar, navigate to Knowledge Assist > Decision Trees
  3. Click Add decision tree

Step 2: Configure Basic Settings

FieldDescription
CodeUnique identifier (lowercase letters, numbers, dashes). Cannot be changed after creation.
NameDisplay name for the decision tree
info

The code is used to reference the decision tree in Assistant configurations and API calls. Choose a meaningful, descriptive code like customer-verification or troubleshooting-steps.

Step 3: Save the Decision Tree

  1. Click Save to create the decision tree
  2. The decision tree is now ready to be populated with content
note

Unlike Knowledge Bases, Decision Trees do not have a built-in web crawler. Content must be added through external systems or the Knowledge Assist API that populates the Elasticsearch index.

Populating Decision Tree Content

Decision tree content is stored in a vector-based index for semantic search. Content should be structured as decision paths, procedures, or workflows.

Content Structure Guidelines

  1. Clear Steps: Break down procedures into discrete, actionable steps
  2. Decision Points: Include conditions that determine which path to follow
  3. Questions: Define what information is needed at each step
  4. Outcomes: Specify the resolution or next action

Example Decision Tree Content

Customer Verification Procedure:

Step 1: Ask for customer's account number or email address
- If customer provides account number, proceed to Step 2
- If customer provides email, search account by email, then proceed to Step 2

Step 2: Verify customer identity
Ask: "Can you provide your date of birth?"
- If date matches account: Customer verified, proceed to Step 3
- If date doesn't match: Ask for billing address
- If address matches: Customer verified, proceed to Step 3
- If address doesn't match: Escalate to supervisor

Step 3: Proceed with customer request
Customer is verified and you can assist with their needs.

Connecting to an Assistant

Step 1: Navigate to the Assistant

  1. Go to Assistants > Assistants
  2. Click on the Assistant you want to configure

Step 2: Set the Decision Tree

In the Assistant configuration:

  1. Find the Decision tree field
  2. Select your decision tree from the dropdown
  3. Click Save

When this field is set, the Assistant will automatically:

  • Have access to the retrieve_decision_tree tool
  • Receive instructions to use decision trees for structured guidance
  • Include conversation history when retrieving guidance

Step 3: Test the Assistant

Evaluate the Assistant with a test scenario to verify it retrieves guidance correctly:

  1. Use the Playground or API to send a question requiring procedural guidance
  2. Check that the response follows the decision tree structure
  3. Verify the Assistant asks appropriate questions
  4. Confirm it shows its reasoning and next steps

How the Assistant Uses Decision Trees

Automatic Context Analysis

When an agent asks a question, the Assistant:

  1. Analyzes the current conversation history between agent and customer
  2. Extracts relevant information (customer verification status, issue details, etc.)
  3. Calls the decision tree tool with the agent's question and conversation context
  4. Receives guidance tailored to the current situation

Interactive Guidance

The Assistant will:

  • Show its thinking: Explain which decision tree it's following and why
  • Ask one question at a time: Keep interactions simple and focused
  • Use multiple choice: Present options as numbered choices when possible
  • Skip unnecessary questions: Use information from conversation history
  • Confirm when uncertain: Ask for confirmation rather than making assumptions

Example Interaction

Agent: "Customer wants to return an item"

Assistant:

I'm following the Returns and Refunds decision tree.

First, I need to verify some information:

Is the item within the 30-day return window?
1. Yes, purchased within the last 30 days
2. No, purchased more than 30 days ago
3. Not sure, need to check order date

Agent: "1"

Assistant:

Great! The item is within the return window.

Next step - checking the item condition:

Is the item in its original packaging and unused?
1. Yes, unopened and in original packaging
2. Opened but unused
3. Used but in good condition
4. Damaged or defective

Best Practices

Content Design

  1. Be specific: Provide clear, actionable steps
  2. Use plain language: Avoid jargon and complex terminology
  3. Keep steps atomic: One action or decision per step
  4. Include edge cases: Cover exceptions and unusual scenarios

Question Design

  1. Make questions clear: Leave no room for ambiguity
  2. Provide options: Use multiple choice when possible
  3. Limit choices: Keep options to 2-5 items
  4. Order logically: Most common or important options first

Testing

  1. Test all paths: Walk through every branch of the decision tree
  2. Verify questions: Ensure questions make sense in context
  3. Check edge cases: Test with unusual or complex scenarios
  4. Include conversation context: Test with realistic conversation histories

Organization

  1. One tree per procedure: Don't combine unrelated processes
  2. Use clear names: Make the purpose obvious from the code and name
  3. Document decision logic: Include rationale for complex decisions
  4. Keep updated: Review and update procedures regularly

Troubleshooting

Assistant Doesn't Follow Decision Tree

  1. Verify the Assistant has the correct decision tree configured
  2. Check that the decision tree code matches
  3. Ensure the decision tree content is indexed in Elasticsearch
  4. Test with explicit questions that match the decision tree content

Assistant Asks Redundant Questions

  1. Check if conversation history is being passed correctly
  2. Verify the decision tree instructions are properly configured
  3. Review the decision tree content for clarity
  4. Ensure the LLM understands how to extract information from context

No Guidance Returned

  1. Verify the decision tree exists in the database
  2. Check that the Elasticsearch index exists and has content
  3. Test with different queries to see if it's a search relevance issue
  4. Review logs for errors in the tool execution

Incorrect Decision Path

  1. Review the decision tree content for accuracy
  2. Test the semantic search with various phrasings
  3. Update content to be more specific or comprehensive
  4. Consider splitting complex trees into focused sub-trees

Advanced Usage

Conversation History

The tool automatically includes conversation history when available. The history includes:

  • Messages between agent and customer
  • Message source (visitor, agent, etc.)
  • Full message content

This allows the decision tree system to:

  • Skip questions already answered in the conversation
  • Understand the current context and situation
  • Provide more targeted guidance

Multiple Decision Trees

You can create multiple decision trees for different purposes:

  • By department: Sales, support, technical
  • By process: Verification, troubleshooting, escalation
  • By product: Different procedures for different products
  • By complexity: Simple vs. complex scenarios

Each Assistant can only reference one decision tree at a time, but you can:

  • Create specialized Assistants for different use cases
  • Use routing to direct to the appropriate Assistant

Custom Headers

For advanced integrations, the retrieve_decision_tree tool supports custom headers. This can be used for:

  • Authentication with external decision tree systems
  • Custom tracking or analytics
  • Request routing