A brief history of chatbots

A chatbot is a computer program which conducts a conversation via auditory or textual methods.

The term “ChatterBot” was originally coined by Michael Mauldin in 1994 to describe these conversational programs but they are much older, the first one being ELIZA by Joseph Weizenbaum of MIT in 1966.

Leaving the academic world, conversational agents have been typically used in dialog systems including customer service or information acquisition.
Many large companies started to use automated online assistants instead of call centres with humans, to provide a first point of contact.
Most of these systems ask you to push a digit corresponding to what you want or say what you’re calling about and scan for keywords within the vocal input, then pull a reply with the most matching answer from a database.
These systems are based on simple logic trees (SLT).

An SLT agent relies therefore on a fixed decision tree to gather information and redirect the user.
For example, an insurance bot may ask several questions to determine which policy is ideal for you. Or an airline bot could ask you the departure city, the destination and a time. Or a device diagnostics bot could guide you through the hardware components and tests to find out the issue.
It´s a finite-state dialog, the system completely controls the conversation.
If your input match what the bot has anticipated, the experience will be seamless. However, if it stray from the answers programmed and stored in the bot database, you might hit a dead-end. Back to a human to complete the interaction…

These were efficient and simple systems but not really effective.
In normal human-to-human dialogue the initiative shifts back and forth between the participants, it’s not system-only.

A very recent trend is to use natural language processing (NLP) and Machine Learning (ML) algorithms such as you see in smartphone-based personal assistants (Apple Siri, Microsoft Cortana  or Google Now) or when talking to your car or your home automation system (Amazon Alexa) or in some messaging platforms.

Continue reading “Chatbots”


Premium prices and data

Putting a premium price on certain products which cost almost the same to produce is a common marketing trick which can be brought back to the price sensibility of the different consumer and is having now a boom thanks to the extremely exact consumer profiling.
Think about the cappuccino made with fair trade coffee or with vanilla flavour. By buying one of them you send the message that you don’t mind paying a bit extra.
The strategy is to charge the highest price that the consumer will pay for that product.
A pricing strategy called First Price discrimination:

Exercising First degree (or Perfect/Primary) price discrimination requires the seller of a good or service to know the absolute maximum price (or reservation price) that every consumer is willing to pay.

More generally there are 3 common techniques for finding customers who are the first degree price discrimination: Continue reading “Premium prices and data”

My new book: “from Zero to Agile”


I have just published on Amazon my new book about Agile.

Agile is on great advance, more and more organisations and teams adopting it. But what is it exactly? And how do you become agile?

In this book I want to show how is possible to introduce gradually a series of changes so that at the end your organisation will be agile (i.e., it has understood the Agile values and principles and know how to apply them), not only does some kind of Agile practices.

Through examples you can see how to introduce and tailor the Agile principles, week after week: in 8 weeks we took a team with no prior experience of Agile into changing its mentality and attitude.

I hope this journey can help your team (and further: the entire organisation) to do a similar one toward the same goal: being Agile.

The examples show which are the general principles and why / when they make sense, so you will be able to inspect your situation, adapt these principles (as needed) and adopt them, finally repeating this cycle continuously.

Build your method up, don’t tailor it down.

Finally, this book is about agility as values system, culture, mind-set, and not about a specific process or methodology. All the currently most used methodologies – Scrum, Lean and Kanban – will be described, each one with its advantages and disadvantages.

The book contains revised versions of the posts published here in the past plus several brand new chapters (about Kanban, how to scale Agile and many examples of retrospectives for each topic introduced every week).

Immigration and scarce resources

From The Undercover Economist by Tim Harford:

New workers are good for people who have assets that become relatively scarcer. In fact the people who are most harmed by new immigration are the previous group of immigrants who find their wages nailed to the floor.

Skilled immigrants lower the wages of skilled natives and unskilled immigrants lower the wages of unskilled natives.

Allowing lots of skilled immigrants will help control the gap between skilled and unskilled wages while allowing unskilled immigrants will do the reverse.

Asymmetric information

This is a summary of  the fifth chapter, “The inside Story”  of Mr. Tim Harford’s economic classic “The undercover economist”.
David Bodanis, author of Electric Universe describes this book: “Reading [it] is like spending an ordinary day wearing x-ray goggles”. I’m reading from the 2006 paperback edition.

