Who it is forAn e-commerce or catalog engineer cleaning inventory data.
The problemManual categorization of product feeds does not scale.
The outcomeA list of ProductCategory objects ready to update your inventory system.
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
- Install the library with
pip install outlines - Connect a model with Outlines.from_transformers as in the quickstart
- Define ProductCategory with main_category, sub_category, attributes and an optional brand_match
- Build an Outlines.Template and call the model on the whole list of prompts, then validate each result with model_validate_json
Prompt for your agent
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.
Caveat. Structure is guaranteed, but the category values themselves can still be wrong, so spot check a sample.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for dottxt-ai/outlines and "Categorize product descriptions in batches"
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 freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer