Conversation
Pegasystems Inc.
CA
Last activity: 15 Jan 2026 3:10 EST
Trim the Payload: Use Data Transforms to Minimize Token Consumption
Use Data Transforms for token efficiency for Agents and Coach: Apply Data Transforms to supply only essential information from the Data Page. This reduces the amount of data the Large Language Model (LLM) processes, improving token efficiency and response speed. Sample token usage when conversing with a Coach:
Agent Data source:

Coach Data souce:

Token Usage:
- No data mapping: 12,456 tokens. The entire Data Page is sent to the LLM.
- Auto-mapping all data: 5,801 tokens. More efficient than no mapping, but may still include unnecessary fields.
- Manually mapping essential fields only: 1,289 tokens. Most efficient, as only essential fields are processed.
Auto-map all data: When creating a Data Transform, you can select the option to auto-map all data to automatically map between JSON and the Clipboard (and vice versa). This is faster to set up, but Coach responses will consume more tokens. For more information, see Data Transform form - Auto-map action.

Manually mapping data(RECOMMENDED): Building a precise Data Transform that maps only what’s needed can significantly reduce token usage, resulting in faster processing and a smoother user experience. A referenced figure shows a sample Data Transform that maps data for a Page List Data Page in an application that processes résumés from job candidates.

Use AI tracer
For the most efficient processing, use AI tracer for the following purposes:
- Visualizing token usage
- Identifying unnecessary data sent for processing
- Iteratively refining your mappings and prompts
Efficient token usage is especially important in long-running or high-volume applications. Analyzing Coach statistics in AI tracer can help you reach the most efficient results. Because AI tracer includes interaction history, you can compare different configurations for the token usage.
Pega GenAI Cookbook - Recipes series
Enjoyed this article? See more similar articles in Pega Cookbook - Recipes 🔥🔥🔥 series.