Live data from Hacker News

Effective context engineering for AI agents

anthropic.com

1–10 of 36 posts

Re: Effective context engineering for AI agents

#2
The article doesn't really give helpful advice here, but please don't vibe this.

Create evals from previous issues and current tests. Use DSPy on prompts. Create hypotheses for the value of different context packs, and run an eval matrix to see what actually works and what doesn't. Instrument your agents with Otel and stratify failure cases to understand where your agents are breaking.

Re: Effective context engineering for AI agents

#5

The article doesn't really give helpful advice here, but please don't vibe this. Create evals from previous issues and current tests. Use DSPy on prompts. Create hypotheses for the value of different context packs, and run an eval matrix to see what actually works and what doesn't. Instrument your agents with Otel and stratify failure cases to understand where your agents are breaking.

How hard is dspy to setup?

Isn't it a programming language type thing?

Can you even integrate that into an existing codebase easily?

Re: Effective context engineering for AI agents

#7
post #5

The article doesn't really give helpful advice here, but please don't vibe this. Create evals from previous issues and current tests. Use DSPy on prompts. Create hypotheses for the value of different context packs, and run an eval matrix to see what actually works and what doesn't. Instrument your agents with Otel and stratify failure cases to understand where your agents are breaking.

How hard is dspy to setup? Isn't it a programming language type thing? Can you even integrate that into an existing codebase easily?

It's pretty straightforward, different optimizers have different requirements. Some require example inputs/outputs, others will just optimize on whatever you've got. You can use codex/claude code to set it up in order to bootstrap quickly, they're decent at it.

Re: Effective context engineering for AI agents

#9
post #5

Earlier quoted context omitted.

How hard is dspy to setup? Isn't it a programming language type thing? Can you even integrate that into an existing codebase easily?

It's pretty straightforward, different optimizers have different requirements. Some require example inputs/outputs, others will just optimize on whatever you've got. You can use codex/claude code to set it up in order to bootstrap quickly, they're decent at it.

Does dspy support structured outputs?
Post reply on HN