Skip to main content

How AI context engineering improves the connected customer experience

Profile photo of author Jake Cohen
Jake Cohen
12 min read
Artificial intelligence
September 8, 2026
Set as Preferred Source

I have a friend who's the CEO of a global furniture company that does more than $12 billion a year in sales. We sat down for lunch earlier this year, and he told me his company allocates 5% of their total IT spend to AI experimentation. But none of their proofs of concept have been successful yet.

He's not alone. Research shows that every year, more businesses are spending more on AI. CMOs now allocate an average of 15.3% of marketing budgets to AI initiatives, according to Gartner's 2026 CMO Spend Survey, yet only 30% of those organizations say they're ready to scale what they've built. And according to PwC's AI ROI research, just 20% of the 1,217 companies they surveyed capture 74% of AI-driven returns.

I’ve been at Klaviyo for 10 years in product, marketing, and insights, and cofounded a VC firm that invests in what’s coming next in AI and retail. I recently brought both of those perspectives together and shared my thoughts at CommerceNext, the retail and ecommerce conference for marketers.

At CommerceNext, I covered how context engineering can help your company use AI more effectively. Watch my talk here, or read the recap below.

What is AI context engineering?

Stanford University defines AI as "a branch of computer science focused on creating systems capable of performing tasks that typically require human intelligence."

I define AI as a stack, where each layer depends on the one that comes before it. Here’s what that looks like:

  • Data: At the bottom of the stack sits the data powering your AI (duh). This might be your company's own data, plus everything else available across the internet.
  • Models: Above the data layer are the AI models that read and store data and understand relationships between inputs.
  • Inference: At the next layer, AI draws on those models and the data it’s trained on to answer the questions you ask.
  • Context: This is where you store information about you that the inference layer should automatically consider to give you better answers, like brand guidelines and information about your competitive landscape.
  • AI agents: At the top of the stack are AI agents that act on your behalf. How effectively they work depends on the context you give them, and the rest of the stack below.

The context layer, which helps AI produce better, more authentic outputs. This is what I mean when I say “context engineering”: it’s the ongoing process of refining the instructions and information you give AI to get the results you actually want. In Claude, your context is called Projects or Skills. In ChatGPT, it's called Projects or Knowledge files.

No matter what you call it, context compounds, so the more context you give AI, the better results you get over time.

How context engineering creates a connected customer experience

AI is shaping modern behavior, and that includes the commerce experience. Let’s walk through the stack again, this time with each layer mapped to the AI capabilities marketers use every day.

Your data trains the AI models

Models are trained by two types of data:

  1. Public data, which is effectively what you can find publicly on the internet
  2. Private data: if you make your own data available during the training process, the responses from inference will reflect this private data.

For example, if you're using a CRM, the data it already contains, like purchase history, browsing behavior, email and text message engagement, and support conversations, can be used to fuel your AI models (more on those next).

Data-based inference powers smart recommendations

At the inference layer, AI can enhance your marketing or customer service strategy based on the data in your CRM that gets fed into the AI platform.

Picture a returning customer who's browsed the same pair of running shoes twice this week but hasn't bought. A predictive AI model knows their expected lifetime value and how likely they are to buy in the next few days, based on years of purchase and browsing history.

Then, AI recommends which channel they’re most likely to engage with next. On email, their open rate has dropped, but on text messaging, they’ve clicked twice this month, so that’s the first channel in line. AI also knows the time they’re most likely to engage and holds the message until then. The itself recommends a specific product, the exact pair of shoes they’ve been eyeing.

Context optimizes AI outputs

At this point, many marketers stop and refine the output manually. And that’s fine, but with proper context engineering, the output can get closer to your vision, so you need fewer and fewer revisions.

Context engineering gives AI “context clues” a generic model wouldn't know. It’s the difference between an answer that is tailored to you versus anyone else. As you document more context, like policies, your taste, guardrails, good/bad examples to learn from, etc., the responses you get will feel more and more accurate for you. Start documenting that context today, and the AI system will immediately start improving its own recommendations. Some context artifacts to consider to help your AI fill in the blanks:

  • Brand voice: a documented reference for how your brand sounds, including tone and word choice
  • Brand guidelines for design: your visual rules, covering logo use, color, and layout
  • Customer personas: who buys from you and what drives that decision
  • Products you sell: your catalog, structured so AI can reference it accurately
  • Competitive landscape and differentiation: what makes your brand different
  • Standard of excellence: what "good" looks like for your brand, spelled out

AI agents run customer service and marketing work

AI agents built with the right context, using high-quality inference, the latest models, and the data in your CRM, are getting close to acting on your brand’s behalf across marketing and customer service.

