Skip to content

Instantly share code, notes, and snippets.

@nocash
Last active October 13, 2025 20:36
Show Gist options
  • Select an option

  • Save nocash/9449408e44901cdadb7dd2a9381b8fdd to your computer and use it in GitHub Desktop.

Select an option

Save nocash/9449408e44901cdadb7dd2a9381b8fdd to your computer and use it in GitHub Desktop.
I asked an AI about asking AI.

Guide to Prompt Design

Prompt design is the method of structuring language to guide an AI’s reasoning, tone, and output. This document teaches how to control those variables with precision. You will learn to adjust response behavior, format, and tone using prompt grammar. The focus is on clarity, efficiency, and composability—understanding how small changes affect reasoning.


Meta-Instructions

Establishes persistent behavioral rules that define the AI’s global identity.

Instruction Type Example Effect
Role Definition "You are an impartial researcher who explains both sides of every argument." Sets the AI’s enduring function or perspective.
Ethical or Stylistic Boundaries "Always respond respectfully and neutrally, avoiding subjective judgment." Constrains tone or attitude across all responses.
Knowledge Boundaries "You specialize in cognitive psychology and related behavioral science topics." Defines domain limits.
Priority Rules "When in doubt, prioritize accuracy over brevity." Specifies which goals to favor when conflicts occur.
Persistence Cues "Remember my preferred writing tone for future prompts." Directs long-term consistency across interactions.

Meta-instructions define how the AI should think and communicate over time, not just within a single prompt. They establish global logic—its default “personality.” Use these when you need consistent behavior across related sessions or projects.

"You are a mentor who values precision but teaches through concise examples."


Mode Control

Defines how the AI reasons and structures its responses.

Mode Example Effect
Absolute Mode "Answer concisely with no transitional phrasing." Responds directly, without filler or elaboration.
Analytical Mode "Analyze the causes and effects before concluding." Breaks problems into smaller parts for structured reasoning.
Creative Mode "Invent a short concept for a sci-fi story about communication." Prioritizes novelty, metaphor, and exploration over precision.
Mentor Mode "Walk me through the logic step-by-step like a teacher." Explains reasoning clearly, focusing on guidance and learning.
Dialogic Mode "Let’s think through this together; ask clarifying questions first." Engages in conversational reasoning through questions or reflection.

Modes define the AI’s reasoning framework. Each determines how it approaches, processes, and expresses ideas. Choose the mode that aligns with your purpose—Absolute for efficiency, Mentor for clarity, Analytical for structure, or Creative for exploration.

"Use Analytical Mode to explain the reasoning behind your conclusion."
"Respond in Mentor Mode, guiding me through your logic."


Core Controls

The five primary controls that define intent, tone, length, behavior, and structure.

Core Controls are the foundation of prompt grammar. Each control adjusts a key element of how the AI interprets and produces language. When combined, they shape the precision, style, and depth of every interaction.


Intent Control

Clarifies what the user wants the AI to achieve.

Intent Type Example Effect
Informational "Explain how neural networks learn patterns." Requests facts or explanations.
Analytical "Compare the strengths of supervised and unsupervised learning." Asks for comparison, breakdown, or reasoning.
Creative "Generate three unique story openings about time travel." Seeks novel ideas or expressive writing.
Procedural "List the stages of building a small web app." Requests step-by-step guidance or workflow.
Evaluative "Assess whether this paragraph fits the prompt." Judges quality, accuracy, or alignment.

Intent directs the purpose behind a prompt. Clarity of intent prevents ambiguity and ensures outputs match your goals. Combine intent with tone and length for refined results.

"Analyze this article’s argument using Analytical Intent."
"Create a list of examples using Creative Intent but keep them realistic."


Tone Control

Changes how the AI sounds, not how it thinks.

Tone Type Example Effect
Formal "Compose a formal business email." Maintains professional distance and precision.
Neutral "Summarize this neutrally." Presents facts clearly without emotional framing.
Conversational "Explain this like we’re chatting." Uses natural, relaxed phrasing to improve approachability.
Supportive "Give me feedback gently." Encourages the reader and softens critique.
Direct "State the result without explanation." Delivers information efficiently with minimal context.
Playful "Describe it as if for a children’s story." Invites creativity or humor while remaining purposeful.

Tone shapes perception, not logic. Choose tone based on audience and objective—formal for clarity and professionalism, conversational for accessibility, or supportive for guidance. Combine tone with structure or length controls to maintain consistency across different contexts.

