Context-based prompt generation
Abstract
Context-based prompt generation techniques for generative machine-learning models are described. In one or more examples, a user interface (UI) selection of a UI element of first digital content is received. A processing device captures contextual information associated with the UI selection. A machine-learning model generates a prompt based on the UI selection and the contextual information. Generative artificial intelligence (AI) generates second digital content based on the prompt. The generative AI is implemented using one or more machine-learning models. The processing device then presents the second digital content for display in a user interface.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 8 · Forward citations: 0.
Claims (20 — 3 Independent, 17 Dependent)
- Claim 1Independent Claim
A method comprising: receiving, by a processing device, a selection of a UI element of first digital content; capturing, by the processing device, contextual information associated with the selection; in response to receiving the selection, generating, using a first machine-learning model, a prompt based on the selection and the contextual information, the selection triggering the generating of the prompt before receiving a subsequent user input; generating, using generative artificial intelligence (AI) implemented using one or more second machine-learning models based on the prompt, second digital content; and presenting, by the processing device, the second digital content for display in a user interface.
- Claim 2Depends on #1
The method of claim 1, wherein: the selection of the UI element comprises highlighting, selecting, or marking of text, images, charts, forms, or other UI elements of the first digital content; and the second digital content comprises text, images, or audio content aligned with a context of the selection.
- Claim 3Depends on #1
The method of claim 1, wherein capturing the contextual information comprises analyzing a document object model (DOM) structure associated with the selection and the first digital content.
- Claim 4Depends on #3
The method of claim 3, wherein capturing the contextual information further comprises collecting metadata associated with the selection.
- Claim 5Depends on #1
The method of claim 1, wherein generating the prompt comprises: extracting one or more features from the selection or the contextual information; applying one or more natural language processing techniques to analyze the one or more features; determining a context and an intent of the selection based on the one or more features; formulating a structured query based on the context and the intent; and outputting the prompt based on the structured query, wherein the prompt includes parameters for guiding the generative AI in producing the second digital content.
- Claim 6Depends on #5
The method of claim 5, wherein the first machine-learning model is trained using a dataset comprising examples of digital content that demonstrated user-approved performance metrics.
- Claim 7Depends on #5
The method of claim 5, wherein generating the prompt further comprises: capturing a screenshot of the selection of the UI element, the screenshot being included in the prompt to the generative AI.
- Claim 8Depends on #7
The method of claim 7, wherein the selection of the UI element, the screenshot, the contextual information associated with the selection, and the second digital content are transmitted to a chat interface, a computer system remote from the processing device, a remote third party, or a memory associated with the processing device as a storage file.
- Claim 9Depends on #1
The method of claim 1, further comprising: receiving the subsequent user input related to the second digital content; generating an updated prompt based on the subsequent user input and the prompt; providing the updated prompt to the generative AI; and presenting updated second digital content for display in the user interface.
- Claim 10Depends on #1
The method of claim 1, wherein receiving the selection of the UI element comprises: using, a weighted scoring algorithm, to evaluate potential boundaries of the UI element, the weighted scoring algorithm considering at least two of semantic HTML5 tags, content patterns, spatial proximity of other UI elements, or styling patterns of the other UI elements.
- Claim 11Depends on #1
The method of claim 1, wherein the second digital content includes at least one of: explanatory information related to the UI element; suggested actions or next steps based on the UI element; relevant data or statistics associated with the UI element; visual representations or charts derived from information in the UI element; or interactive elements allowing further exploration of content related to the UI element.
- Claim 12Independent Claim
A system comprising: memory; and a hardware processing device coupled to the memory, the hardware processing device configured to perform operations comprising: detecting activation of a selection mode; receiving a user interface (UI) selection of a UI element while in the selection mode; capturing contextual information associated with the UI selection; in response to receiving the UI selection, generating, using a machine-learning model, a prompt based on the UI selection and the contextual information, the UI selection triggering the generating of the prompt before receiving a subsequent user input; providing the prompt to a generative machine-learning model; and outputting generative digital content produced by the generative machine-learning model in response to the prompt.
- Claim 13Depends on #12
The system of claim 12, wherein the hardware processing device performs additional operations comprising: providing, while in the selection mode, visual feedback indicating the UI element is selectable; and in response to providing the visual feedback that the UI element is selectable and before receiving the UI selection, generating a preliminary prompt using the machine-learning model and generating preliminary generative digital content by the generative machine-learning model based on the preliminary prompt.
- Claim 14Depends on #12
The system of claim 12, wherein: the UI element and the generative machine-learning model are provided as part of a single application; or the UI element is displayed as part of a first application and the selection mode and the generative machine-learning model are provided as part of a second application.
- Claim 15Depends on #12
The system of claim 12, wherein capturing the contextual information comprises: analyzing a document object model (DOM) structure associated with the UI selection; extracting hierarchical relationships between UI elements from the DOM structure; identifying attributes and properties of the selected UI element and its parent elements; and determining a position and a layout of the selected UI element relative to other elements on a page.
- Claim 16Depends on #15
The system of claim 15, wherein capturing the contextual information further comprises collecting metadata associated with the UI selection and user information, the user information including at least one of a role or a position of a user, permissions associated with the user, or user history.
- Claim 17Independent Claim
One or more non-transitory computer-readable storage media storing instructions that, when executed by a processor, cause the processor to: receive a user interface (UI) selection of a UI element; capture contextual information associated with the UI selection; in response to receiving the UI selection, generate, using a machine-learning model, a prompt based on the UI selection and the captured contextual information, the UI selection triggering generation of the prompt before receiving a subsequent user input; provide the generated prompt to a generative machine-learning model; and output generative digital content produced by the generative machine-learning model in response to the generated prompt.
- Claim 18Depends on #17
The one or more non-transitory computer-readable storage media of claim 17, wherein the contextual information includes at least one of: user interaction history with the UI element; temporal data associated with the UI selection; device characteristics of a computing device used for the UI selection; or environmental data collected at a time of the UI selection.
- Claim 19Depends on #17
The one or more non-transitory computer-readable storage media of claim 17 storing additional instructions that, when executed by the processor, cause the processor to: analyze user feedback on the generative digital content; adjust the machine-learning model based on the user feedback; and store the adjusted machine-learning model for use in subsequent prompt generation.
- Claim 20Depends on #17
The one or more non-transitory computer-readable storage media of claim 17, wherein the instructions, when executed by the processor, cause the processor, in generating the generative digital content, to: identify a domain associated with the UI selection and the contextual information; select a domain-specific generative AI model based on the identified domain; and utilize the selected domain-specific generative AI model to produce the generative digital content.
Technical Overview & Description
BACKGROUND Artificial intelligence (AI) assistants utilize machine-learning models to generate content based on user inputs. The machine-learning models often employ large language or diffusion models trained on extensive datasets to understand and respond to prompts. When a query or request is presented, AI assistants analyze the input, draw relevant information from their training, and produce tailored responses or outputs. However, conventional AI assistants typically rely on users to understand the underlying problem, formulate precise queries, and provide sufficient context to achieve useful results. SUMMARY Context-based prompt generation techniques for generative machine-learning models are described. In one or more examples, an AI assistant selection system transforms the selection of user interface (UI) elements into implicit prompts for machine-learning analysis. The selection system receives a selection of one or more UI elements and captures contextual information associated with the selection. In one implementation, the selection includes both the image of the rendered screen and the underlying structure or content of the document object model (DOM). A prompt generation system then constructs a prompt using a machine-learning model based on the UI selection and contextual information. The prompt is provided to generative AI implemented using one or more machine-learning models to produce digital content, which is presented for display in the user interface. This context-based prompt generation allows users to forego the formulation of express queries. Instead, selecting UI elements is interpreted as an implicit request for analysis and insight. The system automatically captures the selected digital content and related contextual information, allowing the AI assistant to provide immediate, contextually-aware assistance without waiting for the user to formulate explicit questions or instructions. The contextual information captured includes analysis of th
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.