Teaching an agent what a brand actually sounds like
A brand profile is easy to describe and hard to build. For Pockla we needed an agent that could read everything a brand had ever published and come back with something a content engine could use. Here is what that took.
Every part of Pockla's content engine depends on one thing being right: the brand profile. If the profile is wrong, relevance scoring is wrong, the generated content is wrong, and the marketer using the product quietly stops trusting it. So the profiling agent was never a side feature. It was the foundation, and we treated it like one.
What a brand profile has to be
A useful brand profile is not a paragraph of marketing copy. It is a structured thing that downstream code can reason about: what the brand sells, who it is talking to, the topics it owns, the topics it avoids, the tone, the recurring formats, the words it uses and the words it never would.
The input is messy — a website, a pile of social posts, maybe some campaign material. The output has to be consistent enough that the rest of the system can rely on its shape every single time.
How we built it
The agent works in passes rather than one giant prompt.
First it gathers: it pulls the brand's own content — site copy, recent posts, anything we are given — into one place. Then it profiles each dimension separately: one pass for audience, one for tone, one for topic territory, and so on. Each pass only has to be good at one thing, which makes each pass easy to test and easy to fix.
Then it synthesises into a single structured profile, and finally it self-checks — the agent reviews its own profile against a sample of the brand's content and flags anything that does not hold up. That last pass caught more mistakes than we expected.
The pitfalls
The model is a flatterer. Ask an LLM to describe a brand's tone and it will tell you the brand is "bold, authentic and innovative" no matter what the brand actually is. Every profile came back sounding like a pitch deck. We fixed this by banning abstract adjectives in the output schema and forcing the agent to ground every claim in an example — "uses short, punchy sentences, e.g. ..." — with the example pulled from real content. If it could not find an example, it could not make the claim.
Confidence where there should be none. A brand with twelve social posts and a thin website does not contain enough signal for a full profile. Early versions confidently profiled these brands anyway, inventing a personality from almost nothing. Now the agent reports how much evidence it had for each dimension, and the product treats a low-evidence profile differently — it asks the marketer to confirm rather than running with a guess.
Structured output that was not, actually, structured. This is the boring one that cost us the most time. The agent was supposed to return a fixed schema. Most of the time it did. Occasionally it returned a slightly different shape, or valid JSON that was missing a field, and something three steps downstream fell over with an error that pointed nowhere near the real cause. We added strict schema validation right at the agent boundary, so a malformed profile fails loudly and immediately instead of leaking into the system. If you take one thing from this post, take that.
What we would tell you
The pattern that made the profiling agent work was not clever prompting. It was three habits:
- Decompose. One pass per dimension beats one prompt for everything. Smaller passes are testable.
- Ground every claim. If the model cannot point at evidence, it does not get to make the claim. This kills the flattery problem completely.
- Validate at the boundary. An agent that produces structured data is an API. Treat its output the way you would treat any untrusted input, because that is what it is.
None of this is exciting. All of it is the difference between an agent that demos well and one that you can actually build a product on top of.
Working on something similar?
We have probably hit the exact scaling or architectural bottlenecks you are navigating. Book a call and we'll walk through the technical trade-offs.