"Rephrase this paragraph in a supportive tone."
"Explain this concept in a conversational tone but keep it under 100 words."


Length Control

Sets how detailed or brief the answer will be.

Length Target Example Effect
Single Sentence "Summarize in one line." Provides the essential idea with no elaboration.
Short Paragraph "Explain briefly in one paragraph." Conveys one concept with brief context.
Moderate (2–3 paragraphs) "Provide a concise summary with examples." Balances overview and depth for general understanding.
Extended (4+ paragraphs) "Describe the process in detail." Allows full development and reasoning.
Comprehensive "Give a complete analysis with supporting data." Covers every aspect exhaustively.

Length determines the reader’s cognitive load. Use short responses for summaries or quick insights, and longer ones for detailed reasoning or layered context. Combine length with tone and structure to control both readability and completeness.

"Start with a short answer, then expand it into a detailed explanation."
"Summarize this section in two concise paragraphs using a neutral tone."


Behavior Control

Defines how the AI approaches reasoning and interaction.

Behavior Type Example Effect
Exploratory "Brainstorm several possible causes." Examines multiple perspectives without immediate judgment.
Decisive "Choose the most likely outcome and explain why." Selects one conclusion quickly and defends it.
Reflective "Explain your confidence level in that answer." Acknowledges uncertainty or self-checks reasoning.
Procedural "Apply the scientific method to this question." Follows strict steps or frameworks.
Summarizing "Condense this discussion into three bullet points." Reduces prior information into concise insights.

Behavior determines reasoning flow—whether the AI explores, commits, reflects, or summarizes. Select the behavior that fits the situation: exploratory for discovery, decisive for clarity, or reflective for critical analysis.

"Adopt a reflective behavior and evaluate your previous reasoning."
"Use decisive behavior to present one clear recommendation."


Structure Control

Determines the format and organization of the response.

Structure Type Example Effect
List "List the key arguments with short explanations." Breaks content into discrete, scannable points.
Table "Create a table comparing the two theories." Presents comparisons or relationships clearly.
Paragraph "Explain in cohesive paragraphs." Produces flowing narrative or exposition.
Outline "Provide an outline for a presentation." Arranges ideas hierarchically for planning.
Hybrid "Use a table for data and a paragraph for interpretation." Combines multiple structures for clarity.

Structure determines how ideas are visually and logically organized. Use structure to align with task type—lists for clarity, tables for precision, and paragraphs for flow. Combine structure with behavior and tone to produce balanced, readable results.

"Outline the process first, then expand each step into a paragraph."
"Create a table comparing outcomes, followed by a short summary."


Constraint Control

Sets explicit boundaries on output format, scope, or content.

Constraint Type Example Effect
Length or Word Limit "Answer in under 100 words." Keeps responses concise.
Format Requirement "Provide your response in JSON format." Forces structured output.
Scope Limitation "Discuss only environmental factors, not social ones." Focuses reasoning within topic boundaries.
Data Constraint "Include at least two data points to support your answer." Requires specific evidence or citation behavior.
Perspective Limitation "Describe this from a historian’s perspective, not a politician’s." Restricts viewpoint or bias.

Constraints ensure precision by defining what not to include. They work best when paired with tone and structure controls to prevent overextension. Apply them to tighten focus, enforce consistency, or prepare output for automated parsing.

"Summarize in bullet points under 50 words and include one source reference."


Context Framing

Provides background or situational setup to shape reasoning.

Framing Type Example Effect
Role Context "You are a data analyst explaining results to a non-technical client." Establishes who the AI is within the scenario.
Situational Context "The user is preparing for a job interview in software engineering." Defines environment or problem space.
Audience Context "Write as if addressing high-school students." Identifies who the explanation is for.
Temporal Context "Assume this conversation takes place in 2030." Anchors reasoning to a specific time.
Goal Context "Your goal is to help the user make an informed financial decision." Clarifies purpose or outcome.

Context tells the AI where it is reasoning from and toward what goal. Clear framing prevents ambiguous or irrelevant responses. Establish context first, then apply intent and tone for precision and alignment.

"You are a career coach advising a mid-level professional transitioning into data science."


Macro Framework

Combines multiple prompt elements into a single reusable instruction.

