# How can we extend the predictive interface so it can suggest new operations?

### Introduction

Mathematica 9 has introduced a new predictive interface. For each output, it suggest possible actions the user might want to take.

How can this interface be extended so that it will suggest additional, possibly user-defined, actions?

### The starting point

@Rojo mentioned in chat that he discovered that much of the functionality is contained in the Predictions and PredictiveInterface contexts. Many of the symbols have usage messages (but make sure that you trigger loading them by using the predictive interface at least once).

The PredictionsPredictionRule symbol seems to contain the rules on which the predictions are based, as downvalues (see its usage message).

The functionality seems to be defined in files found in the \$InstallationDirectory/AddOns/Applications/PredictiveInterface/ directory. The relevant part is in .mx files (not directly readable) and comments in the .m` files suggest that these may be updated automatically.

I posted this question as a starting point for people who want to figure out how this works, and to facilitate collaboration.

-
Is this the same question as this one? –  Leonid Shifrin Dec 18 '12 at 21:28
@Leonid Oops... I guess I'll delete this soon and transfer the info to the other Q –  Szabolcs Dec 18 '12 at 21:30
@Leonid Actually, after looking at that question, I would suggest implementing a separate suggestion bar to the OP. Shall we keep this question as specific to the built-in predictive interface and keep the other one separate? –  Szabolcs Dec 18 '12 at 21:35
Perhaps it is a good idea. I was not sure whether or not yours is a dupe, from the start. Let's see what others think. –  Leonid Shifrin Dec 18 '12 at 21:38