DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to turn support emails into structured tickets with Outlines

Define a ServiceTicket schema and have the model fill it from a free-form customer email, then route on the fields.

Short answer: 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. All steps.

  • Top pick
  • Software and DevOps
  • Intermediate
  • 1 hour
  • From the README
  • Claude Code
  • Codex
  • Cursor
  • Gemini CLI

privacy. Customer emails go to whichever model backend you connect, so use a local model if the messages are sensitive.

Who it is forA support or ops engineer automating triage.

The problemFree-form emails need a priority, category and escalation flag before routing.

The outcomeA validated ticket object you can send to a manager alert or a queue.

What you need first

  • 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

Steps

  1. Install the library with pip install outlines
  2. Connect a model with Outlines.from_transformers as in the README, using microsoft/Phi-3-mini-4k-instruct
  3. Define a ServiceTicket Pydantic model with priority, category, requires_manager, summary and action_items
  4. Call the model with the prompt and ServiceTicket, parse with ServiceTicket.model_validate_json, and alert a manager when priority is urgent

Prompt for your agent

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.

Caveat. The README example runs a transformers model with device_map set to auto, so a GPU helps.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for dottxt-ai/outlines and "Turn support emails into structured tickets"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer