The 7 Layers of an LLM-Based Feedback Classification System

November 27, 2026

The best architecture for an LLM-based feedback classification system classifies each piece of feedback once, when it arrives, against a versioned taxonomy, stores the prediction, and serves every dashboard, warehouse query and AI agent from that stored layer. In practice that takes seven layers: ingestion and normalization, PII redaction, segmentation of multi-topic records, a taxonomy store, the classifier, evals with drift monitoring, and storage and serving. The model call is the smallest of the seven. Most of the engineering, and most of the ways these systems fail, sit in the layers around it.

This guide is the vendor-neutral, end-to-end view. For one stack, see the steps to classify customer feedback in Snowflake or dbt with LLM functions. For one vendor's implementation, read how Enterpret classifies customer feedback under the hood. Two layers have their own guides: how to build evals for a feedback classifier, and why internal LLM feedback classifiers degrade over time. Here the goal is the whole system on one page.

The architecture at a glance

Layer 6 is drawn in line but runs alongside the pipeline: it gates changes to layers 4 and 5 and watches what layer 7 serves.

SOURCES   tickets . calls . surveys . reviews . community . CRM
   |
[1] Ingest + normalize   one schema, stable id, text hash, account_id
   |
[2] Redact PII           before text reaches a model, a log or an eval set
   |
[3] Segment              one record becomes N feedback units
   |
[4] Taxonomy store ----> versioned nodes, descriptions, owners
   |                          |
[5] Classify <---------------+  prompted LLM | fine-tuned model | embed + LLM
   |
[6] Evals + drift        golden set, repeatability, whole-tree checks
   |
[7] Store + serve        predictions table: dashboards, warehouse, API, agents

The 7 layers of an LLM-based feedback classification system

1. Ingestion and normalization

Every source gets a loader that maps records into one schema: a feedback_id built from source plus source ID, channel, body text, author role (customer or agent), timestamp, user and account IDs, and typed metadata such as plan, rating and locale.

Strip signatures, quoted replies, agent macros and bot messages, or the classifier will label your own canned responses. Keep speaker labels on calls so the rep's pitch is not counted as feedback. Hash the cleaned text so duplicates are skipped and records are reclassified only when their text changes.

Resolve identity here: matching a requester email or call participant to a CRM account once is what lets every downstream query segment by plan or ARR. Decision: batch or streaming. Hourly batch suits most feedback; incident detection needs something closer to real time.

2. PII redaction

Redact before text reaches a model provider, a prompt log or your eval set. Patterns catch emails, phone numbers and card numbers; names and addresses need a named-entity model such as Microsoft Presidio (open source) or Google Cloud's Sensitive Data Protection (managed).

Use typed placeholders like [EMAIL] or [PERSON] so the classifier still sees the sentence's shape. Where a team needs identity, for example to close the loop, keep a reversible mapping in a separate, restricted store. The steps to redact PII from customer feedback cover the policy side. Decision: what your model provider retains, and for how long.

3. Segmentation of multi-topic records

A 40-minute call or a long NPS comment usually raises several topics. One label per record keeps the loudest and drops the rest.

Split records into feedback units. Simple systems split by sentence or speaker turn; better ones ask an LLM to extract each distinct point as a verbatim span, then check that every span exists in the source text to catch invented quotes. Keep the parent record ID on each unit so you can count units, records or accounts, and merge points repeated within one record so they are not double counted.

Decision: one LLM call for segmenting and classifying (cheaper, harder to debug) or two (more tokens, separately testable).

4. Taxonomy store and versioning

The taxonomy is data, not prompt text. Store each node with an ID, parent, name, description, examples, owning team, status (active, deprecated, merged into) and version. Render prompts from this table and write node_id and taxonomy_version onto every prediction. Include an explicit "Other" node so records that fit nothing stay visible.

Treat changes as migrations: each merge, split or rename ships with an old-to-new mapping and a backfill decision.

Be careful about letting an LLM write the tree. Enterpret's taxonomy evaluation paper found that AI-generated taxonomies passed every generic quality check, yet 97.7 to 100% of their leaf names restated an ancestor's name, compared with 13.9% and 2.9% in production references. Branch leakage, where a record lands in more than one top-level product area, ran 34.7% to 76.4% in generated trees versus about 20% in the references. Before publishing a version, check two whole-tree properties: are leaf labels informative on their own, and can each top-level branch be owned by one team?

