---
title: "AI in CDP"
slug: "ai-in-cdp"
abstract: "Get AI-powered insights and recommendations, and use natural language prompts to create custom JavaScript for working with Sitecore CDP data in audience export, conditions, and session traits."
---
# AI in CDP

Sitecore Customer Data Platform (CDP) includes AI features that enhance your work with the data available in your instance of CDP. AI features are powered by [Sitecore Stream](https://doc.sitecore.com/stream/en/users/sitecore-stream/sitecore-stream.html).

## AI-powered insights and recommendations

Generative insights, or [Gensights](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/dashboards-in-sitecore-cdp/gensights-dashboard.html "Gensights dashboard"), is an AI-powered dashboard that analyzes trends, user behavior, and performance metrics from other Sitecore CDP dashboards. Gensights transforms complex data into clear, natural-language summaries. It also recommends actionable strategies to improve customer engagement and digital performance.

## AI-assisted code generation via Sitecore Stream

You can write code in CDP with the help of the Code Assistant, an AI-powered tool that generates JavaScript tailored to the specific CDP feature you are working with. You prompt the Code Assistant in natural language, and it responds with complete JavaScript code, ready for use within that feature.

Code Assistant is available in the following areas of CDP:

- [Audience export](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/manage-audience-exports.html#UUID-7311f83e-762f-dd3c-add1-120ca17f52e0 "Create JavaScript for an audience export with the Code Assistant") - generate JavaScript code to enrich the audience data that you export from CDP.
- [Conditions](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/developer-center/conditions/create-a-condition-with-the-code-assistant.html "Create a condition with the Code Assistant") - create custom conditions so you can define exactly which part of the audience to include in an export.
- [Session traits](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/developer-center/session-traits/create-a-session-trait-with-the-code-assistant.html "Create a session trait with the Code Assistant") - create a session trait to aggregate events from a customer's web session, perform calculations at the end of the session, and store the results as a session trait attribute in the guest profile. You can use session traits to filter segments for audience exports for more targeted marketing efforts.

For more information about the assistant and how to best prompt it, see [Code Assistant](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/ai-in-cdp/code-assistant.html "Code Assistant").