Imagine the following scenario. Something has gone wrong. It's Monday (of course it is), you're doing your best to find the underlying cause, yet a strange force is actively interfering -- you are required to provide a status update every 15 minutes.

Trouble is, you can't give much of an update. The best you can do is write something like

We're still trying to find the source of the problems, and a possible workaround.

A while later, after several variations of the above phrase have been posted, you transition to another state. Now, you can write

We have found the underlying cause, and we're working on fixing it.

Again, it's not much of an update, but it's something. Both phrases are general enough that some problems later, you start to wonder ,,Could I generate those updates automatically?''

Of course you could.

The main issue here is providing enough variety for the messages you post. You could start by writing down several phrases that state your basic message -- that you don't know anything yet, but at least you're doing something.

$variations{'dont_know'} = [
'We are still trying to find the cause of the problems.',
'A cause has not yet been determined.',
'The cause of the problems is still unknown.',
];

Picking sentences out of a bag is not exactly generating them. We will need a grammar, and fortunately, adding a simple one will not make the process much more complicated. Let's assume we are dealing with a fixed order of sentence parts. Then, all that we would need is:

By joining three random part variations, we can improve the variety of our sentences a bit, but this is still far from a good solution to the problem. Fortunately, nothing forces us to stick with a defined order of sentence parts. Our grammars can be more complex than that.

Consider this:

[START]
|AreHappy| |UWrote|
[AreHappy]
We are |Happy|
[UWrote]
that you |Wrote|.
[Happy]
happy
glad
[Wrote]
wrote
contacted us
sent us an email

This simple grammar is organised into sections. Every section contains variations with |tokens| that can be expanded by looking at another section matching the |name|. Beginning at the [START] section, you could generate multiple sentences just like those:

We are happy that you contacted us.
We are glad that you wrote.
We are glad that you contacted us.

Assuming that we can pick a variation from a section at random, with pick_var_from('Section'), we could write expand_tokens_in(\$variation) that replaces all |token| occurences with a random variation from the appropriate section. We could also write is_expandable($variation), that returns true if there are any |tokens| within a given variation. Having those few subs in place, our sentence generator would be as simple as:

Investigation is in progress.
Responsible parties are still looking for a solution.
---------------------------
There is an ongoing investigation.
A way to solve this is still being determined.
---------------------------
Investigation in progress.
Responsible parties are working on a possible solution.
---------------------------
Follow-up in progress.
Involved parties are still looking for a fix.
---------------------------
There is an ongoing analysis.
We are working on a fix.
---------------------------
Analysis in progress.
A fix is still being determined.

Every 15 minutes, one of those updates could be posted automatically, allowing you to focus on the real issue -- the unknown problem that you are supposed to fix. Unless, of course, it already fixed itself.