My App
AI SystemLLM System

Classification Gate

The classifier runs first on every chat turn. It decides whether the question is about the user's own pottery, so off-topic questions stop before any retrieval or SQL work happens.

  • Structured output (Pydantic model): a binary answer and a short reason.
  • In scope: questions about the user's pieces, firing, glazes, clay, and logged notes, including questions that read or summarize their data, such as counts.
  • Out of scope: other domains, pottery that is not the user's own, and requests to add, edit, or delete entries. The chat is for asking questions; it does not change the user's data. A question that is out of scope ends the turn with a fixed refusal that includes the reason.
  • Generous by default: a vague question that could plausibly be about the user's pottery is let through.
  • History-aware: the classifier sees the conversation, so a follow-up such as "and the next step?" is judged in context.

How well the gate performs is covered in Classification Evaluation.