keithtelliott / sidekicksammy.com

Helpful AI chatbot service
2 stars 0 forks source link

Advertising LLM Modeling #80

Open canedy opened 9 months ago

canedy commented 9 months ago

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

  1. 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.
  2. 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.
  3. 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

  1. 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.
  2. 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.
  3. 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

  1. MDX Integration: Integrate with MDX (Markdown + JSX) processor to enable dynamic rendering of markdown content, allowing for custom ad formatting.
  2. 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.
  3. 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

  1. 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.
  2. User Engagement Tracking: Include mechanisms to track user engagement with the inserted ads (clicks, views, interaction time), providing feedback for optimizing future ad selections.

Sequence Diagram

image