Skip to main content

Prerequisites

Before creating training examples, ensure you have:

Account & Agent Setup

  • StateSet account with API access
  • At least one agent created and configured
  • API credentials from the StateSet Dashboard

Technical Requirements

  • Node.js 16+ installed (for SDK examples)
  • Basic understanding of REST APIs and JavaScript
  • Text editor for JSON/code editing

Training Data

  • Collection of real customer conversations for training data
  • Access to your customer support team for example validation
  • Understanding of your brand voice and service standards

Domain Knowledge

  • Familiarity with machine learning concepts (helpful)
  • Understanding of conversational AI training principles
  • Knowledge of your customer service workflows and scenarios
Code examples focus on core API calls. For production-ready patterns (structured logging, retries, and error handling), see Error Handling Best Practices.

Introduction

Examples are the cornerstone of training effective AI agents in StateSet ResponseCX. By providing real conversation examples, you teach your agents how to handle various scenarios, maintain consistent tone, and deliver accurate responses. This guide will show you how to create, manage, and optimize examples for maximum agent performance.

What are Examples?

Examples are curated conversation snippets that demonstrate ideal agent behavior. They consist of:
  • User Input: The customer’s question or statement
  • Agent Response: The ideal response from your agent
  • Context: Metadata about the scenario (tags, categories, sentiment)
  • Annotations: Notes about why this response is effective

Why Examples Matter

Consistency

Ensure uniform responses across all agents and channels

Accuracy

Reduce hallucinations and improve factual correctness

Brand Voice

Maintain your unique brand personality in every interaction

Getting Started

1

Install the SDK

2

Initialize the Client

3

Create Your First Example

Example Categories

1. Customer Service Scenarios

Order Inquiries

Product Questions

2. Technical Support Examples

Troubleshooting

3. Sales and Upsell Examples

Subscription Upgrade

4. Complaint Resolution

Refund Request

Best Practices

1. Example Quality Guidelines

2. Organizing Examples

Create a structured taxonomy:

3. Regular Updates

Advanced Techniques

Dynamic Example Generation

Multi-turn Examples

A/B Testing Examples

Monitoring & Optimization

Performance Dashboard

Integration with Other Features

Connect with Rules

Enhance with Attributes

Next Steps

Create Your Examples Library

Download our examples template to jumpstart your library

Advanced Training Techniques

Learn how to train agents with your examples