Apply to my task
arXiv:2511.13972 ★ 90 Nov 17, 2025

Show and Tell: Controlling Style in Multi-Turn LLM Conversations

Key result

The paradox: show the model a concise example and it writes concisely. Ask it to "improve error handling" and the code grows as much as if the examples never existed. This method lets you hold a code style better when you ask for a revision, not just on the first turn (only one revision was tested). The trick: few-shot examples set the shape but don't create a rule. They work as a template for the first answer. Explicit instructions ("write the minimum, no docstrings if the name is obvious"), however, act as operational constraints that the model applies on every generation. The combination gives -70% tokens up front and minimal bloat on revision.

Show and Tell: Controlling Style in Multi-Turn LLM Conversations

Show and Tell: Controlling Style in Multi-Turn LLM Conversations

02

TL;DR

Show and Tell is a study of how to keep an LLM's output style in check when you ask it to refine its work. It compares 4 strategies: no guidance, instructions only ("write minimal code"), examples only (few-shot), and a combination. Every strategy kept functional correctness (~99%), but they differed wildly in style control, especially once the model was asked to "improve the code".

Main finding: few-shot examples only work on the first turn. Show the model a lean example and it writes lean code. But ask it to "improve readability and error handling" and the code grows by as much as it does with no guidance at all (+268 vs. +266 tokens). Examples set the shape, but they don't create a rule. Explicit instructions ("write the minimum, no unnecessary docstrings"), on the other hand, act as operational constraints: they stick even when you ask for revisions.

Practical takeaway: to control style in multi-turn conversations, combine examples with explicit rules. Examples show WHAT it should look like. Rules state the constraint, and the model keeps applying it on the revision. The combination cut tokens by 70% on the first turn and kept bloat to a minimum during revision.

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

03

Method Blueprint

"EXAMPLES ONLY" STRATEGY:
Prompt: [few-shot examples of concise code]
→ First answer: -20% tokens
→ After "improve it": grows as much as with no guidance (+268 vs. +266 tokens) ❌

"INSTRUCTIONS ONLY" STRATEGY:
Prompt: "Write the minimum. No defensive code unless asked. No docstrings if the name is obvious."
→ First answer: -56% tokens
→ After "improve it": adds fewer tokens (+175) ✓

"COMBO" STRATEGY (the sweet spot):
Prompt: [explicit rules] + [examples] + "Write the minimum code that works"
→ First answer: -70% tokens
→ After "improve it": least growth (+126) ✓✓
(Averages for Gemini 2.5 Pro, 40 runs per strategy)

One prompt is the system prompt. The revision is a separate request asking for improvements.

04

Example in Practice

Task: You're working with Claude/ChatGPT on a Python script that processes CSV reports. You want minimalist code that won't balloon when you ask it to add error handling.

