Structured Output
Output format is a core challenge of integrating language models into larger workflows, and numerous libraries have been created to help.
- OpenAI Functions
- jxnl/instructor - function call wrapper with Pydantic model validation
- Semantic Kernal
- Guidance
- Jsonformer
- Kor - schema-driven output extraction
- Guardrails
- TypeChat - get well-typed responses from language models
- Marvin AI - structured output and other agent-building shortcuts
- Fructose
- GGML BNF - Constrain llama.cpp model inference with a formal grammar