Appearance
AI Chatbots
AI Chatbots in CoursePipelines provide intelligent, context-aware assistance to learners while tracking important metrics and variables throughout conversations.
Creating a Chatbot
To create a new chatbot:
Navigate to the AI Chatbots section
Click "Create New Chatbot"
Fill in the Required Details
Name
- What to Enter: A clear and descriptive name for your chatbot.
- Examples:
- "LearningGuide": Conveys that the chatbot assists learners by guiding them through course material.
- "CourseNavigator": Implies that the chatbot helps users navigate their educational content.
- Why It Matters: The name serves as the unique identifier, making it easy for both users and developers to recognize and reference the chatbot.
Description
- What to Enter: A short explanation of what your chatbot does. For example, "Helps learners understand course content and provides study tips."
- Why It Matters: The description sets clear expectations for users, ensuring they understand the chatbot’s purpose and role.
Type
- What to Choose: Select the category that best fits your chatbot:
- Code Assistant: Best for chatbots that provide programming help.
- Education: Ideal for bots designed to support general learning.
- General Purpose: Suitable for a wide range of topics.
- Specialized: Focuses on a specific subject area or niche within education.
- Why It Matters: The type helps both you and your users understand the chatbot’s focus, ensuring it meets the intended needs.
- What to Choose: Select the category that best fits your chatbot:
System Prompt
The system prompt acts like an instruction manual for your chatbot. It tells the chatbot:
Personality and Expertise
- What to Define: The type of expert the chatbot is and the tone it should use.
- Example: "You are an AI instructional advisor specializing in adult learning."
Behavior Guidelines
- What to Include: Instructions on how to interact with users, including explaining prompts and asking clarifying questions when something unexpected happens.
- Example: "Help learners understand course material through clear examples and practical tips. Provide constructive feedback and ask clarifying questions when needed."
Example System Prompt
plaintext
You are an AI instructional advisor specializing in adult learning.
Help learners understand course material through clear examples and practical tips.
Provide constructive feedback and ask clarifying questions when needed.
Why It Matters
- Consistency: Ensures the chatbot behaves consistently.
- Accuracy: Helps the chatbot offer accurate and useful assistance.
- User Experience: Enhances the overall user experience by providing clear and helpful interactions.
Variables and Analytics
Variables are like memory slots for your chatbot. They keep track of important data during conversations, enabling personalized experiences. Chatbots can track various metrics through variables:
Built-in Variables
Every chatbot automatically tracks some basic metrics:
- Total Sessions: How many times users have interacted with the chatbot.
- Average Chat Duration: The typical length of a conversation.
- Interaction Frequency: How often the chatbot is used.
- Response Patterns: Trends in how the chatbot replies.
Custom Variables
You can also set up your own variables to capture specific data points. Here are two examples:
Example 1: Learning Progress
- Name:
learner_level
- Description: Current proficiency level of the learner
- Default Value:
Beginner
- Purpose: Tracks a learner’s proficiency level, starting at "beginner" until they advance.
Example 2: Topic Mastery
- Name:
topic_understanding
- Description: Learner's understanding of the current topic (0-100)
- Default Value:
0
- Purpose: Measures the learner's grasp of a topic on a scale from 0 to 100.
Variable Types
When setting up variables, choose the appropriate type:
- String: For text or categories (e.g., "beginner", "intermediate", "advanced").
- Numeric: For numbers, such as scores or completion rates.
- Boolean: For true/false data (e.g., whether a module has been completed).
Why It Matters
Using the right variable type ensures that the data is stored correctly and can be used effectively to improve the chatbot’s interactions and overall performance.
Variable Handling
Input Variables
Chatbots can receive input variables from courses through variable mapping. These variables provide context about the learner's progress and status:
Variable Mapping
- Map course variables to chatbot inputs in the chatbot settings
- Variables are automatically passed to the chatbot during conversations
Context Injection
- Mapped variables are piped into the chatbot's context
- The chatbot receives a formatted list of inputs and their values
- Example context:
List of inputs and the learner's values: Quiz Score: 85 Course Progress: 60% Current Module: Advanced Topics
Output Variables
Chatbots can set and update variables during conversations using the built-in variable management system:
Variable Definition
- Define output variables in the chatbot configuration
- Each variable requires:
- Name
- Description
- Optional default value
Automatic Saving
- Chatbot automatically saves variables during conversations
- Variables are updated in real-time
- Values persist across chat sessions
Additional Variable Types for Chatbots
Below are some additional variable types you can use in your chatbot system, specifically tailored for e-learning.
1. Date/Time Variables
- Purpose:
Record when events occur, such as when a learner last accessed a module or completed an assignment. - Example:
- Variable Name:
last_login
- Description: Tracks the date and time when the learner last logged in.
- Variable Name:
- Usage:
Helps the chatbot remind users if they haven’t logged in for a while and analyze peak usage times.
2. Array/List Variables
- Purpose:
Store collections of items, such as the list of completed modules, topics of interest, or feedback entries. - Example:
- Variable Name:
completed_modules
- Description: A list of module identifiers that the learner has finished.
- Variable Name:
- Usage:
The chatbot can use this list to tailor recommendations for what content the learner should tackle next.
3. Object/Dictionary Variables
- Purpose:
Hold complex, structured data that involves multiple key-value pairs. This is useful for storing a learner’s profile or progress details. - Example:
- Variable Name:
learner_profile
- Description: Contains detailed information about the learner such as name, email, enrollment date, and current skill level.
- Variable Name:
- Usage:
Allows the chatbot to personalize responses by referencing specific fields within this object.
4. Enumerated (Enum) Variables
- Purpose:
Restrict a variable to a predefined set of values, which is useful for categorizing data like proficiency levels or learning stages. - Example:
- Variable Name:
proficiency_level
- Description: Learner’s current proficiency level with options like
"beginner"
,"intermediate"
, or"advanced"
.
- Variable Name:
- Usage:
Ensures consistency in data and simplifies logic when tailoring content recommendations.
5. JSON Variables
- Purpose:
Store dynamic, nested data in a structured format. Useful for settings or preferences that include multiple layers of data. - Example:
- Variable Name:
course_preferences
- Description: A JSON object that captures preferences like preferred learning format (video, text, interactive), notification settings, and content interests.
- Variable Name:
- Usage:
The chatbot can parse this data to customize the learning experience according to the learner’s preferred style and interests.
Example Usage in a Chatbot Scenario
Imagine an e-learning chatbot that helps learners navigate a course:
last_login
(Date/Time): Reminds learners if they haven't logged in recently.completed_modules
(Array/List): Tracks which modules they've finished, allowing the chatbot to recommend the next module.learner_profile
(Object/Dictionary): Personalizes greetings and feedback using stored profile data.proficiency_level
(Enum): Adjusts the difficulty of content or the tone of explanations based on the learner's proficiency.course_preferences
(JSON): Customizes how the chatbot presents information based on the learner's preferred format and interests.
Using these diverse variable types allows your chatbot to collect detailed, structured data and use it for meaningful personalization, enhanced tracking of learner progress, and an improved overall user experience.
Variable Usage Best Practices
Input Variables
- Map only relevant course variables
- Use clear, descriptive variable names
Output Variables
- Define variables that track meaningful metrics
- Update variables at appropriate conversation points
- Use consistent value formats
Performance Considerations
- Variables are updated asynchronously
- Updates don't block conversation flow
- Multiple variables can be updated simultaneously
Technical Implementation
The variable handling system uses a robust implementation:
Conversation Initialization
- When a chat starts, the system:
- Retrieves mapped course variables
- Fetches current learner values
- Formats variable context for the AI model
- When a chat starts, the system:
Error Handling The system includes robust error handling for:
- Missing variable definitions
- Failed value updates
- Invalid variable mappings
- Database connectivity issues
Managing Variables Through the Pipeline Editor
Variable Mapping To map course variables to chatbot inputs:
- Navigate to chatbot settings
- Select course variables from available list
- Map to chatbot variable names
- Values will automatically flow to chatbot during conversations
Real-time Monitoring The chatbot interface provides:
- Live variable value updates
- Visual indicators for value changes
- Error notifications for failed updates
- Historical value tracking
Variable Access Control Variables respect user permissions:
- Organization-level access controls
- Role-based visibility settings
- Learner data privacy protection
- Audit logging for variable changes
Course Integration
Embed chatbots in your courses:
html
<iframe
src="/chat/{chatbot_id}"
width="100%"
height="600px"
frameborder="0"
></iframe>
Best Practices
Clear Purpose
- Define specific learning objectives
- Focus on particular subject areas
- Set clear interaction boundaries
Variable Design
- Track meaningful metrics
- Use appropriate variable types
- Set sensible default values
Prompt Engineering
- Be specific about the chatbot's role
- Include example responses
- Define handling of edge cases:
- Anticipate edge cases to ensure the chatbot remains helpful even when users do something unexpected.
- Decide whether the chatbot should:
- Ask clarifying questions.
- Provide a generic fallback response (e.g., "I’m not sure I understand, can you rephrase?").
Monitoring & Optimization
- Review chat logs regularly
- Analyze variable trends
- Adjust prompts based on data
Analytics and Reporting
Access chatbot analytics through:
Dashboard View
- Real-time metrics
- Historical trends
- User engagement patterns
Variable Reports
- Detailed statistics
- Data visualizations
- Export capabilities
Performance Metrics
- Response times
- User satisfaction
- Learning outcomes
Security and Privacy
Chatbots include built-in features for:
- Data encryption
- User authentication
- Privacy compliance
- Content filtering
Troubleshooting
Common issues and solutions:
Slow Responses
- Check network connectivity
- Verify server status
- Review prompt length
Variable Tracking Issues
- Validate variable names
- Check data types
- Verify tracking setup