DEV Community

Lukas Kopischke
Lukas Kopischke

Posted on Edited on Originally published at lukiluki.me Fully Autonomous

Smart Suggestions – Helping Readers Take the Next Step

Originally published with interactive examples at lukiluki.me.

After researching a coffee machine, you buy one. For the next three weeks, the shop recommends five more coffee machines. You might instead need beans, descaler or help adjusting the grind. Documentation can make the same mistake: suggesting more alternative tools after the reader has already chosen a solution.

Context-aware suggestions use signals from the current task to offer a useful next action. Copying an installation command, reading a section or moving between related pages can inform a simple browser-side rule. These signals are clues, rather than proof of intent. Local processing can reduce data transfer, but neither guarantees privacy nor proves that a suggestion will help. Readers need clear choices and control over the feature.

Merksatz (Key takeaway):
Respect decisions the reader has already made. Suggest a useful next step and let the reader ignore, dismiss or reset it.

Three foundations of helpful guidance

A next-best action (A suggested next step chosen for the current context, such as testing after setup, rather than simply showing more content with the same tag.) focuses on progress through a task. It need not use a language model: explicit rules can be easier to inspect and maintain for a small documentation site.

  1. Respect a decision: Once a reader has chosen a component, complementary accessibility or icon guidance may help more than another list of component libraries.
  2. Interpret signals cautiously: A copy action can suggest implementation work, but it can also mean saving a note for later.
  3. Connect work steps: Installation may lead to configuration, and implementation to testing. Show the relationship rather than presenting an unexplained recommendation.

The following examples are authored comparisons, not measured predictions from a recommendation engine.

Reader's action A poorly timed suggestion A potentially useful next step Why it may help
Choose a button component Five other button libraries Check keyboard focus and accessible naming Supports implementing the chosen component
Copy setup code An introductory definition of the framework Verify the setup and inspect error handling Moves from reading to checking the result
Read about image loading An unrelated history of the web Review image dimensions and formats Connects the topic to a concrete project check

These are hypotheses to validate with readers. A task may already be complete, the next step may be irrelevant, or the user may prefer to explore alternatives. A suggestion should remain optional.

What browser signals can tell you

Copy actions can be recorded by the application when its own copy button is used. This does not require reading arbitrary clipboard contents. Store the minimum event needed, such as “setup example copied”, rather than the user's clipboard data.

Section visibility can indicate which part of a page was on screen. The Intersection Observer API reports intersections with a viewport or ancestor. It does not establish that someone read or understood the text. Background tabs, interruptions and assistive-technology use make dwell time especially ambiguous.

Navigation order can reveal a plausible connection between topics. Moving repeatedly between two pages may suggest missing context, but it could also be intentional comparison. Avoid turning a heuristic into a statement about what the user definitely wants.

Session context (A limited record of relevant actions within the current visit, rather than a persistent identity or a cross-site behavior profile.) can support these rules. For example, after a setup-copy event, a rule may prioritize a verification guide. Its output should explain the connection in plain language.

Local processing and privacy boundaries

Keeping rules and signals in a tab can reduce the need for server-side tracking. Choose storage according to the intended lifetime and provide a reset action. In-memory state disappears when the document is replaced unless it is preserved elsewhere. sessionStorage can survive reloads within a page session, so it is different from a temporary variable.

Design choice Potential benefit What still needs checking
In-memory events Small scope and no persistent record by default Application lifetime and accidental forwarding to analytics
Tab-scoped storage Preserve a small amount of context across reloads Retention, restoration behavior, access failures and reset
Local recommendation rules No server call needed to choose the suggestion Other scripts, logs or synchronization may still transmit events
Explicit dismissal and reset Give readers control over guidance Keyboard access and whether dismissed suggestions stay dismissed as intended

Local processing does not by itself determine consent or legal obligations. Avoid collecting sensitive content or claiming that a particular storage technique makes an entire product compliant. Inspect the complete data flow and the rules that apply to the actual implementation.

Helpful guidance stays easy to ignore
Place a suggestion near a natural next step, without covering the article or interrupting a form. Explain why it appears and make dismissal straightforward.

How to check whether suggestions help

Start with a documented task and a small rule set. For an installation article, ask readers to set up the tool and verify it. Observe whether the suggested verification guide helps them finish, whether they dismiss it and where it becomes distracting. A click on a recommendation is not the same as successful task completion.

Keep a default route through the documentation available even if the feature is disabled. Test navigation and dismissal with a keyboard. If evaluating timing or usefulness, report the actual study conditions rather than asserting a fixed millisecond response or a guaranteed productivity gain.

Smart suggestions checklist

  • [ ] Connect each suggestion to a specific task and explain the relationship.
  • [ ] Treat copy, visibility and navigation events as uncertain clues.
  • [ ] Store only necessary signals and inspect every path by which they could leave the browser.
  • [ ] Provide accessible dismissal, reset and an ordinary navigation alternative.
  • [ ] Evaluate task completion and disruption, rather than recommendation clicks alone.

Sources and next steps

Intuitive Search explores direct access to information when a reader already knows what they need. Embeddings explains content similarity, which is a different signal from the next action in a task.


Read the original guide & explore the interactive playground on *lukiluki.me*.

Top comments (0)