Build a API advertising LLM model that will all any outside system to call a API to pass chat conversational information and receive an approved Ad to display in line to the user's conversation. This is meant to more information for when users are chatting with retail applications to all of them to get useful information they can use.
Scope
Current user conversations will not keep track of historical conversations.
Surface meaningful Ad information that creates a win-win situation for the customer and the business.
Will use LangChain to interact with LLM.
Requirements
User Search History Analysis
Data Collection: Implement mechanisms to collect and store user search history securely. Look to store data in short-term memory only to capture ten conversational turns and then summarize information to be analyzed to surface relevant ads during the user chat.
Analysis and Logic: Develop an algorithm to analyze the user's search history, identifying keywords and topics related to places, products, and generic product types.
Trigger Identification: Define logic to know when to search for the ad to surface in the user's chat. Surface only relevant ads to users based on what they are asking questions about. The initial trigger will be turn-based; after every ten chat messages, the system should summarize the conversation and then attempt to find an ad relevant to the user.
Ad Selection Process
Ad Database: Maintain a database of ads, categorized by relevant keywords (place, product, generic product type, etc.), including company name, promotion details, and website links.
Random Selection Logic: Develop a selection algorithm that randomly picks an ad from the database, matching the analyzed user interests and current chat triggers. The Ad selection process should return only 1 Ad at a time to the user's chat session.
Fallback Mechanism: Implement a fallback mechanism for when no direct matches are found. In this scenario, the Ad process should not display anything, and reset the conversation turns to attempt again based on Trigger Identification logic.
Markdown Advertisement Formatting
MDX Integration: Integrate with MDX (Markdown + JSX) processor to enable dynamic rendering of markdown content, allowing for custom ad formatting.
Custom Ad Templates: Design markdown templates for ads that include placeholders for the company name, promotion details, and website links, which are filled dynamically by the returning data.
Responsive Design: Ensure that the markdown renders well across different devices and screen sizes, considering the limitations and capabilities of markdown rendering in various environments.
Ad Insertion into Chat
Real-time Processing: Implement real-time processing to dynamically insert ads into the chat based on the current conversation triggers without interrupting the user experience.
User Engagement Tracking: Include mechanisms to track user engagement with the inserted ads (clicks, views, interaction time), providing feedback for optimizing future ad selections.
Objective
Build a API advertising LLM model that will all any outside system to call a API to pass chat conversational information and receive an approved Ad to display in line to the user's conversation. This is meant to more information for when users are chatting with retail applications to all of them to get useful information they can use.
Scope
Requirements
User Search History Analysis
Ad Selection Process
Markdown Advertisement Formatting
Ad Insertion into Chat
Sequence Diagram