Improved intent accuracy 4× through spec-driven and automated context engineering

Overview

To make AI agents more reliable, I redesigned how we capture and use user intent. By combining spec-driven design with automated context engineering, I achieved a 4× improvement in intent accuracy.

Initial Challenge

  • Agents often misinterpreted ambiguous requests.
  • Context was inconsistent, making it hard for models to choose the right action.

Approach

  • Defined clear, machine-readable specs for what each agent and workflow should do
  • Standardized how context is collected, cleaned, and attached to each request
  • Automated context building so it is consistent and repeatable

What I Contributed

  • Designed the spec format and conventions
  • Implemented context engineering patterns that the entire system uses
  • Collaborated on evaluation methods to measure improvements in intent accuracy

Results

  • Intent accuracy improved by 4× compared to the original baseline
  • Users saw fewer misunderstandings and edge-case failures
  • Downstream systems became more predictable and easier to monitor

Connected Skills

  • BAML — for structured prompts and specs
  • LangGraph — for multi-agent workflows
  • Agent evaluation frameworks