Abstract
This disclosure relates to a web API and browser-controlled user interface, such as an "Add Context" button or right-click action, that may enable websites to expose discrete, high-fidelity data packages to a machine learning (ML) model, such as a large language model (LLM). Web pages often may display brief summaries of richer underlying data not included in the current interface; for example, an icon may represent an entire message thread, a shopping cart icon may represent all selected items and prices, or a billing summary may represent a full billing history. To make this underlying data accessible, page elements may be annotated using developer-defined markup or API declarations that indicate the element represents structured data beyond what is visually shown. When a user initiates an interaction with a conversational model, the browser may present a user interface (UI) option to add the underlying data to the model context for the interaction. More specifically, upon selection, the browser may retrieve the structured data associated with the annotated element, present a preview to the user, and require explicit confirmation before transmission to the LLM. The confirmed data is then provided to the ML model as a structured data package representing the full underlying content, not merely visible page text. By placing annotation, retrieval, preview, and transmission under browser control with explicit user consent, the method prevents hidden prompt injection and unauthorized data exfiltration, while enabling safe, consistent sharing of high-value context that cannot be achieved through scraping or link-based approaches.
Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 License.
Recommended Citation
Klassen, Gary, "A Method And A System For Adding Context Buttons To A Webpage", Technical Disclosure Commons, ()
https://www.tdcommons.org/dpubs_series/9420