Use case
Customer Feedback Analysis
Turn thousands of survey comments into a categorised, quantified picture, with the actual quotes attached.
- Stack Cognipeer Flows
- Pattern Flow · Batch analysis
- Read ~5 min
Overview
Four thousand free-text answers and one product manager is not a reading job. This flow classifies each comment into a fixed set of themes, collects the results, asks a model to write the synthesis over the whole set, and saves a PDF report.
Enterprise module
Flows is the enterprise flows module. See Flows.
The shape of the flow
Start (comments: list)
|
v
For each comment --body--> Classify (theme, urgency)
|
done (results)
v
LLM (write the synthesis from the counts and sample quotes)
|
v
Create PDF --> Save file --> EndBuild it
- Fix the taxonomy first. Decide the five to eight themes before you build a step, with a short description of when each applies. A taxonomy that changes mid-run makes the counts meaningless.
- Declare the input. On the Start node add an input
commentsthat holds the list (each item a comment text, or an object with an id and the text). - Loop. Add For each with Items set to
input.comments. Inside the body add Classify: Text to classify is the current item (loop.item), Categories are your themes (an Id, a Label and When it applies each) and Fallback category isother. Set Collect on For each to a value that pairs the comment with its category so the quote travels with the label. - Aggregate. After done, the loop's
resultshold every collected value. Count per category with a Run code step (it needs the Sandbox runtime) or let the next step do the reading. For large sets count in code and give the model only the counts and a few quotes per theme; do not send four thousand comments in one prompt. - Synthesise. An LLM step writes the narrative: top themes, what changed, what to do first. Tell it to quote only the sample quotes it was given.
- Produce the report. Create PDF with source Markdown, then Save file with Content is set to Base64 (binary) into a Document Store bucket. Declare the file id as a flow output.
Run it
Call the flow from the Flows API when an export lands, or expose it as a tool on an agent and ask for it in chat. A long loop is bounded by the flow limits (Max loop iterations, default 1,000, at most 10,000, and Run timeout): split a very large export into batches and call the flow once per batch.
Pitfalls
- Classify one comment at a time, with the categories fixed. Free-form labels produce a hundred near-duplicate themes.
- Keep the model's view small. Aggregate before you synthesise.
- Each model call costs tokens. A test run is a real run: try a hundred comments first, and look at the usage in the run detail.

