Prompt Tuning
Interactions with conversational AI aren’t limited to a single sentence or prompt. As you expand the dialog, you provide additional context. Fine-tuning your prompts in response to the AI’s output is called “prompt tuning.”
In this lesson:
- Fine-tuning your prompts
- Iterations
- Methods
Fine-tuning
When conversing with AI, re-focus on your task to stay on the subject and ask the right questions. Your goal is to get the best results with the fewest prompts. Avoid trial-and-error.
Goal: Get the best results with the fewest prompts
Look at your previous prompt. Does your prompt explain the request, provide context, details, and specify an output format? How can the original prompt be improved?
- Read and understand the AI’s response
- Re-focus on the task
- Ask a relevant follow-up question
“Tell me more about…” is a commonly-used follow-up prompt that asks the AI model to expand on a topic. The original prompt now takes the shape of a dialog, like a conversation between two people. Another helpful prompt is, “How can I improve my prompt?”
Add Context
Any new data you introduce becomes context for the conversation. This information can be thought of as extra highlights, constraints, keywords, or parameters of the discussion. Add plenty of context but stick to the topic.
Examples:
[User]: “I run a lighting store.”
[User]: “I run a lighting store in Eureka, CA.”
[User]: “We sell lamps, shades, bulbs, and mirrors.”
[User]: “We do installations.”
Provide feedback
The AI model responds appropriately to positive and negative reinforcement.
Examples:
[User]: “No, that’s not what I meant.” (negative)
[User]: “Let’s talk about…” (neutral)
[User]: “That’s a great idea!” (positive)
Iterations
Prompt tuning is an iterative process; that is, it repeats. With each turn of the conversation, you give more instruction or information to the system and get closer to accomplishing your task.
“Itero” is Latin for, “repeat.”
Your prompt may be structured like a funnel-style topic paragraph that goes from general to specific.
- State the general topic
- Provide supporting evidence
- State the conclusion
Example:
[User]: “Based on [the topic] and considering [the points you raised], how does this support [my conclusion]?”
Simplify the complex
If you want simple answers to complex questions, start with general, open-ended questions, then narrow your topic with more specific, close-ended questions. If many details are still floating around, you might be missing a connection.
Example: “How does X affect Y in relation to Z?”
Break the complex job into smaller parts. What are X, Y, and Z? How are they connected? If the results are ambiguous, your request might be poorly defined, imprecise, or lack proper context.
Creatives
If using AI for creative purposes, you can dictate feeling, sentiment, tone, and style.
Examples:
[User]: “Make it more moody.”
[User]: “Make it cheerful.”
[User]: “Add an elf with a hat, a magical mirror, and an enchanted lute.”
[User]: “The forest should be darker with lots of ravens.”
Methods
Expansion prompts
Expansion prompts ask the AI to expand, explain, or give more detail, on a topic. Expansion prompts provide more insight and perspective to the conversation.
Examples:
[User]: “Tell me more about…”
[User]: “What’s missing in my analysis?”
[User]: “Give me some suggestions for …”
Verification prompts
Verification prompts are a way of authenticating the AI’s response. For example, “How did you reach that conclusion?” Verification prompts are a useful way to frame or re-focus on the topic.
Examples:
[User]: “How sure are you about that?”
[User]: “Can you provide sources or evidence to support your claim?”
[User]: “Is there any research to back that up?”
Clarification prompts
If the system’s response isn’t clear, ask for clarification! Clarification prompts tell the AI to explain its response.
Examples:
[User]: “What did you mean by …”
[User]: “Please explain […] in simple terms.”
[User]: “I don’t know what […] is. I’m not a rocket scientist.”
The large language model is designed to be chatty and keep up the conversation which can lead to triviality if you lose sight of your purpose. Stay focused on the task. Even if you’re not a great conversationalist, you can rely on the system for help, simply by asking, “How can I improve my prompt?”
If you make a mistake, the chat might not correct the error, unless you request it.
Example:
[User]: “Why is the sea red?”
[Chat]: “The sea may turn red due to algae blooms.”
[Expected response]: “The sea is blue, not red.”
What’s next?
This concludes the lesson on advanced iterative prompting, or “prompt tuning.” You now have the skills to perform most tasks in conversational AI. In the final lesson we’ll look at AI etiquette to get improved results.