AI engineering glossary · Prompt context engineering
What is outlines library?
Outlines library: An open-source Python library for guiding text generation with regular expressions, JSON Schemas and grammars, by restricting the tokens the model can pick at each step. It works with local open-weights models.
Outlines library: an example
Use Outlines with a schema so a local model must output {"city": string, "pincode": 6-digit string}.
Related terms
More Prompt context engineering terms
- Output format specification
- Output parser
- Output repair
- Parallel tool calls
- Plan-and-Solve prompting
- Position bias
- Presence penalty
- Program-aided language models
Where you learn it
Outlines library is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.