This is a demo of the basis of monetizing RAG-enriched LLMs through advertising.
OpenAI seems to be doing well monetizing GPT by building a centralized platform, but I believe companies like Google and Perplexity will have to monetize their LLMs through advertising - something similar to AdWords.
I expect to see "AdWords for Gemini" and some equivalent on Perplexity coming soon.
I recommend running this in Colab (wjleece_AdWords_RAG_LLM_API_final.ipynb) vs. locally (Adwords-for-RAG-LLMs.py ) as you can leverage Colab's GPU for better performance.
- Ingests product information and product review data from Amazon (currently limited to Nike shoes with reviews from Jan 1, 2022 until mid Jan 2024) --> note that Amazon URLs may change so as get further from Jan 2024, landing pages are more likely to 'break'
- Creates a product dictionary of the product + review data
- Creats a Retrieval Augmented Generation (RAG) system which is enriched with Nike product review data from Amazon
- Generates relevant responses to customer queries based on the Nike product review data (the base LLM used is OpenAI's gpt-4)
- Creates a dictionary from the response
- Replaces any product names in the response with hyperlinked versions of the product name (pointing to an Amazon landing page URL)
- Puts together a full response with the now hyperlinked product names
- Creates an external API on Gradio so this tool can be shared