Does asking an AI to fix just the sentence you've highlighted work better than asking it to fix the whole document at once?
Do contextual prompts on highlighted selections work better than global prompts?
This asks whether prompting an AI about a specific highlighted passage (for example, selecting a paragraph in an editor and asking it to rewrite just that part) gets better results than one prompt that covers the whole document or task.
This asks whether prompting an AI about a specific highlighted passage gets better results than one prompt covering the whole document. The short answer: the collection has no head-to-head study of selection-scoped versus global prompts, so it can't settle that directly. What it does offer is several findings that explain why scoping a prompt might matter, and why the answer probably depends on the task more than on a general rule.
The strongest theoretical case for highlighted-selection prompts comes from looking at what a prompt actually is. In human conversation, people build shared context gradually and adjust it as they go. A prompt squeezes all of that into one fixed frame that the model can't renegotiate, so changing direction mid-task means writing a new prompt instead of making a quiet adjustment How do prompts reshape the role of context in AI conversation?. Read that way, a highlighted selection does part of the context-setting for you: the selection itself says "this part, not the rest," which a global prompt has to spell out in words. Related work on chain-of-thought prompting supports this. Reasoning prompts fail when the question's meaning doesn't reach the prompt before the model starts working Why do some questions perform better without step-by-step reasoning?. A tight, clearly bounded target makes that easier.
There's also evidence that where material sits inside a prompt shifts results more than you'd expect. Moving an identical block of examples from the start of a prompt to the end can swing accuracy by up to 20% and flip almost half the answers How much does demo position alone affect in-context learning accuracy?. Compression research shows that instructions and questions carry far more weight than surrounding material, which can be trimmed heavily with little loss Can prompts be compressed without losing model performance?. Together these suggest that a global prompt, where the passage you care about is buried somewhere in a long context, could be at a real disadvantage compared with a prompt that puts the selected text up front. This is an inference from adjacent findings, not a tested result.
The counterweight is that prompt techniques rarely work the same everywhere. A benchmark of 23 prompting styles across 12 models found that methods which help cheaper models can hurt stronger ones, and that the structure of the task decides what works Do prompt techniques work the same across all LLM tiers?. A selection prompt that cuts off the surrounding document may lose the context needed for tone, consistency, or references elsewhere in the text. That's a plausible case where a global prompt would win.
The angle you might not expect is a social one. In a study of paired writers using shared AI-assisted editors, people strongly preferred seeing when, how, and *where* their collaborator had used AI, because it helped them understand the other person's thinking and check AI-generated text Do writers want to see each other's AI prompts in shared editors?. Selection-anchored prompts tie each AI action to a specific stretch of text, which makes that kind of visibility possible. Global prompts can't do that as easily. So even without accuracy data, "contextual vs. global" may matter as much for how people collaborate and stay accountable as for output quality.
Sources 6 notes
LLM prompts bundle utterance, context assignment, and role specification into a single static frame the model cannot renegotiate, unlike human dialogue where context evolves cooperatively. This makes mid-conversation pivots require explicit re-prompting rather than implicit adjustment.
Saliency analysis reveals that CoT prompting fails when question information doesn't aggregate into the prompt structure before reasoning begins. For simple questions, direct question-to-answer flow outperforms step-by-step reasoning, showing the optimal prompt depends on question type, not just task category.
Repositioning an identical demo block from prompt start to end swaps up to 20% accuracy and flips nearly half of predictions. This spatial effect operates independently of demo content and spans multiple task types.
LLMLingua achieves up to 20x prompt compression with only 1.5-point performance drops by allocating less compression to instructions and questions, more to demonstrations, then pruning tokens using a small model's perplexity scoring aligned to the target LLM.
A 23-prompt benchmark across 12 LLMs shows rephrasing and background-knowledge prompts boost cheap models, while step-by-step reasoning reduces accuracy in high-performance models. Task structure, not generic best practices, determines which prompts help.
Show all 6 sources
Sixteen paired writers showed strong preference for higher levels of prompt visibility in shared editors, valuing awareness of when, how, and where AI was used. Benefits included understanding collaborators' thinking and verifying AI-generated text, though some found full sharing intrusive and self-conscious.
Papers this line draws on 8
The research behind the notes this line reads — ranked by how closely each paper relates.
- Invalid Logic, Equivalent Gains: The Bizarreness of Reasoning in Language Model Prompting
- LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Models
- Show Me Your Prompts! How Writers Feel About Sharing Prompts in Collaborative Text Editors
- Skills-in-Context Prompting: Unlocking Compositionality in Large Language Models
- Conversational Alignment with Artificial Intelligence in Context
- Is Chain-of-Thought Reasoning of LLMs a Mirage? A Data Distribution Lens
- Reasoning Beyond Chain-of-Thought: A Latent Computational Mode in Large Language Models
- CDW-CoT: Clustered Distance-Weighted Chain-of-Thoughts Reasoning