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

The predictive interface at work

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 Predictions`PredictionRule 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.

  • $\begingroup$ Is this the same question as this one? $\endgroup$ Dec 18 '12 at 21:28
  • $\begingroup$ @Leonid Oops... I guess I'll delete this soon and transfer the info to the other Q $\endgroup$
    – Szabolcs
    Dec 18 '12 at 21:30
  • $\begingroup$ @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? $\endgroup$
    – Szabolcs
    Dec 18 '12 at 21:35
  • $\begingroup$ 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. $\endgroup$ Dec 18 '12 at 21:38
  • $\begingroup$ I thought it worth pointing out that the (relatively new) answer in the @LeonidShifrin's linked question actually solves this issue. $\endgroup$
    – b3m2a1
    Aug 4 '17 at 5:06