Asymmetric information: In economics theory, it deals with the study of decisions in transactions where one party has more or better information than the other. The consequence – when one negotiator knows too much and the other too little – is that the agreement becomes impossible.

A classic paper on adverse selection is George Akerlof‘s “The Market for Lemons“.

This problem is troublesome for e.g. second-hand cars, accommodations or restaurants but also for more important goods as health insurance: an insurance policy depends on mutual ignorance.

Akerlof won the Nobel Prize in 2001 for his work and shared it with two people who proposed partial solutions.

The first, Michael Spence, argued that the side with the information might be able to communicate it in a way that the side without the information could trust.
For example, a used car seller – instead of just saying “all my cars are perfect, not lemons” as talk is cheap – would be buying an expensive car showroom,  an investment affordable only by someone who plans to stick around for the long-term. Over the years, the sales would pay for the showroom. A lemon-seller couldn’t operate like it: he would sell a few overhyped lemons and then have to move to another place. For the same reasons, banks in the past (before government oversight, at least outside USA 🙂 ) have been used to build such impressive buildings.
And for the same reason, you pay more at an established shop than at a market stall if you buy a product about which you have no information. And it explains expensive advertising campaign with no informational content at all.

The second person, Joe Stiglitz, explored ways in which the side without the information might uncover it. For example, a health insurer could offer policies with lower premium (making it cheaper) but higher excess (the amount by which any claim is reduced), so attracting low-risk customers automatically and revealing the customers’ inside information.
Similarly Starbucks is offering frills like flavoured syrup to persuade customers to reveal whether or not they are price conscious.

At last, Tim Harford, is presenting a study case where an asymmetric information problem has been tackled: the healthcare system in Singapore.

It works like this: everyone has to put every year some money, let’s say 1000$, in a savings account, simply taken from the tax bill (given from the government for the people who earn too little). Since it’s compulsory there is no adverse selection in place. When you retire, you can partly use the money on the  accounts to increase your pension; when you die, you can leave it to your heirs.
And then, every year you can use the money for your health bills. When you’re young you can expect to need less and let them earn interest. You can decide autonomously how to use the money, maybe in preventive maintenance, maybe only for urgent cases. In case of different therapies, it’s your choices to decide which one to go for and if the cost are a criteria. This will solve the moral hazard issue (=if you always compensate people when bad things happen to them, they may get careless”).


In economic, an externality is a side effect on any party not directly involved, which lies outside the original decision.

An externality can be either positive (e.g., when enough population gets vaccinated, also non-vaccinated individuals gets for free the benefit of not contracting a disease) or negative (e.g. car driving causes external costs as pollution or congestion on other people).

The existence of externalities is a problem: those who suffer from external costs do so involuntarily, while those who enjoy external benefits do so at no cost.
Especially the negative ones result in outcomes that are not socially optimal.

The general solution to solve the  externality is to offer compensation for the cost they inflict. For example: additionally charge the drivers. This can be done either for the trips they drive (e.g. raising the fuel price or the road/bridge/city tolls) or raising the upfront fee (the yearly car tax or the driver’s licence tax). Sometimes governments do both.

But actually the first method is the better one:  as known, there is the average price and then there is the marginal price which is the one for one extra unit or in the driving example, for one extra trip.
To  correct an inefficiency we need to address accurately the prices at the margin and not the average prices.
If I pay 100 Euro/year to enter the London centre, I can do it whenever I want, without incurring in extra marginal costs. But if I have to pay every time I enter the city centre, then I will think about it twice.

Another challenge is that the externality must reflect the cost of it but no more. In the driving example, the externality charge should probably vary according to time and place. For example, in the rush hour the driver should pay more because he is causing more harm to others.
At the end, the goal is not to discourage everyone but to get them to take into account the inconvenience they cause to others and to change a behaviour long-term.

As you see, the ideal externality charge addresses all the real external costs and only them and this is not easy: it requires a lot of information and knowledge. A perfect scenario for big data and machine learning!

[Update] Bonus paper: Big data impact on society, the positive and negative externalities associated with big data.