Sometimes you want to address or alter a small part of the AI's response without asking it to regenerate the whole thing. In these situations, inline targeting is a powerful device.

Whether replying or regenerating a few lines of text or introducing something new, inline prompting allows you to interact directly with the content in coordination with the AI. This has the dual impact of giving the user more control, while truly positioning AI as a copilot compared to someone you are directing.

Common forms

  • The most common appearance of this pattern is to show a reply or action button when highlighting a bit of text (ChatGPT, Jasper). Generally, the conversation in these formats continues linearly, but the user (and therefore the AI) can reference the inline data - in this regard, the original prompt essentially becomes an initial reference for a new line of prompting
  • Some products take this a step forward and include additional actions that can be automatically applied inline (Grammarly, Notion). Here, the user is remixing the prompt itself, giving it commands like shorten, change tone, etc.This may also be a moment when the user introduces new parameters or tokens to be used in future versions.
  • Finally, inline targeting can be highly interactive, like GitHub Copilot which can add, edit, or annotate code directly within the IDE. This situation is a mix of the first two. The user is directing the AI to reference the code (or content, or whatever) in their first prompt, but the actions are to regenerate parts of the written code using this updated understanding, like inpainting but with text.

Multi-modality

Rich or multi-modal experiences like voice to image recognition offer even more patterns. A hiccup in a demo during OpenAI's most GPT-4o kickoff even gave us a good look into what a targeted prompt looks like in this type of interactive environment. About 45 seconds in, the host asked GPT a question and it recalled something he had said earlier instead. The host quickly realized it, and redirected its context through a targeted instruction to forget that part of the conversation and focus on the current interaction.

This last example shows the real strength of targeting as an AI pattern. When users can fully direct the AI's attention, our focus can turn from training the AI to using the AI for something we want to achieve with it. It converts the AI into a tool. As multi-model experiences expand, and our ability to expand through all sorts of physical and voice affordances expands as well, we are sure to see more examples of this pattern evolve.

Details and variations

  • Inline prompts appear when text is selected
  • The prompt can be made inline using a contextual dialog (Github Copilot) or in the pain open text field but referencing that area of the first response
  • Before overwriting any text, the AI requires confirmation from the user
  • When inline changes are made, it overwrites the text fully instead of acting as a version (but perhaps this is an anti-pattern)

Considerations

Positives

Even more direct control

This pattern closely resembles natural human language, where we are regularly calling back to earlier parts of the conversation, adjusting our tone to the context, and restating our words. Targeting prompts inline give the user the ability intentionally iterate the AI out come slowly and deliberately, keeping the parts that work and discarding the rest.

Potential risks

Inability to show your work

As noted in the Footprints section, most AI products lack some way of connecting the current generation with the results it derives from. Unfortunately, companies haven't caught up to platforms like Midjourney, which allow the user to retrace their steps when they find something that strikes nerve. Explore how you can be avoiding friction while helping users reflect, or even learn from their work.

Use when:
The user needs the AI to edit or reference a certain piece of text, almost like an in-painting device for text-based interaction.

Examples

Github Copilot allows you to interact with and prompt against any line of code inline in the editor
Hubspot follows the convention of text editors and lets you apply a single action to regenerate text inline
Grammarly follows a similar pattern
ChatGPT allows you to reference a block of text and reply with it as a targeted reference
ChatGPT allows users to edit their prompt inline, which results in a new generated response
No items found.