An AI marketing agent can turn a one-line prompt, something like "Win back customers who haven't ordered in 60 days," into a launch-ready campaign. It builds the audience, drafts copy in your brand voice, and picks the channel and send time, then lays the whole thing out for you to review before anything goes live. You can also chat with your AI marketing agent to understand your marketing performance and identify areas of opportunity.

An AI customer agent can answer specific shopper questions, like where a package is or whether a discontinued item is coming back in stock. It can look up an order and process a return or a reorder itself, instead of routing to a person. And when a customer asks about a return, it can suggest a different size or a similar style in that same conversation. That shifts customer service from a cost center to a source of revenue: an AI customer agent resolving a ticket can also make a sale.

3 markers of AI hype to watch out for

As you’re evaluating AI or experimenting with proofs of concept for your business, be aware that not every AI pitch holds up once you look under the hood. Watch out for these markers of AI hype:

Vibe-coded apps

The promise is alluring: write a prompt and get working code back. It's a compelling pitch, but it doesn't hold up in production.

You can't build reliable apps from a prompt alone. Once real traffic and real data show up, the vibe coded system tends to fall apart. It can’t handle the data, or it can’t handle the amount of traffic let alone having multiple people log in at once. Vibe coding is a solid way to prototype, but shipping to production for customer-facing apps still calls for actual engineering.

Automagical AI

Plenty of people have told me something along these lines about an AI tool: “Just turn it on, and it works perfectly.” I've heard this more times than I can count. I'm yet to see it deliver a dazzling experience.

Without context, an untuned AI customer agent, for example, can handle some of the volume that comes its way, but it leaves much to be desired. Add context, train it, and the resolution rate climbs.

Fully autonomous agents

On that note, autonomous agents need training and testing on an ongoing basis, or you could risk creating a bad experience for your customers and hurting your brand.

For example, the AI agent framework OpenClaw can set up a chat conversation over Telegram or WhatsApp on someone’s behalf, changing a restaurant reservation or doing the grocery shopping. In one case, an AI agent that had run smoothly for months misread a quantity field and ordered 40 heads of garlic instead of two. Without a human check, the AI agent ran amok.

Similarly, in April 2026, an AI coding agent deleted a startup's entire production database, along with its backups, in 9 seconds. The founder restored what he could from a backup that was 3 months old, then spent hours helping customers reconstruct their own bookings from payment and calendar histories.

AI can’t succeed completely on its own. It needs the right protection, the right governance, the right context, and a clear line of (human) responsibility behind it.

How to build a context engineering ethos into your team

Context engineering is a skill your team needs to build. Providing your AI with a living memory, with context artifacts that you keep updated with the latest sources of truth about your products and your brand, requires dedication from your team and likely even a mindset change.

Here’s where I’d start to coach your team to become context engineers:

  • Slow down to speed up. Invest in training so your team feels confident using AI. Create documentation for AI governance so that everyone understands when to use AI and when not to.
  • Name context artifact champions. Make different team members responsible for the different context artifacts your AI will be trained on, like your brand voice and design guidelines, customer personas, product catalog, and competitive differentiation. Remind them to update it on a quarterly, if not monthly, basis.
  • Partner with the CIO/CTO. This person needs a seat at the table for any conversation about AI. Data informs every other layer of the system, so if your data isn't in the right shape, nothing built on top of it will work the way you want. Name an accountable owner from the CIO's office so that relationship has a real person behind it rather than a standing meeting invite.
  • Cultivate first-principle thinking on your team. Train your team to trust that their own perspective and leadership matter first, before AI. Teach them to start any problem by thinking about the ideal outcome, assume anything is possible, and resist the urge to just recreate what they’re already doing with AI.

Klaviyo brings real-time customer data and agentic AI together with marketing and customer service, so your brand can act on every signal with human context in the lead.

Jake Cohen
Jake Cohen
Jake Cohen is VP of Insights and Strategy at Klaviyo, the CRM built for consumer brands. In his role, Jake is dedicated to strengthening and expanding Klaviyo’s partnership with Shopify, driving the company’s position as a thought leader in ecommerce. Prior to Klaviyo, Jake was Director of Customer Marketing at DataGravity and also spent three and a half years at Privy developing a go-to-market strategy and building a B2B marketing funnel from scratch. He also gained valuable experience in sales and strategy during his three years at CBS Radio. Jake earned his bachelor’s degree in Political Science and Italian from Middlebury College.

Related content

Customer Agent is more than a support tool
Most brands point their AI customer service agent at the support queue. ECD's Zak Cassady-Dorion shares how to turn Klaviyo Customer Agent into a revenue channel.
Scale email production with Claude x Klaviyo
Scale email production without more headcount. Here are the 6 steps one agency founder uses to audit accounts, design emails, and push drafts into Klaviyo.
Automated flow health monitoring
See how one retention team built an automated flow health monitor with Claude, catching underperforming emails across 140 flows every single week.