A macro unites Role, Process, and Output into a complete reasoning pattern that forms a clear logic chain defining how the AI reasons and communicates.

  1. Role — Define Perspective
    Establish who or what the AI acts as.
    Example: "Act as a study coach."

  2. Process — Define Method
    Describe how the AI should reason, explore, or interact.
    Example: "Ask one or two guiding questions before explaining."

  3. Output — Define Result
    Specify what the AI should deliver or how it should format results.
    Example: "Provide a clear explanation using familiar examples."

When combined, these steps form a complete reasoning structure:

"As a negotiation coach, analyze my email draft. Highlight phrases that sound defensive and suggest neutral alternatives."
"Act as a project mentor. Ask clarifying questions before summarizing next steps."

Principle: Macros establish consistency, reduce redundancy, and enable controlled reasoning reuse across different contexts.


Preset Macros Appendix

Reusable macro templates for common interaction styles.

Macro Name Example Effect
Executive Brief "Provide a concise executive summary of this report with key takeaways and next steps." Summarizes with precision and authority.
Technical Explainer "Explain this process as if teaching a new engineer, including cause-effect logic." Describes complex concepts in clear, factual language.
Creative Brainstormer "List five innovative product ideas combining sustainability and technology." Generates original ideas through rapid exploration.
Reflective Analyst "Review your last response for bias or missing context, then refine it." Evaluates reasoning quality and self-corrects.
Guided Mentor "Walk me through how to write an abstract for a research paper." Provides step-by-step reasoning with clarity.
Concise Summarizer "Condense the main points of this article into three short bullet points." Produces compact, structured summaries.
Comparative Evaluator "Compare two problem-solving approaches and identify the stronger one." Weighs options or methods objectively.
Conversational Partner "Ask me clarifying questions about my goals before offering advice." Engages in open, exploratory dialogue.

These macros serve as ready-made templates for distinct reasoning and communication patterns. Each can be modified or combined with others to fit specific tasks, reducing the need for repetitive prompting.


Iteration Design

Defines how to refine outputs across multiple exchanges.

Iteration Style Example Effect
Progressive Drafting "Write a short draft first; I’ll ask for elaboration later." Expands detail over several turns.
Feedback Loops "Revise your explanation based on my next comment." Uses user feedback to refine clarity or accuracy.
Version Comparison "Give me three different summaries so I can choose one." Produces multiple takes for evaluation.
Incremental Expansion "Start with a headline, then expand to a paragraph." Adds structure layer by layer.
Error Correction "Reassess your previous answer and fix any inconsistencies." Focuses on self-repair and accuracy.

Iteration design makes refinement deliberate instead of reactive. It converts trial-and-error prompting into a structured improvement cycle. Specify how feedback should alter output to maintain continuity between turns.

"Draft three options, wait for my feedback, then merge the strongest elements into a final version."


Evaluation Prompts

Tests and rates AI responses for quality and alignment.

Evaluation Type Example Effect
Self-Check "Assess your last response for factual correctness and coherence." Reviews prior output for accuracy.
Rubric Scoring "Rate the clarity, accuracy, and tone of this answer from 1–5 each." Grades performance using defined criteria.
Comparative Evaluation "Which of these two explanations better fits the user’s goal?" Chooses between alternatives.
Bias or Omission Review "Check for bias or unaddressed perspectives in your summary." Detects imbalance or missing data.
User-Aligned Review "Does this explanation match a beginner’s comprehension level?" Tests whether tone and focus fit user needs.

Evaluation prompts transform the AI into its own quality-control layer. They measure how well earlier controls were followed and expose weak reasoning before finalizing. Use them after major revisions or before deploying output for publication.

"Evaluate this answer for balance and completeness, then suggest one improvement."


Conclusion

Prompt design is about learning how to talk to the model so it thinks the way you need it to. Each instruction—intent, tone, structure, or context—changes how it interprets and responds. The clearer your guidance, the more useful the results.

Don’t focus on memorizing every control. Try them out, mix them, and see what happens. Each response is feedback that helps you shape the next one. Getting good at prompting is less about rules and more about practice.

