πŸ’¬ Commenting and Uncommenting Explained

Understanding how to comment and uncomment parts of your system prompt or code is essential when building and testing your AI Agents. Commenting allows you to temporarily disable specific lines without deleting them, making it easy to test or make changes.


βœ… Why Use Comments?

  • Test new instructions or configurations safely
  • Keep notes and explanations inside your prompts
  • Temporarily turn off roles, skills, or goals without removing them
  • Control which parts of the prompt the AI reads

πŸ’» Common Comment Syntax Examples

1. JavaScript / GPT System Prompts Style:

// This is a comment. It won’t be read by the AI.
// Role: Customer Support Specialist

// To enable (uncomment), remove the two slashes:
Role: Customer Support Specialist

2. Python / YAML / Config Style:

# This is a comment line
# Goal: Help users with their questions and provide support.

# To enable (uncomment), remove the hash (#):
Goal: Help users with their questions and provide support.

3. HTML / Markdown Style:

<!-- This is a comment in HTML -->
<!-- <p>Role: Customer Support Specialist</p> -->

<!-- To uncomment, remove the <!-- and --> -->
<p>Role: Customer Support Specialist</p>


βœ… How to Use Comments Inside Your AI Agent System Prompt

Comment out roles, goals, or sections while testing new versions:

// Role: Customer Support Agent
// Goal: Assist with product-related questions and troubleshooting.

Role: Sales Agent
Goal: Focus on generating leads and booking appointments.


πŸ“ How to Uncomment

Simply remove the comment symbols from the line or block:

// Role: Customer Support Agent   β†’   Role: Customer Support Agent


πŸ’‘ Pro Tip:

Using comments is a smart way to version control your AI agent prompts. You can easily switch roles, test different personalities, or experiment without losing any of your original instructions.

This method keeps your system prompt clean, organized, and easy to manage as you improve your AI Agent.