# DSPy

29 Hacker News commenters recommended DSPy and 19 criticized it, November 2025 to November 2026. It was recommended in 8 of 13 months.

**Verdict:** People use it to structure LLM calls as typed programs and optimize prompts. Critics say its value depends on a good automated metric and up-front setup.

## Why people recommend it

- Typed structured LLM calls (4 comments): "I enjoy working with it. I mostly just use it to define the input and outputs more programmatically compared to raw prompts." ([source](https://news.ycombinator.com/item?id=47492206)) "They allow you to structure LLM calls within the broader control flow of the program, with typed inputs and outputs." ([source](https://news.ycombinator.com/item?id=48053572)) "I had better results (compared to LlamaIndex) with structuring unstructured data just by putting it in DSPy models" ([source](https://news.ycombinator.com/item?id=47494327))
- Prompt optimization with metrics (3 comments): "I like to look at it like the MVC for the Web." ([source](https://news.ycombinator.com/item?id=46331242)) "optimize your module for any given LLM (based on sample data and metrics)" ([source](https://news.ycombinator.com/item?id=45932938)) "DSPy's real value is in its prompt optimization framework" ([source](https://news.ycombinator.com/item?id=47512662))
- Modular, well-tested, hackable design (3 comments): "DSPy.rb shines when you need to decompose into multiple specialized modules with different concerns." ([source](https://news.ycombinator.com/item?id=46391217)) "such a hackable, usable framework" ([source](https://news.ycombinator.com/item?id=46290481)) "they are well tested and reliable" ([source](https://news.ycombinator.com/item?id=45796091))

## What people warn about

- Needs hand-labeled data and metrics (3 comments): "Dspy often does not really show it's benefit until you have a good 'automated metric', which can be difficult to get to." ([source](https://news.ycombinator.com/item?id=47490767)) "It's slow: you first have to get acquainted with DSPY and then get hand-labeled data for prompt optimization." ([source](https://news.ycombinator.com/item?id=47491489)) "You need to do some up-front work to set up some of the optimizers which a lot of people are averse to." ([source](https://news.ycombinator.com/item?id=47490641))
- Python-only, awkward in non-Python stacks (3 comments): "we had to stand up an entire new repo in Python for it" ([source](https://news.ycombinator.com/item?id=47491060)) "We had to stand up an entire new repo in Python for it, because the vast majority of our code is not Python." ([source](https://news.ycombinator.com/item?id=47492646)) "who the hell puts Python in production just to make some API calls?" ([source](https://news.ycombinator.com/item?id=47491972))
- Little value for the added friction (3 comments): "Dspy does not solve an immediate problem, which is why many feel this way" ([source](https://news.ycombinator.com/item?id=47490817)) "it literally gave me nothing of added value in practice but a lot of friction when i needed precise control over the context" ([source](https://news.ycombinator.com/item?id=47491354)) "layers on layer on top of the base LLM calls with not so much to show for it" ([source](https://news.ycombinator.com/item?id=47491115))

## Alternatives hackers recommend

- [Claude Agent SDK](https://hackerapproved.com/p/claude-agent-sdk.md): 36 recommend
- [LangChain](https://hackerapproved.com/p/langchain.md): 32 recommend
- [Mastra](https://hackerapproved.com/p/mastra.md): 32 recommend
- [LangGraph](https://hackerapproved.com/p/langgraph.md): 31 recommend
- [Pydantic AI](https://hackerapproved.com/p/pydantic-ai.md): 27 recommend

## Cite as

Hacker Approved, "DSPy", https://hackerapproved.com/p/dspy/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
