{
 "schema_version": 1,
 "generated": "2026-11-09",
 "id": "dottxt-ai-outlines--categorize-products-in-batches-with-outlines",
 "repo": "dottxt-ai/outlines",
 "repo_url": "https://github.com/dottxt-ai/outlines",
 "repo_slug": "dottxt-ai-outlines",
 "title": "Categorize product descriptions in batches",
 "page_title": "How to categorize product descriptions in batches with Outlines",
 "summary": "Pass a list of descriptions through a template and get a typed category, sub category and attributes for each.",
 "who": "An e-commerce or catalog engineer cleaning inventory data.",
 "problem": "Manual categorization of product feeds does not scale.",
 "outcome": "A list of ProductCategory objects ready to update your inventory system.",
 "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"
 ],
 "agent_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.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "Structure is guaranteed, but the category values themselves can still be wrong, so spot check a sample.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/dottxt-ai-outlines/categorize-products-in-batches-with-outlines/",
 "md": "https://dedupedai.com/use-cases/dottxt-ai-outlines/categorize-products-in-batches-with-outlines/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/dottxt-ai-outlines--categorize-products-in-batches-with-outlines.json",
 "api_version": "v1"
}
