What do you want to do?
3 use cases
-
Turn support emails into structured tickets
Define a ServiceTicket schema and have the model fill it from a free-form customer email, then route on the fields.
View prompt
Using dottxt-ai/outlines, install it with `pip install outlines` and build the ServiceTicket triage example for emails in <my inbox export>, printing the parsed tickets.
-
Categorize product descriptions in batches
Pass a list of descriptions through a template and get a typed category, sub category and attributes for each.
View prompt
With dottxt-ai/outlines, categorize every row of <my product CSV> using a ProductCategory schema and outlines.Template, and write the results to a new CSV.
-
Extract event details, with a safe fallback
Use a union type so the model returns structured event info or the literal I don't know when data is missing.
View prompt
Using dottxt-ai/outlines, build an EventResponse union schema and run it over <my event descriptions>, reporting which ones returned I don't know.
Quick start with Outlines
- Check you have what it needs: Python with pip; install with `pip install outlines`; A model backend, such as a Hugging Face transformers model, as in the README quickstart; Pydantic for typed schemas.
- Open dottxt-ai/outlines on GitHub and read the README and license.
- Install the library with
pip install outlines - Connect a model with Outlines.from_transformers as in the README, using microsoft/Phi-3-mini-4k-instruct
- Define a ServiceTicket Pydantic model with priority, category, requires_manager, summary and action_items
- Call the model with the prompt and ServiceTicket, parse with ServiceTicket.model_validate_json, and alert a manager when priority is urgent
These steps come from our top use case, Turn support emails into structured tickets, which also has a copy-paste agent prompt.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for dottxt-ai/outlines
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeAbout this repo
- Who it is forPython developers who are tired of parsing and retrying malformed JSON from language models.
- Why it is hot16k stars, talked about in 2 AI sources we track
- LanguagePython
- Sourcegithub.com/dottxt-ai/outlines ยท Back to Hot repos
Requirements
- Python with pip; install with `pip install outlines`
- A model backend, such as a Hugging Face transformers model, as in the README quickstart
- Pydantic for typed schemas
Add this badge to your README
Maintain Outlines? Show readers where to find these use cases.
Markdown
[](https://dedupedai.com/use-cases/dottxt-ai-outlines/?utm_source=github&utm_medium=badge&utm_campaign=dottxt-ai-outlines)
HTML
<a href="https://dedupedai.com/use-cases/dottxt-ai-outlines/?utm_source=github&utm_medium=badge&utm_campaign=dottxt-ai-outlines"><img src="https://dedupedai.com/badge/dottxt-ai/outlines.svg" alt="Use cases on Deduped" height="20"></a>
A static image, no tracking script. About the badge
Questions about Outlines
What is Outlines?
Outlines guarantees structured outputs during generation from any LLM. You pass the output type, such as a Literal, an int or a Pydantic model, and get back text that matches it, with the same code working across OpenAI, Ollama, vLLM, transformers and other backends. It is an open-source project on GitHub: https://github.com/dottxt-ai/outlines.
How do I use Outlines?
Install the library with pip install outlines; then connect a model with Outlines.from_transformers as in the README, using microsoft/Phi-3-mini-4k-instruct; Define a ServiceTicket Pydantic model with priority, category, requires_manager, summary and action_items. The use cases on this page give the full steps and a copy-paste agent prompt for each job.
Who is Outlines for?
Python developers who are tired of parsing and retrying malformed JSON from language models.
What can I do with Outlines?
3 use cases so far, for example: Turn support emails into structured tickets; Categorize product descriptions in batches; Extract event details, with a safe fallback. Each has steps and a copy-paste agent prompt.
What do I need to run Outlines?
Python with pip; install with `pip install outlines`; A model backend, such as a Hugging Face transformers model, as in the README quickstart; Pydantic for typed schemas.
What are alternatives to Outlines?
Other hot AI repos in Software and DevOps: Skills, Claude Mem, Freellmapi, Andrej Karpathy Skills, Agent Desktop.
Is Outlines safe to run?
Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.