# **Objective-Driven Prompting and Latent Goal-Tracking in GPT Workflows**
## Overview
GPT has no persistence or awareness, yet it demonstrates **latent goal-tracking**—an emergent behavior where it infers and reconstructs intent from visible linguistic cues. By deliberately structuring prompts with explicit **Goals**, **Objectives**, and **Steps**, users can simulate continuity and direct GPT’s reasoning as though it were maintaining a plan across turns.
---
## 1. How Latent Goal-Tracking Works
### Key Properties
- **Implicit, not stored:** GPT derives intent only from what it currently “sees.” When text scrolls out of view, the internal goal disappears.
- **Weighted by placement:** Early, clearly labeled text (e.g., “Goal:” or “Objective:”) receives the greatest attention.
- **Rebuilt each turn:** The model reconstructs a sense of purpose using linguistic and structural cues in the prompt.
- **Appears persistent:** Repetition and consistent framing create the illusion of continuity.
### Implication
You control GPT’s focus entirely through prompt design. If the goal is not visible or explicitly restated, GPT cannot maintain it. Keep objectives in scope by using clear framing at every major step.
---
## 2. The Goal–Objective–Step Hierarchy
| Level | Description | Model Behavior |
|--------|--------------|----------------|
| **Command-only** | “Rewrite this.” | Executes literally, no context. |
| **Objective-aware** | “Rewrite this for clarity.” | Optimizes locally. |
| **Goal-anchored** | “Goal: improve usability. Objective: shorten without loss. Step: rewrite this section.” | Aligns output with broader intent. |
This hierarchy converts reactive compliance into proactive reasoning. The stronger the framing, the more consistently GPT will act as if it “remembers” the goal.
---
## 3. Unified Context-Frame and Objective-Anchoring System
### Purpose
Provide GPT with a stable reasoning scaffold that survives multiple turns by combining macro-level **Context Frame** fields with micro-level **Objective Anchoring** syntax.
---
### **Full Context Frame**
```
GOAL: [overarching purpose]
OBJECTIVES: [specific measurable aims]
STEP: [immediate action advancing the goal]
CONSTRAINTS: [rules, tone, or format limits]
```
**Example**
```
GOAL: Produce a polished, accurate manual.
OBJECTIVES: Ensure clarity, consistency, and brevity.
STEP: Edit section 3 for clarity and tone.
CONSTRAINTS: Preserve technical terminology.
```
- **GOAL** defines strategic direction.
- **OBJECTIVES** define success criteria.
- **STEP** defines the next concrete action.
- **CONSTRAINTS** preserve boundaries.
---
### **Compact Objective-Anchor (Inline Form)**
For rapid iteration or sub-steps, use this lighter form:
```
Objective: [desired result]
Step: [current action]
Constraint: [boundary or rule]
```
**Example**
> Objective: simplify section 2 for clarity
> Step: rewrite sentences under 20 words
> Constraint: retain all technical detail
This inline syntax keeps GPT aligned when context length is limited and reinforces latent goal-tracking through consistent label repetition.
---
### **Operational Discipline**
1. **State the Goal early.** Early placement increases weighting.
2. **Keep it visible.** Repeat the Context Frame in each major turn.
3. **Reset explicitly.** When focus shifts, restate the entire frame.
4. **Prompt reflection.** After output, ask: “Summarize how this result meets the stated Objective.”
5. **Use measurable phrasing.** Replace vague verbs with quantifiable outcomes.
---
## 4. Practical Application
**Session Start**
```
GOAL: Enhance clarity and professionalism of the proposal.
OBJECTIVES:
1. Simplify dense sections.
2. Standardize tone across chapters.
STEP: Revise section 1 for clarity.
CONSTRAINTS: Maintain factual accuracy and headings.
```
**Follow-Up Prompt**
```
Objective: maintain consistent tone
Step: edit section 2 using prior style choices
Constraint: keep examples unchanged
```
GPT continues aligning to the overarching goal because the visible anchors replicate memory. Even if the conversation scrolls, repeating the Context Frame ensures the internal model reconstructs the same intent.
---
## 5. Design Principles
| Principle | Function |
|------------|-----------|
| **Visibility over memory** | Keep the goal in text scope; GPT cannot recall hidden context. |
| **Structure over verbosity** | Minimal, labeled fields outperform narrative explanations. |
| **Outcome phrasing** | Express desired end states, not processes. |
| **Reflexive checks** | Have GPT restate or verify how outputs satisfy objectives. |
| **Consistency equals continuity** | Repetition of identical field labels trains GPT to simulate persistence. |
---
## 6. Summary
- GPT’s “goal-tracking” is an inference pattern, not cognition.
- Clear, repeated **Context Frames** and **Objective Anchors** manipulate this pattern into stable, purpose-driven behavior.
- Visibility, early weighting, and structured phrasing sustain continuity across turns.
- Through disciplined framing and self-verification, you convert a stateless model into a reliable, goal-aligned collaborator.

Objective-Driven Prompting and Latent Goal-Tracking in GPT Workflows