5. The classifier

Three patterns cover most systems: a prompted LLM with structured output, a fine-tuned small model, or embeddings that shortlist nodes for an LLM to choose between (compared in the next section). Whichever you pick:

  • Constrain output to valid node IDs with a JSON schema, then validate against the taxonomy store: a schema guarantees shape, not membership.
  • Classify hierarchically when the label set is large: product area first, then themes within it.
  • Let the model abstain to "Other" with a confidence you can threshold.
  • Pin the model version, set temperature to 0, and record model and prompt versions on every prediction.
  • Use batch endpoints for backfills.

Most importantly, classify once and store the result, rather than sending raw feedback to an LLM whenever someone asks a question. Enterpret's study of run-to-run instability across eight frontier models measured what that costs: on the same records, a raw model changed more than half of its theme set between two runs at 100 records, and nearly three quarters at 5,000 (theme churn 0.552 rising to 0.726). With the model held constant, an agent that queried a persistent taxonomy and stored record-level predictions cut churn by 86 to 88%.

Enterpret research
0 of 117
Valid run pairs in which the taxonomy-grounded agent reported a different volume for a matched theme. Raw models' counts on matched themes moved 7.5 to 9.8% between runs.

The paper measures stability, not accuracy: a system can repeat the same wrong answer, which is why layer 6 exists. But a number that changes every time you ask cannot be trended.

6. Evals, golden set and drift monitoring

Build a golden set from real feedback, stratified by source and label, labeled by two people with disagreements adjudicated. Score precision and recall per label, since rare labels are often the ones teams care about. Add a repeatability test (classify the same set twice and measure agreement), a segmentation check and the whole-tree checks from layer 4.

Gate every prompt, model and taxonomy change on these evals in CI. In production, watch the "Other" rate, label distribution by source, confidence, and new terms no node covers. Audit live samples on a schedule and refresh the golden set as the product changes.

7. Storage and serving

Write predictions to one table keyed on the feedback unit: unit_id, parent record, node_id, confidence, sentiment, and taxonomy, model and prompt versions, joined to accounts.

Serve every consumer from that table: BI dashboards, the warehouse, Slack alerts, Jira or Linear tickets, an internal API and AI agents. For agents, expose a query tool or MCP server that returns counts and quotes from stored predictions instead of rereading raw text. One source of truth means the dashboard, the weekly memo and the agent quote the same number.

Classifier patterns compared

Mature systems often end up hybrid: embeddings to shortlist, an LLM to decide, and a distilled small model for high-volume sources once the taxonomy settles.

PatternStrengthsCostsFits when
Prompted LLM with structured outputNo training data needed; taxonomy changes ship as data; handles nuance and multi-label wellHighest per-record cost and latency; prompt grows with the label set; provider model changes need re-evaluationEarly stage, a few dozen labels, taxonomy still moving
Fine-tuned small modelCheap, fast, deterministic at inference; runs in your own infrastructureNeeds a large labeled set; every taxonomy change means relabeling and retraining; weaker on rare labelsHigh volume, stable taxonomy, strict latency or data residency needs
Embeddings plus LLMScales to hundreds of nodes; shorter prompts; retrieved examples act as dynamic few-shotTwo systems to maintain; recall of the shortlist caps accuracy; embedding model upgrades shift resultsLarge or deep taxonomy, mixed sources, cost pressure

Build vs buy: where the effort goes

Building is reasonable when feedback comes from one or two sources, the taxonomy is small and stable, a data team owns the warehouse, or classification is part of your own product. A one-source prototype of layers 1, 5 and 7 is a short project.

The ongoing work is elsewhere. Layer 1 grows with every source and API change. Layer 3 needs tuning per channel. Layer 4 needs an owner who reviews new terms, merges duplicates and plans backfills as the product ships. Layer 6 reruns whenever a model is deprecated or a prompt changes. Those layers rarely appear in the initial estimate, and they are where a platform saves effort. See the questions to answer before you build or buy a customer intelligence platform for a scorecard.

