This document provides a high-level architecture for an application that uses AI to generate content for personalized marketing campaigns.
The intended audience for this document includes architects, developers, and administrators who build and manage generative AI applications in the cloud for the media and marketing industries. The document assumes that you have a foundational understanding of generative AI.
The Deployment section of this document provides links to code samples to help you experiment with deploying generative AI applications for marketing applications.
Architecture
The following diagram shows an architecture for an application in Google Cloud that processes user data to generate media assets for personalized marketing campaigns.
The architecture shows the following flows:
Ingest and process user data:
- User data from sources within Google Cloud and from external sources is uploaded to BigQuery.
- A Dataflow pipeline processes the uploaded data and derives marketing insights, such as demographic profiles, interests, and purchasing patterns.
- Eventarc triggers a Cloud Run service.
- The Cloud Run service sends the marketing insights to Gemini API in Vertex AI, with a prompt to generate personalized media assets for marketing campaigns.
- For each user, Gemini generates audio, video, and text content for online marketing campaigns.
- The Cloud Run service uploads the generated content to a content-server bucket in Cloud Storage.
Serve product recommendations:
When users visit the company's web portal, it does the following:
- Retrieves user-specific marketing content from the Cloud Storage content server.
- Displays the marketing content on the web pages that users visit.
To improve the quality of the content that's generated, consider the following adjustments to the architecture:
- Build a feedback loop to let the model learn from the impact of the marketing campaigns.
- Before the generated content is uploaded to Cloud Storage, let a human user verify that the content is safe and on brand.
Products used
This example architecture uses the following Google Cloud products:
- Cloud Run: A serverless compute platform that lets you run containers directly on top of Google's scalable infrastructure.
- Vertex AI: An ML platform that lets you train and deploy ML models and AI applications, and customize LLMs for use in AI-powered applications.
- BigQuery: An enterprise data warehouse that helps you manage and analyze your data with built-in features like machine learning geospatial analysis, and business intelligence.
- Dataflow: A service that provides unified stream and batch data processing at scale.
- Eventarc: A serverless solution to asynchronously route messages triggered by events.
- Cloud Storage: A low-cost, no-limit object store for diverse data types. Data can be accessed from within and outside Google Cloud, and it's replicated across locations for redundancy.
Deployment
The Generative AI for Marketing repository in GitHub includes code samples that you can use to experiment with deploying generative AI applications for marketing applications.
What's next
- Generate a marketing campaign brief and marketing assets.
- Generate visuals and copy for marketing campaigns.
- Explore more generative AI architecture guides.
- For an overview of architectural principles and recommendations that are specific to AI and ML workloads in Google Cloud, see the AI and ML perspective in the Well-Architected Framework.
- For more reference architectures, diagrams, and best practices, explore the Cloud Architecture Center.
Contributors
Author: Kumar Dhanagopal | Cross-Product Solution Developer
Other contributors:
- Amina Mansour | Head of Cloud Platform Evaluations Team
- Megan O'Keefe | Developer Advocate
- Samantha He | Technical Writer
- Shir Meir Lador | Developer Relations Engineering Manager