Overview
How might we design context mentions so people can trust and act on AI output?
When this pattern fits
- Perfect for AI coding assistants, enterprise knowledge management tools, and collaborative platforms where users need to reference specific files or documents in conversations.
When to skip or lighten it
- 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.
States
State model coming soon
Key UX elements
Key UX elements coming soon
Anti-patterns to avoid
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
| Product | Implementation |
|---|---|
| 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. |
Implementation
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: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.