A common middle path: buy the classified layer and build workflows on top, pulling stored predictions into your warehouse, agents and tools through an API, exports or an MCP server.

Tools that do this

Warehouse AI functions

Snowflake Cortex (AI_CLASSIFY and AI_COMPLETE), Databricks AI Functions (ai_classify and ai_query) and BigQuery's Gemini-backed AI functions (including AI.CLASSIFY) put layer 5 inside the warehouse, next to account data and its access controls. You still build ingestion, segmentation, taxonomy governance and evals.

Model APIs

OpenAI, Anthropic and Google's Gemini API offer structured outputs and batch processing for the classifier and backfills in any stack: the most control, and every other layer to own.

Open-source and eval tooling

Hugging Face Transformers, SetFit and sentence-transformers cover fine-tuned classifiers and embeddings, and Presidio covers PII detection, with no per-call bill. Braintrust, Langfuse and promptfoo help with layer 6 (datasets, scoring, tracing), though the golden set and whole-tree checks are yours to define.

Enterpret

Enterpret is a customer intelligence platform that runs this pipeline as a managed system. It ingests feedback from 50+ sources and joins records to users and accounts (layer 1), classifies each distinct piece of feedback inside a record (layer 3), and builds and maintains an Adaptive Taxonomy from your own feedback, with proposed changes reviewed before they go live (layer 4). Predictions are stored once and linked to accounts and revenue in the Customer Context Graph (layers 5 and 7). Teams read the same layer in Enterpret dashboards, in Wisdom, by tagging the Enterpret Agent in Slack, through the API and exports, in Jira and Linear workflows, and from Claude, Claude Code, Cursor, Codex, Glean and Notion through the Enterpret MCP server. The tradeoff is that you work within its taxonomy and data model rather than designing your own, and classification that has to run inside your product's own runtime is still yours to build. Confirm redaction and residency controls for your configuration during evaluation.

FAQ

Should I use a prompted LLM or a fine-tuned model to classify feedback?

Start with a prompted LLM and structured output while the taxonomy is still changing, because label changes ship as data rather than retraining. Move high-volume, stable sources to a fine-tuned small model once you have enough labeled examples.

Why classify feedback at ingestion instead of asking an LLM at query time?

Because query-time grouping changes between runs. In Enterpret's study across eight frontier models, a raw model changed more than half of its theme set between two runs at 100 records and nearly three quarters at 5,000. Querying a persistent taxonomy with stored predictions cut that churn by 86 to 88% with the model held constant.

How do I handle feedback that covers several topics?

Segment each record into feedback units before or during classification, and classify each unit. Keep the parent record ID so you can still count records and accounts, and verify that extracted spans appear verbatim in the source text.

Can I let an LLM generate the feedback taxonomy?

As a draft, yes, but test it as a whole tree before using it. Enterpret's taxonomy evaluation paper found that generated taxonomies passed every generic check while 97.7 to 100% of their leaf names restated an ancestor's name, and 34.7% to 76.4% of records leaked across top-level branches. Check that leaf labels are informative and that each branch can be owned by one team.

When is it worth buying instead of building?

When feedback comes from many sources, the product ships often, or no one can own taxonomy governance and evals as an ongoing job. The model call is cheap to build; connectors, segmentation, taxonomy maintenance and evals are the recurring cost. Building makes more sense for a single source, a small stable taxonomy, or classification inside your own product.

If you would rather build on top of a classified layer than maintain all seven, see how Enterpret works.

Research cited

  1. Bagal, V., Ganta, R., & Chellingi, P. (2026). Same Feedback, Different Answer: Measuring Run-to-Run Instability in Frontier-Model Customer Feedback Analysis. arXiv:2610.08036.
  2. Chellingi, P., G, R., & Bagal, V. (2026). From Plausible Hierarchies to Useful Taxonomies: Evaluating Agentic Harnesses on Customer Feedback. arXiv:2610.09377.

Heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

This is some text inside of a div block.
Related Guides
See all guides

AI That Learns Your Business

Generic AI gives generic insights. Enterpret is trained on your data to speak your language.

Book a demo

Start transforming feedback into customer love.

Leading companies like Perplexity, Notion and Strava power customer intelligence with Enterpret.

Book a demo