CEDAR: Context Engineering for Agentic Data Science
Rishiraj Saha Roy, Chris Hinze, Luzian Hahn, Fabian Kuech
TL;DR
CEDAR tackles the challenge of solving data science problems with large datasets under context and privacy constraints by introducing context engineering in an agentic DS system. The approach decomposes the workflow into structured prompts and an interleaved text–code plan executed by multiple LLM agents, with data processed locally inside containerized tools. Key contributions include a three-agent architecture, a schema-driven tool interface, and a robust history rendering mechanism that maintains traceability while limiting context size, demonstrated on canonical Kaggle tasks. The work highlights practical benefits for privacy-conscious, on-premise deployments and provides a transparent, reusable blueprint for agentic data science workflows.
Abstract
We demonstrate CEDAR, an application for automating data science (DS) tasks with an agentic setup. Solving DS problems with LLMs is an underexplored area that has immense market value. The challenges are manifold: task complexities, data sizes, computational limitations, and context restrictions. We show that these can be alleviated via effective context engineering. We first impose structure into the initial prompt with DS-specific input fields, that serve as instructions for the agentic system. The solution is then materialized as an enumerated sequence of interleaved plan and code blocks generated by separate LLM agents, providing a readable structure to the context at any step of the workflow. Function calls for generating these intermediate texts, and for corresponding Python code, ensure that data stays local, and only aggregate statistics and associated instructions are injected into LLM prompts. Fault tolerance and context management are introduced via iterative code generation and smart history rendering. The viability of our agentic data scientist is demonstrated using canonical Kaggle challenges.