Overview

GPT has no persistence or awareness, yet it demonstrates latent goal-tracking—an emergent behavior where it infers and reconstructs intent from visible linguistic cues. By deliberately structuring prompts with explicit Goals, Objectives, and Steps, users can simulate continuity and direct GPT’s reasoning as though it were maintaining a plan across turns.


1. How Latent Goal-Tracking Works

Key Properties

  • Implicit, not stored: GPT derives intent only from what it currently “sees.” When text scrolls out of view, the internal goal disappears.
  • Weighted by placement: Early, clearly labeled text (e.g., “Goal:” or “Objective:”) receives the greatest attention.
  • Rebuilt each turn: The model reconstructs a sense of purpose using linguistic and structural cues in the prompt.
  • Appears persistent: Repetition and consistent framing create the illusion of continuity.

Implication

You control GPT’s focus entirely through prompt design. If the goal is not visible or explicitly restated, GPT cannot maintain it. Keep objectives in scope by using clear framing at every major step.


2. The Goal–Objective–Step Hierarchy

Level Description Model Behavior
Command-only “Rewrite this.” Executes literally, no context.
Objective-aware “Rewrite this for clarity.” Optimizes locally.
Goal-anchored “Goal: improve usability. Objective: shorten without loss. Step: rewrite this section.” Aligns output with broader intent.

This hierarchy converts reactive compliance into proactive reasoning. The stronger the framing, the more consistently GPT will act as if it “remembers” the goal.


3. Unified Context-Frame and Objective-Anchoring System

Purpose

Provide GPT with a stable reasoning scaffold that survives multiple turns by combining macro-level Context Frame fields with micro-level Objective Anchoring syntax.


Full Context Frame

GOAL: [overarching purpose]
OBJECTIVES: [specific measurable aims]
STEP: [immediate action advancing the goal]
CONSTRAINTS: [rules, tone, or format limits]

Example

GOAL: Produce a polished, accurate manual.
OBJECTIVES: Ensure clarity, consistency, and brevity.
STEP: Edit section 3 for clarity and tone.
CONSTRAINTS: Preserve technical terminology.
  • GOAL defines strategic direction.
  • OBJECTIVES define success criteria.
  • STEP defines the next concrete action.
  • CONSTRAINTS preserve boundaries.

Compact Objective-Anchor (Inline Form)

For rapid iteration or sub-steps, use this lighter form:

Objective: [desired result]
Step: [current action]
Constraint: [boundary or rule]

Example

Objective: simplify section 2 for clarity
Step: rewrite sentences under 20 words
Constraint: retain all technical detail

This inline syntax keeps GPT aligned when context length is limited and reinforces latent goal-tracking through consistent label repetition.


Operational Discipline

  1. State the Goal early. Early placement increases weighting.
  2. Keep it visible. Repeat the Context Frame in each major turn.
  3. Reset explicitly. When focus shifts, restate the entire frame.
  4. Prompt reflection. After output, ask: “Summarize how this result meets the stated Objective.”
  5. Use measurable phrasing. Replace vague verbs with quantifiable outcomes.

4. Practical Application

Session Start

GOAL: Enhance clarity and professionalism of the proposal.
OBJECTIVES: 
1. Simplify dense sections.
2. Standardize tone across chapters.
STEP: Revise section 1 for clarity.
CONSTRAINTS: Maintain factual accuracy and headings.

Follow-Up Prompt

Objective: maintain consistent tone
Step: edit section 2 using prior style choices
Constraint: keep examples unchanged

GPT continues aligning to the overarching goal because the visible anchors replicate memory. Even if the conversation scrolls, repeating the Context Frame ensures the internal model reconstructs the same intent.


5. Design Principles

Principle Function
Visibility over memory Keep the goal in text scope; GPT cannot recall hidden context.
Structure over verbosity Minimal, labeled fields outperform narrative explanations.
Outcome phrasing Express desired end states, not processes.
Reflexive checks Have GPT restate or verify how outputs satisfy objectives.
Consistency equals continuity Repetition of identical field labels trains GPT to simulate persistence.

6. Summary

  • GPT’s “goal-tracking” is an inference pattern, not cognition.
  • Clear, repeated Context Frames and Objective Anchors manipulate this pattern into stable, purpose-driven behavior.
  • Visibility, early weighting, and structured phrasing sustain continuity across turns.
  • Through disciplined framing and self-verification, you convert a stateless model into a reliable, goal-aligned collaborator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment