[Tech Talk] The Election's Over — How We Built Audience Segmentation into Ko Wen-je's LINE Chatbot
If whisky can be segmented, why can't KP segment his audience on LINE?! So we created Uncle Ko, Islay-style; Mayor Ko, Speyside-style; and Professor Ko, Campbeltown-style. Building this chatbot meant tackling a few problems: the mayor's built-in massive traffic spikes, building diverse semantic modules, and segmented audience management.

In this post-Ko Wen-je era, when even our own echo chamber has soured on KP, let me share how the KP team handled audience segmentation back then. Reliving the old dream and topping up on a bit of “white” values (the color of his camp) can't hurt, right?
The brief we got: build a chatbot everyone could play with — but one that would never lose senior voters through a slip of the tongue.
My first thought was,

Still, being the responsible team we are, we immediately kicked off a series of brainstorms. We drank our way from the Highlands to the Lowlands, from Speyside to Islay, and after soaking up the essence of each region, it hit us!
If whisky can be segmented, why can't KP!?
And so we had Uncle Ko, Islay-style; Mayor Ko, Speyside-style; and Professor Ko, Campbeltown-style. (Yes, I'm absolutely just talking nonsense here.)
Enough rambling. So how did we actually do it?
Building this chatbot meant overcoming a few problems:
- The mayor's built-in, massive traffic spikes.
- Building diverse semantic modules.
- Segmented audience management.
We solved the first one with Sofy overnight pads — more on that another time.
For the second, we scraped plenty of transcripts from PTT's Gossiping board, all kinds of news stories, and YouTube videos as source material, then had the KP team proofread it.
The third is what this post is about.
Honestly, I'm a little embarrassed to talk about it — the whole segmentation architecture is actually pretty dumb.
It has two parts: the client side and the server side (there I go stating the obvious again, sorry).
On the client side, we used the LINE Rich Menu. By switching rich menus, users can see which persona is currently active and choose a persona.
On the back end, we used Google Datastore to store each friend's chosen persona: 0 for none selected, 1 for Uncle Ko, 2 for Mayor, and 3 for Professor.
Every time a friend interacts with the chatbot, we first look up the persona that user selected, pull that persona's semantic module to match against the source material, and then reply.
And that's how we achieved segmentation.
I'm really sorry — looks like I've written another fluff post...
But! Using rich menu switching to deliver clear-cut segmentation was a bold, novel experiment for a chatbot. Huge thanks to the KP team and the unH3O team for the opportunity to be part of KP's big platform.
A quick word from our sponsor:
If your company needs to deliver segmented content through a LINE chatbot — by language, by region, or even by subscription — feel free to email us at the address below.
Don't worry — I'm definitely not the one who'll reply.





















