Context Mentions

Context mentions is an AI UX pattern where typing "@" in a chat input opens an autocomplete menu for referencing files, documents, people, or other agents. It gives users an explicit, discoverable way to pull specific context into a prompt instead of relying on the model to infer what they mean.

Share

When to use

Perfect for AI coding assistants, enterprise knowledge management tools, and collaborative platforms where users need to reference specific files or documents in conversations.

When not to use

  • Simple single-context tools where there is only ever one obvious source to reference.
  • Interfaces with no indexed file or entity list to autocomplete against, where "@" would return nothing useful.
  • Voice-first or no-keyboard surfaces where a typed trigger character is not a natural interaction.

Anti-patterns

  • Autocomplete lists with no search or filtering, forcing users to scroll through everything.
  • Mentioned items with no visible chip or confirmation that the reference was actually attached.
  • Referencing a file but sending stale or truncated content without indicating what was cut.
  • No way to remove a mention after inserting it without deleting surrounding text.

How products use it

ProductImplementation
Cursor@ mentions files, folders, docs, and past chats to ground code generation in real context.
Slack@ mentions people and channels, with autocomplete over the workspace directory.
Notion AI@ references pages and people inline, feeding page content into AI actions.
Linear@ mentions issues and teammates directly inside comments and AI-assisted fields.

Use this pattern in your project

Copy this prompt to generate a production-ready implementation in Cursor, Claude Code, Lovable, or any AI coding agent.

Generate a production-ready implementation of the "Context Mentions" AI interface design pattern.

Pattern Definition:
Interactive Demo
Restart demo
Files

Frequently asked questions

What does the @ mention pattern do in AI tools?

Typing "@" opens an autocomplete menu of files, documents, people, or agents that can be inserted as explicit context for the AI, instead of leaving the model to guess what the user is referring to from plain text alone.

Why use @ mentions instead of just describing the file in text?

Explicit mentions are unambiguous and let the product show exactly what content was attached as a removable chip. Free-text descriptions rely on the model matching the right file, which fails silently when names are similar or context is stale.

Can @ mentions reference more than files?

Yes. Many products extend mentions to people, other conversations, agents, issues, or database records, using the same trigger and autocomplete pattern so the interaction stays consistent across context types.

Get new patterns by email

Weekly AI interface UX notes and resources on Substack, no spam, unsubscribe anytime.

Subscribe on Substack