Talk to Humphrey

Humphrey is a second pattern-matching experiment built around a very different conversational role: the elegant bureaucrat whose first instinct is to qualify the question, protect the procedure and preserve every possible route to not quite making a decision.

What it demonstrates
The same broad rule-based technique can feel completely different when the persona and response strategy change.
What it is not
It is not generative AI and it does not reproduce dialogue from television scripts.
HUMPHREY / ADMINISTRATIVE GUIDANCE
parody
Try “Approve this today”, “We must cut costs” or “Give me a straight answer”.

This experiment runs entirely in the browser. Nothing typed into the console is sent to a server by the chatbot code.

Why choose a bureaucrat?

ELIZA’s DOCTOR persona was a remarkably good fit for a limited rule system. Reflective questions, requests for elaboration and cautious ambiguity all sound natural in that role. Humphrey applies the same design principle to comedy: a bureaucratic adviser can evade direct questions, reinterpret urgency as risk, turn action into consultation and treat delay as evidence of proper governance.

That makes the limitations part of the joke. A repeated qualification is not merely a chatbot failure; it is exactly what the character is expected to do. The experiment therefore shows how strongly a persona can shape the user’s interpretation of simple pattern matching.

The inspiration

The name and manner are an affectionate homage to Sir Humphrey Appleby, the formidable senior civil servant played by Nigel Hawthorne in the BBC comedies Yes, Minister and Yes, Prime Minister.

Both series were written by Antony Jay and Jonathan Lynn. Their excellent writing made bureaucracy comic without reducing it to random verbosity: the long sentences usually conceal a precise tactical purpose, the arguments are tightly constructed, and the conflict between political action and institutional continuity remains recognisable decades later.

Humphrey borrows that broad comic vocabulary—circumlocution, procedural obstruction, elegant qualification and preservation of the status quo—but every response in this chatbot is newly written. It does not quote or reconstruct dialogue from the programmes.

A request for approval

You: Can you approve this today?

Humphrey: An immediate decision would leave us dangerously little time to prepare the explanation for it.

A demand for clarity

You: Give me a straight answer.

Humphrey: Put simply: we should proceed, but not in any manner that could be mistaken for proceeding.

How the model works

Humphrey is not a language model. The script checks the input against ordered themes such as urgency, approval, reform, cost-cutting, responsibility, evidence, committees and complaints. It then selects an original response from the strongest matching category, sometimes inserting the topic of the user’s request or expanding into a longer piece of administrative circumlocution.

  • Pattern rules: words and phrases identify the likely type of request.
  • Response pools: each theme has several possible replies to reduce repetition.
  • Light topic handling: parts of the user’s wording can be reflected into the answer.
  • Persona as constraint: almost every response protects flexibility, procedure or institutional continuity.

Unofficial parody: this page is not affiliated with or endorsed by the BBC, the programme creators, performers or rights holders. The bot’s dialogue is original and is intended as an educational demonstration of rule-based chatbot design.

Compare Humphrey with the ELIZA console, or explore how another early text interface handled language in ELIZA and text adventure parsers.