<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article How to Combine AI Agents and Audience Segmentation in Databricks for Smarter Ad Targeting in Technical Blog</title>
    <link>https://community.databricks.com/t5/technical-blog/how-to-combine-ai-agents-and-audience-segmentation-in-databricks/ba-p/117955</link>
    <description>&lt;H3&gt;&lt;SPAN&gt;The Problem: What is missing from traditional audience segmentation?&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;Audience segmentation has long been crucial for marketing, grouping customers into distinct profiles based on shared demographics, behaviours, or interests. It helps advertisers and ad agencies build personas and create targeted messages. However, classic segmentation doesn’t provide qualitative insight. It tells you &lt;/SPAN&gt;&lt;I&gt;&lt;SPAN&gt;who&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN&gt; your audience is, but now &lt;/SPAN&gt;&lt;I&gt;&lt;SPAN&gt;how&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN&gt; they think, feel, or might react to your creative. It doesn’t give a way to test new ideas, iterate messaging, or provide feedback before launching a campaign. Focus groups and A/B testing are traditional tools to solve for these challenges, but they’re slow, expensive, and hard to scale. Running a focus group for every creative concept isn’t feasible in fast-moving industries.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We can summarise the challenge as: advertisers want to ask questions like: “How would this segment respond to this ad?” and get measured feedback instantly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In this blog, we’ll show you how to combine &lt;/SPAN&gt;&lt;STRONG&gt;audience segmentation&lt;/STRONG&gt;&lt;SPAN&gt; with &lt;/SPAN&gt;&lt;STRONG&gt;AI agents&lt;/STRONG&gt;&lt;SPAN&gt; in Databricks to simulate real audience reactions. Think of it as a synthetic focus group powered by customer data and large language models (LLMs), helping marketers make smarter, faster targeting decisions.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;SPAN&gt;The Solution: Simulating audience reactions with AI Agents in Databricks&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;So how do we move beyond classic segmentation and actually interact with personas before launching a campaign?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here’s a step-by-step breakdown of how to combine segmentation, unstructured data, and LLMs to create an AI-powered synthetic focus group in Databricks (note: you can find the code repo for this solution &lt;/SPAN&gt;&lt;A href="https://github.com/databricks-solutions/databricks-blogposts/tree/main/2025-04-ai-audience-profiles" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;here&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Figure 1: High-level architecture" style="width: 755px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16525iA61E90823D3C748D/image-dimensions/755x427?v=v2" width="755" height="427" role="button" title="JackSandom_0-1746547352025.png" alt="Figure 1: High-level architecture" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Figure 1: High-level architecture&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H4&gt;&lt;SPAN&gt;Step 0: Requirements to get started&lt;/SPAN&gt;&lt;/H4&gt;
&lt;P&gt;&lt;SPAN&gt;You’ll need structured demographic data (one row per customer) and unstructured data like paid product reviews in a &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/aws/en/volumes/" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Unity Catalog Volume&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; (e.g., JSON files). The solution was tested on both serverless and classic compute clusters (15.4 ML runtime).&lt;/SPAN&gt;&lt;/P&gt;
&lt;H4&gt;&lt;SPAN&gt;Step 1: Use segmentation to identify the different audiences we want to target&amp;nbsp;&lt;/SPAN&gt;&lt;/H4&gt;
&lt;P&gt;&lt;SPAN&gt;Using structured data (age, income, location), we apply clustering techniques like K-means to group customers into segments.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;k_range = range(2, 8)
inertias = []

for k in k_range:
    kmeans = KMeans(n_clusters=k, random_state=42, n_init="auto")
    kmeans.fit(X)
    inertias.append(kmeans.inertia_)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;We call each segment a “tribe” which is not just demographic clusters, but groups with shared values and behaviours that influence ad response.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Summary statistics help us to better understand our tribes and create descriptive labels such as “&lt;/SPAN&gt;&lt;I&gt;&lt;SPAN&gt;The Homebodies (Suburban Family-Oriented)&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN&gt;”. Each of these tribes represents a unique blend of demographics, income levels, occupations, and lifestyle preferences. Optionally, &lt;/SPAN&gt;&lt;A href="https://shap.readthedocs.io/en/latest/" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;SHAP&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; can improve interpretability by revealing feature importance and decision logic behind cluster assignments.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;To further bring these tribes to life, we also visualised tribe distribution across an example geographic area (LA neighbourhoods), providing spatial context to behavioural patterns.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Figure 2: A Mapbox plot showing the cluster locations" style="width: 671px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16527i306730965A63FD18/image-dimensions/671x441?v=v2" width="671" height="441" role="button" title="JackSandom_1-1746547352164.png" alt="Figure 2: A Mapbox plot showing the cluster locations" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Figure 2: A Mapbox plot showing the cluster locations&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H4&gt;&lt;SPAN&gt;Step 2: Enrich each segment with unstructured data to form detailed profiles&lt;/SPAN&gt;&lt;/H4&gt;
&lt;P&gt;&lt;SPAN&gt;Once we’ve identified tribes, we enrich them with &lt;/SPAN&gt;&lt;STRONG&gt;unstructured data &lt;/STRONG&gt;&lt;SPAN&gt;(for example, customer reviews).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We use foundation LLMs in Databricks to summarise this content and generate a &lt;/SPAN&gt;&lt;STRONG&gt;detailed persona&lt;/STRONG&gt;&lt;SPAN&gt; that captures interests, tone, sentiment, and pain points in a human-readable way. Each prompt included:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Aggregated traits (e.g. median age, income)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Sample paid reviews for each tribe&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;A clear instruction:&lt;/SPAN&gt;&lt;I&gt;&lt;SPAN&gt; “Use the provided demographic information and paid reviews to describe the customer tribe’s characteristics.”&lt;/SPAN&gt;&lt;/I&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;An example format&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;LI-CODE lang="python"&gt;prompt = """
You are an expert marketing analyst tasked with creating a concise customer persona. Use the provided demographic information and paid reviews to describe the customer tribe’s characteristics.

...

The profile should be fluid, easy to read, and written in a professional yet conversational style.
"""&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;Databricks allows integration with open-source LLMs (like Llama) or commercial models to generate the personas quickly, repeatably, and scalable. This transforms raw segment data into a rich, narrative description that will help teams better understand not just who the audience is but what matters to them.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H4&gt;&lt;SPAN&gt;Step 3: Use an AI Agent to simulate audience reactions&lt;/SPAN&gt;&lt;/H4&gt;
&lt;P&gt;&lt;SPAN&gt;With our enriched personas, we can now create an AI agent that acts as a stand-in for each tribe. You can feed the agent any piece of content (ad copy, campaign messaging) and prompt them to respond in character.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Why an AI agent? At its core, an agent is a system that can reason, respond, and take actions based on data and context. In this case, the agent is built to behave like a specific audience segment,&lt;/STRONG&gt;&lt;SPAN&gt; using its profile to simulate how a real person in the segment might respond to ad content.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Rather than just returning one-off completions like a basic LLM call, the agent can:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Stay “in character” based on the persona description&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Interpret and respond to user inputs&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Access external tools, such as retrieving previous ad campaigns (RAG)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Stay focused on the task of helping the user improve their ad content&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;This is what turns the static personas into a &lt;/SPAN&gt;&lt;STRONG&gt;synthetic focus group&lt;/STRONG&gt;&lt;SPAN&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H5&gt;&lt;FONT color="#808080"&gt;&lt;I&gt;&lt;SPAN&gt;Building the agent in Databricks&lt;/SPAN&gt;&lt;/I&gt;&lt;/FONT&gt;&lt;/H5&gt;
&lt;P&gt;&lt;SPAN&gt;We built this agent using LangChain and LangGraph open source frameworks. The Genai agent was deployed as an API with MLflow&amp;nbsp; and Databricks model serving and the LLM was a Databricks-hosted LLM,open source Llama 3.3 in this case, chosen for its advanced&amp;nbsp; reasoning capabilities.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H5&gt;&lt;STRONG&gt;LLM + Dynamic System Prompt&lt;/STRONG&gt;&lt;/H5&gt;
&lt;P&gt;&lt;SPAN&gt;Each agent starts with a system prompt dynamically constructed from:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;The audience tribe (e.g. “Tech-Savvy Professional”)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;The pre-created persona profile&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Optional retrieved ad content via RAG (see below)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;The system prompt ensures the model stays in character and provides feedback only from the audience’s perspective.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;system_prompt = PromptTemplate(
    input_variables=["tribe", "profile", "retrieved_ads"],
    template="""
    You are an audience persona named {tribe} with the following profile:
    {profile}

    The user is an advertising content writer and wants to tailor copy specific to your 
    persona. Your goal is to assist the user in doing this by acting as a {tribe} and 
    helping the user to test ideas and get to tailored ad content which is effective on 
    your persona.

    Here is a past successful ad for this tribe:
        {retrieved_ads}
      
    Use this ad as inspiration if it is relevant to the user's query. If it is not 
    relevant, ignore.

    If prompted to improve or generate new ad content, always provide suggested copy. 
    Always end by asking a question or offering a suggestion to help the user get to 
    their goal.

    Stay in character always and only respond in the context of your audience persona. 
    Do not make stuff up. If asked about something unrelated, politely redirect the 
    conversation.
    """
)

formatted_prompt = system_prompt.format(
    tribe=tribe,
    profile=profile,
    retrieved_ads=retrieved_ads_text
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;RAG (Retrieval-Augmented Generation) with Vector Search&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;To make agent feedback more realistic and context-aware, we used RAG to reference prior successful campaigns. This can also be extended to include brand guidelines or other context.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The agent uses a vector similarity search via &lt;/SPAN&gt;&lt;SPAN&gt;VectorSearchRetrieverTool&lt;/SPAN&gt;&lt;SPAN&gt; to pull ad copy from a Databricks Vector Search index. Retrieved content is embedded into the system prompt as optional context.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;vs_tool = VectorSearchRetrieverTool(
    index_name=VS_INDEX_NAME,
    columns=["campaign_id", "ad_copy"],
    tool_name="Ad-Copy-Retriever",
    tool_description="Retrieve prior successful ad copy for tribe",
    filters={"tribe": None}, # Placeholder for dynamic filtering
)
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;This tool is invoked only when relevant (determined by the agent). This is because the tool is dependent on the prompt. For example, if the user asks: &lt;/SPAN&gt;&lt;I&gt;&lt;SPAN&gt;“Help me improve this ad content…”&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN&gt;, the agent will use the tool to retrieve ad copy to help guide the response. But if the user asks &lt;/SPAN&gt;&lt;I&gt;&lt;SPAN&gt;“What do you look for in a product?”&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN&gt;, then the tool is not required.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H5&gt;&lt;STRONG&gt;LangGraph for Agent Logic&lt;/STRONG&gt;&lt;/H5&gt;
&lt;P&gt;&lt;SPAN&gt;LangGraph allows us to define agent workflows as stateful graphs. In this case, our workflow is simple:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Accept a user message&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Construct a system prompt dynamically&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Optionally retrieve reference ad copy&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Return a model-generated response&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;Because the logic is modular and extendable, we could easily add steps later, such as tone analysis or multi-agent debate.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H5&gt;&lt;STRONG&gt;Serving via MLflow + Databricks Model Serving&lt;/STRONG&gt;&lt;/H5&gt;
&lt;P&gt;&lt;SPAN&gt;Finally, the full agent is packaged as a custom &lt;/SPAN&gt;&lt;I&gt;&lt;SPAN&gt;mlflow.pyfunc.ChatAgent&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN&gt; and deployed with Databricks Model Serving, enabling:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Streaming conversational responses&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Artifact loading (e.g., &lt;/SPAN&gt;&lt;I&gt;&lt;SPAN&gt;profiles.json&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN&gt; for personas)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Custom inputs for selecting the tribes on-the-fly *&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;* The use of&lt;/SPAN&gt;&lt;I&gt;&lt;SPAN&gt; custom_inputs&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN&gt; is a powerful aspect of the agent setup as it allows the user to pass dynamic values (like the audience tribe) directly into the agent at runtime without needing to hard-code logic for each persona.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;input_example = {
    "messages": [{"role": "user", "content": "How can I improve this ad?"}],
    "custom_inputs": {"tribe": "The Innovators (Tech-Savvy Professional)"},
}

AGENT.predict(input_example)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;Databricks makes this seamless, offering scalable deployment, unified governance, and a direct path from prototype to production. With this setup, you can interact with each persona as if they were real, transforming static audience documents into interactive, intelligent agents with the ability to supercharge the creative process for advertisers.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H4&gt;&lt;SPAN&gt;Step 4: Build an interactive front-end with Databricks Apps&lt;/SPAN&gt;&lt;/H4&gt;
&lt;P&gt;&lt;SPAN&gt;Finally, we make all of this usable for advertisers with a lightweight front-end. Using Databricks Apps, you can build a simple UI that allows users to:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Upload ad content&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Choose an audience tribe&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;View the AI-generated response and sentiment&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Iterate and refine based on feedback&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;Databricks Apps enables teams to build and deploy this simple front-end without leaving the notebook environment. It seamlessly integrates with the model serving endpoint exposing your agent. There is a choice of Python frameworks such as Flask or Streamlit. In this case, we used Streamlit and customised the pre-built template to generate the UI.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;# Avatars
human_avatar = "&lt;span class="lia-unicode-emoji" title=":speech_balloon:"&gt;💬&lt;/span&gt;"
tribe_avatars = {
   "The Homebodies (Suburban Family-Oriented)": "🧑🏼‍&lt;span class="lia-unicode-emoji" title=":baby_bottle:"&gt;🍼&lt;/span&gt;",
   "The Luxe Lifers (High-Income Empty Nester)": "🏌🏻‍&lt;span class="lia-unicode-emoji" title=":female_sign:"&gt;♀️&lt;/span&gt;",
   "The Campus Creatives (College Student)": "&lt;span class="lia-unicode-emoji" title=":man_student:"&gt;👨🏽‍🎓&lt;/span&gt;",
   "The Quiet Seekers (Retired Rural Dweller)": "&lt;span class="lia-unicode-emoji" title=":man_farmer:"&gt;👨🏼‍🌾&lt;/span&gt;",
   "The Innovators (Tech-Savvy Professional)": "&lt;span class="lia-unicode-emoji" title=":woman_technologist:"&gt;👩🏼‍💻&lt;/span&gt;"
}

...

# Display assistant response in chat message container
with st.chat_message("assistant", avatar=tribe_avatars[st.session_state.selected_tribe]):
    # Query the Databricks serving endpoint
    try:
        response = client.predict(
            endpoint=os.getenv("SERVING_ENDPOINT"),
            inputs={
                "messages": [{"role": msg["role"], "content": msg["content"]} for msg in st.session_state.messages],
                "custom_inputs": {"tribe": st.session_state.selected_tribe},
                },
            )
        assistant_response = response['messages'][0]['content']&lt;/LI-CODE&gt;
&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H3&gt;&lt;SPAN&gt;End-to-end Example&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;To bring everything together, let’s walk through a complete example using a fictional audience tribe:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The Innovators (Tech-Savvy Professional) &lt;/STRONG&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":woman_technologist:"&gt;👩🏼‍💻&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This group was identified through the clustering of demographic data. It consists primarily of younger individuals, living in urban areas, with higher incomes, college education, and no dependents.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H4&gt;&lt;SPAN&gt;Step 1: Paid reviews&lt;/SPAN&gt;&lt;/H4&gt;
&lt;P&gt;&lt;SPAN&gt;We generated fake paid reviews (with another LLM) associated with the customers in this tribe.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Figure 3: Example paid review stored in JSON format" style="width: 698px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16526i67CA99832538BD53/image-dimensions/698x280?v=v2" width="698" height="280" role="button" title="JackSandom_2-1746547352019.png" alt="Figure 3: Example paid review stored in JSON format" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Figure 3: Example paid review stored in JSON format&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H4&gt;&lt;SPAN&gt;Step 2: Persona generated by the LLM&lt;/SPAN&gt;&lt;/H4&gt;
&lt;P&gt;&lt;SPAN&gt;Using the cluster traits and sample review content, we prompted the LLM to generate a rich, natural-language persona. This acts as a pre-generated profile for the agent.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Figure 4: The persona generated from the LLM" style="width: 743px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16528iEFFD812D00B79AFE/image-size/large?v=v2&amp;amp;px=999" role="button" title="JackSandom_3-1746547351922.png" alt="Figure 4: The persona generated from the LLM" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Figure 4: The persona generated from the LLM&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H4&gt;&lt;SPAN&gt;Step 3: Using the app to test ad copy&lt;/SPAN&gt;&lt;/H4&gt;
&lt;P&gt;&lt;SPAN&gt;We then use the Databricks App to upload a piece of content and simulate how “Tech-Savvy Professionals” would respond.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Figure 5: Final Databricks App UI" style="width: 483px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16534iE3CD857392363361/image-dimensions/483x526?v=v2" width="483" height="526" role="button" title="JackSandom_0-1746550190215.gif" alt="Figure 5: Final Databricks App UI" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Figure 5: Final Databricks App UI&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This immediate, persona-specific feedback helps copywriters and marketers iterate quickly but also in a data-driven way as it combines real customer structured + unstructured data with AI reasoning.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;SPAN&gt;What’s Next: Future Improvements&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;This blog lays the groundwork for AI-driven audience insight, but there are opportunities to take it even further:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Beyond text: Incorporate image and video inputs using multimodal models to evaluate all kinds of creative content (not just copy)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Multi-agent interaction: Simulate conversations or debates between audience segments to discover alignment or conflict in perceptions&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Real-time data integration: Connect to live campaign performance and/or leverage API calling tools to incorporate social media trends or current events for real-world context&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H3&gt;&lt;SPAN&gt;Conclusion&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;In this blog, we showed how combining audience segmentation, LLMs, and agentic AI can simulate audience reactions, creating a synthetic focus group to help advertisers test and refine content. By clustering structured data and enriching it with unstructured insights, we created realistic personas and deployed agents to evaluate ad copy.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The result is a scalable, intelligent alternative to traditional focus groups that is faster to iterate and more cost-effective. Marketers and ad agencies can experiment with content and instantly see how different segments might respond, iterate confidently, and refine messaging before launch.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Databricks enables this with integrated tools for machine learning (MLflow), foundation LLMs, vector search, and Databricks Apps, supporting a complete AI workflow on one unified platform. It’s a powerful example of using Databricks not just for data and analytics, but for building innovative, AI-driven approaches to creativity and ad targeting.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 12 May 2025 12:47:13 GMT</pubDate>
    <dc:creator>JackSandom</dc:creator>
    <dc:date>2025-05-12T12:47:13Z</dc:date>
    <item>
      <title>How to Combine AI Agents and Audience Segmentation in Databricks for Smarter Ad Targeting</title>
      <link>https://community.databricks.com/t5/technical-blog/how-to-combine-ai-agents-and-audience-segmentation-in-databricks/ba-p/117955</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JackSandom_1-1746549313820.png" style="width: 708px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16532i3105BEB4C0291E16/image-dimensions/708x340?v=v2" width="708" height="340" role="button" title="JackSandom_1-1746549313820.png" alt="JackSandom_1-1746549313820.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 12:47:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/technical-blog/how-to-combine-ai-agents-and-audience-segmentation-in-databricks/ba-p/117955</guid>
      <dc:creator>JackSandom</dc:creator>
      <dc:date>2025-05-12T12:47:13Z</dc:date>
    </item>
  </channel>
</rss>

