Skip to content

Conversation

@pedrocassalpacheco
Copy link
Contributor

Summary

This PR adds a comprehensive example demonstrating the differences between multi-turn and single-turn agents in Contextual AI through practical testing scenarios.

What's Added

  • New Example Notebook (17-multi-turn/multi_turn.ipynb): Interactive demonstration comparing agent behaviors
  • Comprehensive README (17-multi-turn/README.md): Detailed documentation with setup, concepts, and use cases
  • Main README Update: Added entry for the new multi-turn example in the table of contents

Key Features

  • Systematic Testing Framework: Creates identical agents with only the enable_multi_turn setting different
  • Memory Validation: Tests agent ability to remember conversation context using simple, verifiable facts
  • Conversation Continuity: Demonstrates how to use conversation_id to maintain context across sessions
  • Comprehensive Documentation: Includes configuration examples, troubleshooting, and real-world use cases

Test Scenarios

The notebook validates 5 key behaviors:

  1. ✅ Multi-turn agent remembers favorite color across messages
  2. ✅ Multi-turn agent remembers pet information
  3. ✅ Single-turn agent correctly forgets previous context
  4. ✅ Single-turn agent treats each message independently
  5. ✅ Conversations can be resumed using conversation_id

Educational Value

  • Clear explanation of when to use multi-turn vs single-turn agents
  • Practical code examples for both configurations
  • Best practices for conversation management
  • Troubleshooting guide for common issues

Use Cases Covered

Multi-Turn Ideal For:

  • Customer service chatbots
  • Interactive tutorials
  • Complex problem-solving sessions

Single-Turn Ideal For:

  • FAQ systems
  • Stateless API endpoints
  • Simple classification tasks

This example helps developers understand conversation state management and choose the right agent type for their specific use case.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a comprehensive example demonstrating multi-turn vs single-turn agent behavior in Contextual AI through systematic testing and documentation.

  • Introduces interactive notebook with systematic framework to compare agent memory capabilities
  • Provides comprehensive documentation explaining concepts, configuration, and use cases
  • Updates main README to include new multi-turn example in table of contents

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
README.md Adds table entry for new multi-turn conversation example
17-multi-turn/multi_turn.ipynb Interactive notebook demonstrating multi-turn vs single-turn agents with memory validation tests
17-multi-turn/README.md Comprehensive documentation covering setup, concepts, configuration, and troubleshooting
Comments suppressed due to low confidence (1)

17-multi-turn/multi_turn.ipynb:1

  • Missing closing quote in API key placeholder string.
{

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@pedrocassalpacheco pedrocassalpacheco merged commit 72d31a3 into main Oct 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants