Skip to main content

Talking to Oracle Analytics

Ask the question in Search

Being able to talk, by using natural language, to computers, especially with the advancements in general AI models like ChatGPT, has become very fashionable in the last couple of months. Everybody does it. It is simple, easy to use and let's be frank, it can be also very useful. Something that has been around for a while, remember Siri or Alexa or TV remote controllers, has been lifted to a new level and has wide spread use in business already.

A bit of a secret is also that Oracle Analytics can use natural language, query and generation. Here are some of my findings about NLQ and NLG support in Oracle Analytics.

Natural Language Querying (NLQ)

In Oracle Analytics, NLQ has already been around for a while, at least for some years now. I remember those early days when Oracle Day by Day mobile application has been introduced. One of the coolest features in Day by Day was actually the ability to ask a question using natural language. Something like What is revenue by region and channel for seniors? would provide you an answer in the form of charts, tables, etc. This feature is still available, and you can ask this question in the Search field located in the Oracle Analytics home page.

Ask the question in Search

Oracle Analytics would then provide the following answer:

Get an anwser

Further navigation takes a user to more details in a newly generated workbook that can be further enhanced and improved by the user himself.

Generated workbook

Just a note on the above workbook: Oracle Analytics have, based on its index recognized revenue as a measure, and channel and region as dimensions. The for seniors part of the question resulted in a filter set for Segment is equal to "Seniors".

This answer is not yet based on some crazy AI technology (it may very well be as well, and maybe this is coming soon), but uses simple parsing and search index to formulate the answer. So it is not at the level of ChatGPT or something similar, however I guess it is still good enough to be used by end users, In particular in a mobile application like Oracle Analytics Mobile, where it is easier to speak than type.

Natural Language Generation (NLG)

If we now try to explore the example above and look into Natural Language Generation capabilities, we can see that this is available in several places. For example, Explain function can generate quite a lot of text, and quite detailed descriptions can be seen when using Insights. But beside these two features (and by the way, there is AI behind the scenes), Oracle Analytics comes with out-of-the-box Language Narrative visualization.

For example, if I changed the Horizontal Stacked visualization type of the visualization above to Language Narrative, ...

Switch to Language Narrative

... and the result is as follows:

Switch to Language Narrative

So how does this visualization work? As you might have observed, the example above is not really a stated of the art explanation of the chart on the right. In fact there are some ground rules for text generation and, of course, not everything can be generated as text. So let's explore what are the options here!

First of all, the query in the example above, contains two dimension and one measure with one additional dimension in filter. It seems it was able to generate "something", however the result was not really a good one. Working with Language Narrative has some limitations and one these is how many attributes can be used in a query. Currently the following combination of attributes are supported:

  • one measure with two dimensional attributes

One measure with two dimensional attributes

  • two measures with one dimensional attribute

Two measures with one dimensional attribute

Well, this doesn't give us much insight isn't? It looks like, it doesn't really provide some meaningful insights. So, what happens if we make one step back, and try to build this visualization from scratch. There is also another thing to pay attention. Messages above mention chronological order which infer use of time dimension.

So let's see what happens if time dimension attribute (Month) is used instead of categorical (Region).

Two measures with one dimensional attribute

Well, now visualization generates a bit more narrative than in previous example, and provides some insights sych as minimums, maximums, strongest decline, ... etc. Interesting enough, it also talks about fixed costs missing objectives, failing to meet goals and so on. This is weird, but sentences like that imply that variable costs are somehow targeted values for fixed costs (?).

Can this be corrected somehow? Or put in some context? Navigating to the Visualization Properties panel gives users some additional flexibility in terms for controlling the Language Narrative.

First, the Language. Currently, only English and French are supported. So let's keep this in mind for other languages. Another thing is level of detail, which I'll skip for a moment, so the next property is Analysis. This property has an immediate effect on the visualization.

Language Narrative properties

Default value, in this case, is set to Trend. Changing it to Breakdown has the following effect:

Two measures with one dimensional attribute

You can observe that text that has been generated is truly broken down quite substantially and much more insight was generated because there was much more details available (we are looking at 36 months period). Of course, a bit more study of what was generated, but I guess the text captures information in the table quite well. From the table, details like that can't be easily spotted.

Level of Detail has been set to 7. This is value for maximum level of detail. If this is changed to 5, for example, than genarated text in Language Narrative is obviously much shorter and with less detail:

Two measures with one dimensional attribute

So let's take a look at our initial example when we tried to generated Language Narrative for one measure and two dimensions. One of these is now time dimension.

Two measures with one dimensional attribute

Language Narrative in the example above generates quite a lot of text. For Analysis is equal to Trend it generated quite a lot of insights in textual format. First, it analyzes the overall trend and then it breaks down trend by distinct values of selected categorical attribute.

Switching Analysis property to Breakdown, provides breakdown by the time dimension attribute.

Two measures with one dimensional attribute

Conclusion

One of the things Gartner pointed out in its latest Magic Quadrants Report (April 2023) is Oracle’s support for NLQ which is supported in 28 languages, more then any other Analytics platform on the market. 

NLQ was around for several years and Oracle Analytics got quite extensive Natural Language Generation support. As mentioned (but not discussed in this post) NLG is available in Insights and Explain features, and now also with Language Narrative visualization type.

In my short exploration of Language Narrative visualization type, I have observed some really nice automatically generated texts by Oracle Analytics. Some of these were not really useful, but some actually provided useful textual insights. However using these just because it looks cool, that just might not work. Therefore users should make sure that they know how and when to use it.

More details on working with Language Narrative visualization can be found in Visualize and Analyze Data chapter of Visualizing Data and Building Reports in Oracle Analytics Cloud documentation. I strongly recommend to check it before using these in your visualization projects as you might find a lot of messages like this:

The comparison of two unordered measures is not yet available. Unordered means that the data is not in chronological order. The application will generate a separate analysis for each measure. Stay tuned, future releases will add functionalities for unordered dimensions.