Sidney Shapiro and colleagues ran the same model, GPT-4o mini, through six Python integrations. The study checks two things separately: whether an output has the expected fields and types, and whether its values or actions are right. For database questions, the authors compared results from the generated query with the expected results.
- Across 5,400 runs on 300 distinct cases, LangGraph and PydanticAI reached 100% shape validity and DSPy reached 99.8%. Their average task scores ranged from 0.911 to 0.940 out of 1.
- Among outputs with the right shape, 642 of 1,194 extraction runs and 370 of 609 compliance runs fell below the automated 0.99 cutoff. The human review of these flags was not complete.
- In smaller tests, PydanticAI’s extra checks produced modest task-score gains while shape validity stayed at 100%. The main comparison already showed large differences without those features enabled.
Caveat: This compares specific integrations around one model on synthetic tasks. It does not rank the libraries’ full capabilities.
Treat schema acceptance like admission to a second check. It tells you an invoice total is a number, not that the customer owes it.