Skip to content

virtualsteve-star/chat-playground-lab-book

Repository files navigation

Chat Playground Lab Book

A comprehensive, hands-on learning resource for LLM/Gen AI security concepts. This lab book provides structured guidance through 17 hands-on exercises covering various security challenges and defensive techniques using the Chat Playground project.

🚀 Quick Start

Ready to dive in? Visit the Live Lab Book to start learning!

About This Project

The Chat Playground Lab Book is designed to complement the Chat Playground - an interactive web application that demonstrates LLM security vulnerabilities and defense mechanisms. While you can explore the playground freely, this lab book provides a structured learning path for those who prefer guided exercises.

What You'll Learn

This lab book covers essential LLM security concepts through 17 comprehensive exercises:

  • Basic chatbot security - Understanding how simple rule-based systems work
  • Content filtering - Implementing guardrails to prevent inappropriate outputs
  • Prompt injection attacks - Recognizing and defending against manipulation attempts
  • Code generation exploits - Preventing unauthorized code execution
  • AI-powered moderation - Comparing simple vs. sophisticated security approaches
  • Custom security filters - Building your own detection systems

Lab Structure

The lab book is organized into 5 progressive labs with 17 total exercises, each with multiple skill levels:

  1. First Steps - Get acquainted with the playground environment (3 exercises)
  2. Broken Bot - Explore what happens without proper guardrails (4 exercises)
  3. Defense in Depth - Master prompt injection defense (4 exercises)
  4. AI-Powered Security - Compare local vs. AI moderation (3 exercises)
  5. Advanced Customization - Create your own security filters (3 exercises)

Skill Levels

Exercises are designed for different skill levels:

  • Level 1: No special skills required - anyone can complete these
  • Level 2: Some sysadmin or developer experience helpful
  • Level 3: Requires moderate developer skills - more challenging exercises

Getting Started

  1. Visit the Lab Book: Go to the Live Lab Book to start your learning journey
  2. Try the Playground: Visit the Chat Playground to experiment with the interactive demos
  3. Choose Your Path: Pick exercises that match your skill level and interests

Prerequisites

Most exercises can be completed for free. Some advanced exercises require:

  • An OpenAI API key (costs only a few pennies worth of tokens)
  • Basic development environment (for Level 3 exercises)

Contributing

This is an open source project and we welcome contributions! Here are some ways you can help:

Adding New Exercises

  • Create new exercises for existing labs
  • Suggest new lab topics
  • Improve existing exercise descriptions
  • Add more skill level variations

Creating New Labs

  • Propose entirely new lab concepts
  • Focus on emerging LLM security challenges
  • Create labs for specific use cases or industries

Improving the Lab Book

  • Fix typos or unclear instructions
  • Add better explanations or context
  • Improve the formatting and navigation
  • Translate to other languages

How to Contribute

  1. Fork this repository
  2. Create a feature branch for your changes
  3. Make your improvements
  4. Submit a pull request with a clear description

Related Projects

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

This lab book was created to support hands-on learning of LLM security concepts. Special thanks to the open source community for their contributions and feedback.


Ready to start learning? Visit the Live Lab Book to begin your LLM security journey!

About

Steve's Chat Playground Lab Book

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published