PromptLab Docs
DocsTools
Back to App

Prompt Tuning

The Prompt Tuning page gives you a structured, layered approach to prompt construction — separate concerns, toggle layers on/off, and save your best architectures as presets.

Overview

Raw prompting in a chat box mixes everything together — the AI's role, the task instructions, the examples, and the actual user input. Prompt Tuning separates these into discrete layers that you can enable, disable, and edit independently.

This is the same approach used in production LLM applications — where system prompts, instruction templates, and few-shot examples are composed programmatically before the user's input is appended.

Layer architecture

A well-structured prompt follows a clear hierarchy. PromptLab's Tuning page makes this hierarchy explicit with four named layers:

1. SYSTEM       → Who is the AI? What are its rules?
2. INSTRUCTIONS → What task should it perform?
3. EXAMPLES     → What does a correct output look like?
4. USER INPUT   → The actual user request (variable per run)

When you click Run, all active layers are joined together and sent to the model as a single assembled prompt. The Assembled Preview in the right panel shows you exactly what gets sent.

Each layer explained

System

Defines the AI's identity, persona, and behavioral constraints.

You are an expert Python developer. 
You write clean, well-documented code with type hints.
Never use deprecated APIs.

Instructions

The task description — what the model should actually do with the user input.

Read the following code snippet and:
1. Identify any security vulnerabilities
2. Explain each issue clearly
3. Provide a corrected version

Examples (Few-Shot)

Demonstrate the expected output format with one or more input/output pairs.

Input: def greet(name): print("Hello " + name)
Output: Issue: string concatenation with user input.
Fix: Use f-string: print(f"Hello {name}")

User Input

The variable part — what changes per run. Think of this as the {{user_input}} slot in a prompt template. Type your actual query here each time you run.

Assembled preview

The Assembled Preview box in the right panel shows the full prompt that will be sent to the model — all active layers joined in order. This is critical for debugging: if the model behaves unexpectedly, check the assembled text to see if your layers are combining correctly.

Tip
Toggle individual layers on/off using the switch beside each layer name to see how each one affects the output. Disable "Examples" to see how much few-shot examples improve structure.

Saving presets

Click Save Preset to store the current layer configuration with a name. Presets are saved to your account and accessible from the Presets tab. Load a preset to restore all layers and settings exactly as saved.

Use presets to maintain reusable prompt templates for different use cases — one preset for code review, another for content summarization, etc.