Skip to content

The prompt history search

Finding the turn from last Tuesday in three keystrokes.

9 min

A user who's used your product for three months has written hundreds of prompts. Their best ones are buried. Scrolling the sidebar is a non-starter. Rewriting from memory loses the nuance. The product needs a search that's fast, fuzzy, and ranked by what the user actually does: open-recent, use-often.

The pattern is simple from the outside: one keyboard shortcut, one search box, typed results with highlighted matches. Inside, it's a ranking problem, and the ranking is where products win or lose.

"Your prompt history is your workshop. Make it searchable, and the product becomes a tool. Leave it buried, and the product becomes a chat."
The pattern

⌘K. Fuzzy match. Recency-weighted.

One shortcut opens the search. Typing narrows. Every result shows the title, the first line of the body, and the last-used date, with highlighted matches. Filters live above the input: pinned, archived, all. A 'copy to composer' button ends every row. The user can go from thought to new thread in three keystrokes.

Fuzzy search over prompt history
Type to narrow, filter to scope
⌘K1 of 5
pinnedChurn cohort

Pull enterprise churn for last 30 days, group by region

Yesterday, 18:20 · used 6×

Type, filter, copy. The history stops being a receipt and starts being a workshop.

The why

Users don't rewrite their best prompts.

The best prompt a user will write in your product was written weeks ago. If search is bad, they either rewrite (badly) or give up (quietly). Either way, your product stops compounding. A good search turns history into a productive archive instead of a scrolling graveyard.

Three moves

Search that deserves muscle memory.

  • Weight recency and frequency. The right ranking beats alphabetical by an order of magnitude.
  • Fuzzy, not strict. Users misremember words. A search that doesn't forgive typos is a search that teaches itself to be unused.
  • One shortcut to the input. ⌘K is standard for a reason. Don't reinvent.

The trap

History that looks fuzzy but isn't.

A search that only matches the title, or that ignores the body entirely, feels broken. Users will type a word they remember from the body, see no results, and conclude the history is useless. The index has to cover everything: title, body, pinned state, even which tools were called.

Failure modes

What this pattern gets wrong when it gets wrong.

Stale memory
A persistent fact about the user that's out of date and silently poisoning answers.
Leaky context
Content from another source, session, or user surfacing in a place it shouldn't.
Seen in the wild

Three shipping variants worth copying.

  • A ⌘K search that fuzzy-matches prompt text and title
  • Results ranked by recency then frequency of re-use
  • Each result has a 'copy to composer' shortcut