What the engine does
Two things, running on every request:- Scores restaurants against a user’s persona to produce ranked recommendations
- Generates reviews in the voice, tone, and language of that persona
How recommendation scoring works
When a user searches, the engine runs a scoring pass:- Persona weight vector is loaded for the user’s archetype
- Restaurant signals are pulled from Google Places (rating, price level, category, review count)
- Signals are weighted by persona — a Street Food Enthusiast’s score weights price level 3× more than a Lagos Professional’s
- Proximity decay is applied — restaurants farther from the search area score lower
- Ranked list is returned, top 5
How review generation works
The persona controls four things in every review:Multilingual output
The engine produces output in five Nigerian languages based on the user’s channel and preference:
On WhatsApp, language detection is automatic — the agent reads your message language and responds in kind. Mid-conversation switches are handled correctly.
The implicit learning layer
On top of the base persona, the engine maintains a learning layer per user. Every interaction is a signal:past_adjustments. The _extract_patterns() function scans for:
- Feedback keywords with frequency thresholds (shorter, less hype, lower rating)
- Saved review rating averages
- Tone save vs. regenerate tallies
- Restaurant type regeneration counts
The three archetypes
The three archetypes
Deep dive on Lagos Professional, Street Food Enthusiast, and The Aunty — their calibrations, vocabularies, and what moves their scores.