Session-Specific Caching for Custom Language Model Instructions
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Language models lack the ability to provide tailored responses to users due to the lack of structured mechanisms for processing, storing, and applying user-defined preferences, leading to inconsistent application across interactions and an inability to maintain contextual continuity.
Innovation Solution
Implementing custom model instructions through interfaces to tailor prompts and responses, allowing language models to store user preferences and adapt responses based on prior interactions, ensuring relevance and continuity.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If language models use generic responses without structured mechanisms for processing user preferences, then device complexity is reduced, but adaptability deteriorates
Solution Approach 1:
The system segments user preferences into distinct components including personal information, response type preferences, and topic-specific preferences. Each segment is stored separately in a data storage system and can be independently retrieved and applied to relevant prompts, enabling精细化 adaptation without requiring complete restructuring of the language model.
Solution Approach 2:
An intermediary system is introduced between the user interface and the language model. This intermediary receives user preferences, stores them in a structured format, retrieves appropriate preferences based on incoming prompts, and injects them as system messages before forwarding to the language model. This mediator handles the complexity of preference management externally, keeping the core language model simple while achieving high adaptability.
2Adaptability or versatility
If language models rebuild context at the start of every session, then adaptability improves, but loss of time increases
Solution Approach 1:
User preferences and contextual information are collected and stored in advance during initial user interactions or profile creation. The system maintains this pre-processed contextual data in persistent storage, so that when a new session begins, the information is already prepared and can be quickly retrieved and applied without requiring time-consuming reconstruction during the session.
Solution Approach 2:
The system maintains continuous availability of user preferences across multiple sessions through persistent storage. Rather than interrupting the workflow to rebuild context, the preferred settings and personal information remain continuously accessible in the background, allowing seamless transitions between sessions while maintaining personalized responses.
3Reliability
If language models treat custom instructions as transient inputs, then device complexity is reduced, but reliability deteriorates
Solution Approach 1:
The system extracts the reliability-critical function of preference persistence from the transient input-processing flow and places it in a dedicated persistent storage system. User preferences are separated from temporary prompt data and stored in a reliable, long-term storage mechanism that guarantees data retention across sessions, while the main processing flow remains simple and unchanged.
4Adaptability or versatility
If language models require multiple prompts to establish context, then adaptability improves, but productivity deteriorates
Solution Approach 1:
User profile information and preference settings are established in advance through preliminary actions such as registration, onboarding questionnaires, or initial preference surveys. This pre-established contextual foundation eliminates the need for multiple back-and-forth prompts during actual usage, as the language model can immediately apply the pre-configured personalization settings to enhance productivity from the first interaction.
Data Source
AI summary
Disclosed herein are methods, systems, and computer-readable media for interacting with a language model using custom instructions. In one embodiment a method includes receiving, through an interface, custom instructions, the custom instructions comprising at least one of personal information or a response type preference, storing the custom instructions temporarily within a session specific cache, in response to a trigger event, adding the custom instructions to a system message associated with the language model, the system message being a prompt modifier to the language model, in response to receiving a prompt, retrieving the custom instructions from the session specific cache, determining whether the custom instructions are relevant to the prompt, and in response to determining the custom instructions are relevant to the prompt, generating a response to the prompt based on the custom instructions.


