Table of Contents
Fetching ...

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.

CEDAR: Context Engineering for Agentic Data Science

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.
Paper Structure (14 sections, 2 figures, 1 table)

This paper contains 14 sections, 2 figures, 1 table.

Figures (2)

  • Figure 1: The CEDAR system with three LLM agents, facilitating a human data scientist's job.
  • Figure 2: A screenshot of our Cedar application, solving a Kaggle competition on predicting better LLM responses.