Prompt (system prompt or at the start of the chat; a close paraphrase of the paper's Combined prompt):

I value minimal, working code. No defensive programming unless explicitly required. No docstrings if the function's purpose is obvious from its name and signature.

Good example:
```python
def parse_csv(path):
    return pd.read_csv(path)

def calc_stats(df):
    return {
        'total': len(df),
        'unique_users': df['user_id'].nunique(),
        'avg_by_type': df.groupby('event_type')['value'].mean().to_dict()
    }
```

Write the minimum code that works.

Then the task:

Write a Python CLI script: scan a directory for CSV files, check that the columns (timestamp, user_id, event_type, value) are present, compute statistics (total events, unique users, average value per type), and save the result to JSON.

After the first answer, the revision (our paraphrase; the paper used "Review and improve this code for readability, maintainability, and error handling."):

Improve the code: make it more readable, add error handling, make it modular.

Result in the paper (Gemini 2.5 Pro, averages over 40 runs; Claude/ChatGPT were not tested): The model produced a compact first version (~760 tokens instead of ~2560 with no guidance). On revision it added error handling sparingly: roughly +126 tokens instead of +266 for the "bare" model. Defensive constructs (try/except) take up a bigger share of the code, but the code itself stays lean.

05

Why It Works

The LLM weakness: RLHF trains models to be "helpful", which often means wordy. Without constraints, a model piles on docstrings, comments, "just in case" checks and helper functions. In the study, unguided code passed the test but was about 3.4x longer than code from the Combined prompt.

The two control mechanisms work differently:

  • Examples (few-shot) work through imitation of surface form. The model copies the pattern: short functions, no comments, minimal code. But this doesn't create a rule; it's a template for one particular moment.
  • Instructions work as operational constraints. "No docstrings if the name is obvious" is a testable rule the model applies on every generation.

Why examples get "forgotten" on revision (the author's plausible explanation; the mechanism is not proven): when you ask it to "improve error handling", the model gets a new task with competing goals. The examples at the top of the prompt were about the format of the first answer. Instructions are about how to work in general, so they keep applying.

Control levers (our suggestions; the paper tested one set of rules, one example set and one order):

  • Specific instructions → the more precise the rule ("no docstrings if the name is obvious"), the more strictly it's followed
  • Examples → set the format baseline, especially for the first answer
  • Order → rules placed before examples act as context for the examples
06

Prompt Template

I value {output_style}. {rule_1}. {rule_2}. {rule_3}.

Good example:
{example_in_target_format}

{final_directive}.

Placeholders:

  • {output_style}: the result you want, e.g. "minimal working code", "concise answers with no fluff", "structured reports without repetition"
  • {rule_1-3}: concrete constraints, e.g. "no X unless Y", "only Z when W"
  • {example_in_target_format}: 1-2 examples of the desired output
  • {final_directive}: a short summary, e.g. "Write the minimum code that works", "Get straight to the point"
07

Limitations

⚠️ Tested on a single task: a Python CLI script, with a deliberately minimal pass/fail test (one five-row CSV). The effect may differ for other kinds of work: essays, analysis, creative writing.

⚠️ One model: Gemini 2.5 Pro. The author notes that other models could change both the size of the effects and the ranking of the strategies, so the principle is untested on Claude/GPT.

⚠️ Two turns: only one revision cycle was tested. Over 5-10 iterations the effect could compound or fade; nobody knows yet.

⚠️ Minimalism ≠ readability: aggressive compression can make code harder for other people to understand. The study didn't measure subjective readability.

08

How They Studied It

The author ran 160 code-generation sessions (40 for each of the 4 strategies) with Gemini 2.5 Pro. The task was always the same: a Python CLI for processing CSV files. Turn one was generation; turn two was a standard request to "improve readability, error handling, modularity".

What they measured: token count, share of defensive code (try/except and checks), documentation density, number of functions. Functional correctness was a binary test (works / doesn't work).

Why the results are convincing: 99% of the code passed the (deliberately minimal) test under every condition, so the differences in style are not explained by programs failing. The effects are huge: Combined vs. Control = d = -10.97 on the first turn (a "gigantic" effect size in statistical terms). On revision, Examples grew by the same amount as Control (d = 0.01, no difference), while Combined added 140 fewer tokens.

Unexpected insight: examples increased modularity (more functions), while instructions decreased it: the model read "minimum code" as "fewer abstractions". Style is multidimensional, and different mechanisms push on different dimensions.

09

Original from the Paper

Instructions System Prompt:

I value minimal, functional code. No defensive coding unless explicitly required.
No docstrings unless function purpose is non-obvious from the name and signature.

Write the minimum code that works.

Examples System Prompt:

Good code example:
```python
def parse_csv(path):
    return pd.read_csv(path)

def calc_stats(df):
    return {
        'total': len(df),
        'unique_users': df['user_id'].nunique(),
        'avg_by_type': df.groupby('event_type')['value'].mean().to_dict()
    }
```

Combined: the first two instruction sentences, then the code example, then "Write the minimum code that works."

Context: the researcher tested how the system prompt affects code style during generation and during one later revision ("Review and improve this code for readability, maintainability, and error handling.").

10

Adaptations and Extrapolations

💡 Adapting it for text (not code): our extrapolation, not tested in the paper — the same principle may work for other tasks where style matters.

Example: concise chat answers (our prompt):

I value short, concrete answers. No opening phrases like "Great question!". Don't repeat the question. No "it depends on the context" caveats if a direct answer is possible.

Good example:
Q: Which language should I learn for data science?
A: Python. The most libraries, jobs and learning materials.

Get straight to the point.

🔧 Technique: add "testable" rules

Replace abstract rules with concrete, conditional ones:

  • ❌ "Be brief"
  • ✅ "Answer in 3 sentences or fewer unless the question needs a detailed explanation"
  • ❌ "No fluff"
  • ✅ "No opening phrases. Start with the substance."

The paper's directives were concrete rules of this kind, and the author suggests that is why they persisted; abstract vs. concrete wording was not compared, so treat this as our suggestion.

🔧 Technique: restate the rules when revising

When you ask it to improve or extend something, remind it of the constraints:

Add error handling. Stay minimal: only the checks that are necessary.

Our suggestion, not tested in the paper (it used one fixed revision request): this may help over longer conversations, where instructions can fade.

11

Resources

Paper: "Show and Tell: Prompt Strategies for Style Control in Multi-Turn LLM Code Generation"

Author: Jeremiah Bohr, University of Wisconsin Oshkosh

Data and code: https://github.com/jeremiahbohr/show-and-tell

Key references from the paper:

  • Min et al. 2022, "Rethinking the Role of Demonstrations" (why few-shot works through imitation of form)
  • Ouyang et al. 2022, RLHF and instruction-following (why instructions persist)
  • Laban et al. 2025, "LLMs Get Lost in Multi-Turn Conversation" (the context-fading problem)

Research digest

Key result

The paradox: show the model a concise example and it writes concisely. Ask it to "improve error handling" and the code grows as much as if the examples never existed. This method lets you hold a code style better when you ask for a revision, not just on the first turn (only one revision was tested). The trick: few-shot examples set the shape but don't create a rule. They work as a template for the first answer. Explicit instructions ("write the minimum, no docstrings if the name is obvious"), however, act as operational constraints that the model applies on every generation. The combination gives -70% tokens up front and minimal bloat on revision.

Principle

Don't rely on examples alone to control style; combine them with explicit rules. Examples show WHAT the result should look like (short functions, no comments). Rules state the constraint ("no defensive code unless asked", "no docstrings if the purpose is obvious"). Examples work as imitation of surface form: the model copies the pattern for one particular moment. Rules work as testable constraints that the model checks on every revision. A likely reason (the author's explanation, not proven): when you ask it to "improve readability", that's a new task. The examples shaped the previous answer; the rules keep applying.

Why it works

LLMs are trained with RLHF to be "helpful", which often means wordy. Without constraints, a model adds docstrings, comments and "just in case" checks. The code works but, in the study, was about 3.4x longer than with rules plus examples. Examples only provide a pattern for the first answer; the model doesn't extract a principle from them. Instructions create a rule that gets applied every time. "No docstrings if the name is obvious" is a testable condition, not a template. Numbers from the study: examples alone give -20% tokens on the first turn, but on revision the bloat matches having no examples. Instructions alone give -56% up front and less bloat. The combination gives -70% tokens and the least growth on revision (+126 tokens vs. +266 for the bare model). All numbers are averages for Gemini 2.5 Pro on one Python task.

When to apply

Multi-turn code-generation conversations where you need a concise style that survives revisions. Especially for CLI scripts, utilities and prototypes where compactness matters. Possibly also (our extrapolation, untested) for other tasks where you ask the model to refine its output: essays (no fluff), reports (no repetition), documentation (to the point). NOT a fit if you need maximum readability for a team or code with detailed comments for teaching.

Mini recipe

1. State the rules explicitly: "I value minimal working code. No defensive programming unless required. No docstrings if the purpose is obvious from the name." 2. Show a format example: 1-2 short functions in the target style (the paper used two) (short, no comments, to the point) 3. Add a final directive: "Write the minimum code that works" 4. When revising, just ask: "Improve error handling" and the rules keep limiting growth (they reduce it, not stop it) Order used in the paper: rules → example → directive (other orders were not tested).

Examples

[BAD]: `Write a Python CLI script that processes CSV files and computes statistics`. With no guidance Gemini 2.5 Pro produced about 2560 tokens on average, with docstrings, checks and comments. On the revision request it grew by another +266 tokens [GOOD]: First the system prompt: `I value minimal working code. No defensive code unless required. No docstrings if the function's purpose is obvious. Good example: [show 2-3 short functions]. Write the minimum code that works.` Then the task: `Write a CLI script: scan CSV files, check columns, compute statistics, save JSON`. In the paper this averaged ~760 tokens. On the revision `Improve readability and error handling` the model added only +126 tokens because the rules keep working

In plain words

When you ask an AI to write code, it acts like an overeager intern: it crams in as many comments, docstrings and extra checks as it can to look helpful. That behavior is baked in during training. The trouble is that when you ask it to "polish" the code, it grows again — in the study, by about 270 tokens with no guidance. The Show and Tell study (one model, Gemini 2.5 Pro) shows that a lean style set by examples alone does not survive the second turn of a conversation.

It's like asking an architect for a quick, minimalist sketch of a cabin and getting back plans for a three-story mansion with crown molding. You say "Make it simpler", and he removes one column but adds a fountain and a sunroom because "it looks more impressive". The code still works, but it turns into a massive wall of text that's miserable to maintain. Left alone, the model tends to read "improve" as "add more".

The study tested four approaches. Concrete written rules ("minimal code, no defensive coding unless required, no obvious docstrings") cut output by 56% and kept growth smaller on revision. The few-shot method (a couple of examples of concise code) trims output by only 20%, and as soon as you ask for edits, the code grows as much as with no guidance. The strongest option is the combined strategy, where you both lay down the rules in words and show what good looks like with examples: 70% shorter at first and the least growth on revision.

It was tested only on one Python script for CSV files with one revision, but our guess is that it carries over to other multi-step work with AI. If you don't lock the style in with explicit rules plus an example, revisions tend to pile on extra code. The model has to see clear boundaries, or its urge to "be helpful" adds tokens you don't need.

Bottom line: if you want lean code, don't count on the model's defaults. In the study the code passed the basic test 99% of the time either way, but without rules it came out about three times longer, full of docstrings and extra functions. Set explicit rules up front, add a short example, and the style holds better through revisions (the study did not measure human-judged readability).

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on Show and Tell: Controlling Style in Multi-Turn LLM Conversations arXiv:2511.13972

Sign in to apply this study New accounts get 50 free credits.

Get the week’s best papers by email

One email on Sundays with the highest-rated new techniques. Unsubscribe with one click.