Bots – Advanced

Lesson: Refining Bot Instructions in Preview Mode

Learn how to tune and fix your Noca AI bot’s behavior on the fly by rating responses in Preview/Debug mode and generating updated bot instructions using natural language.

Prerequisites

Before starting this guide, ensure you have:

  • Access to your Noca AI workspace.

  • A draft or active Noca Bot ready for testing.

What is On-the-Fly Instruction Tuning?

Instead of manually editing complex system instructions when a bot gives an unwanted answer:

  • You can test your bot inside Debug/Preview Mode.

  • Rate any response as Good or Bad.

  • Provide simple plain-text feedback explaining what should change.

  • Noca AI automatically analyzes your feedback, modifies the bot’s system instructions, and re-tests the message immediately.

Step 1: Open Debug/Preview Mode

  1. In the Noca AI editor toolbar (top right), click the drop-down menu next to Publish & Run.

  2. Select Debug draft version.

  3. The preview window will launch, initiating a fresh chat session with your bot.

Step 2: Test Greetings and Initial Prompts

  1. Observe the initial welcome message from the bot.

  2. Below the bot’s message bubble, you will see two rating options: Good and Bad.

  3. Click Bad to trigger the instruction modification modal.

Step 3: Prompt Your Desired Change

  1. In the modal popup (“Change the welcome message?”), describe the behavior or tone you want in plain language.

    • Example: "Always be direct" or "Make it warmer and mention we can help with billing."

  2. Click Analyze.

  3. Noca AI will process your request and present an Instruction changes diff view showing the original logic vs. the proposed update (e.g., updating the greeting from “How has your day been so far?” to “Hello! What can I help you with?”).

Step 4: Approve and Save Changes

  1. Review the proposed instruction update.

  2. Click Approve.

  3. Click Save 1 Change.

  4. The chat interface will automatically update with the revised greeting.

Step 5: Refine Subsequent Bot Logic & Guardrails

You can also use this feedback workflow to enforce strict guardrails during live conversation flows:

  1. Type a message or off-topic question into the chat (e.g., “What time is it in New York?”).

  2. After the bot answers, click Bad below the response bubble.

  3. In the feedback input, specify your constraint (e.g., "Never answer anything unrelated to Salesforce").

  4. Click Analyze. Noca AI will generate a new restriction under Additional Instructions.

  5. Click Approve and then Save 1 Change.

Step 6: Verify the Updated Behavior

  1. After saving, the bot will automatically re-run your prompt against the updated instruction set.

  2. Verify that the bot now adheres to your new rule (e.g., replying: “Sorry, I can only help with Salesforce-related questions.”).

  3. Continue testing and rating responses as needed to build a robust, well-behaved AI assistant!