Skip to main content

5 min read

ChatGPT as a Copilot for Qlik Users

ChatGPT as a Copilot for Qlik Users

By now almost everyone has seen, heard, or read something about ChatGPT over the past few months. The chatbot, developed by OpenAI, managed to attract 100 million active users within 2 months of launch. The news was full of stories about students who had the chatbot do their homework and other examples of people using ChatGPT to work smarter. But can you use ChatGPT as a Qlik user too? Yes. Senior Consultant Lennaert van den Brink shows you in this blog, using a number of examples, how you can work even more efficiently with ChatGPT as a copilot.

How does it work?

Getting started with ChatGPT is actually very simple. You go to chat.openai.com and register as a user. You can optionally use your Google or Microsoft account for this. Once your account is activated, you land on a chat screen and can start asking questions. Before you start, it's good to be aware of a few things:

  1. The question you ask (the “prompt”) determines what kind of answer you get. The big trick is therefore to phrase your questions cleverly. You can do this, for example, by providing context such as the tool you're working with (Qlik in this case), naming your tables or columns, or asking ChatGPT to imagine it's a certain persona (for example: “Pretend you're a Qlik developer”)
  2. Unlike Google, for example, you can ask follow-up questions. Say, for instance, you ask ChatGPT to write a certain formula: “Hey ChatGPT, how do I write a formula in Qlik Sense to calculate the average of the sales column”. ChatGPT will show you a formula. After that you can ask “ok, but what if I only want to calculate the average over the past month?” and ChatGPT will understand that you're referring to its previous answer and will extend it with a set analysis
  3. ChatGPT can read and write in Dutch. It's true, though, that it sometimes gives slightly better answers in English. So if possible, it's useful to ask your questions in English. In this blog we'll therefore phrase the prompts in English as well.
  4. Sometimes ChatGPT gives you an answer that isn't quite right or is even completely made up. That making things up even has its own term: “hallucinating”. ChatGPT is especially a very powerful tool if you're able to verify yourself that the answer is correct.

Advanced searching

The simplest way to use ChatGPT is as a kind of advanced Google. For example, if I'm looking for a function to retrieve the average sales per region, I can use the following prompt:

If I already know which function I need to use, but don't know exactly how it works, I can also simply ask that, for example like this:

Explaining and documenting code

Another very powerful function ChatGPT can perform is explaining a complex piece of code. The nice thing is that ChatGPT goes through the code line by line and explains what's happening, after which it also summarizes what the whole thing achieves.

Very handy when you get a brilliant piece of code from another developer that unfortunately isn't well documented. Conversely, as a developer you can use ChatGPT to document your code and add comments to it (for the readability of this blog we've cut the code out of the screenshot prompt)

Helping with debugging

Sometimes you spend hours staring at a piece of script or expression that gives an error message. You just can't figure out what the error message means or what you need to do to fix it. Here too you can ask ChatGPT to help you:

The observant reader will notice that here too ChatGPT is thrown off slightly by the error message Qlik gives. It wasn't actually the “curly bracket” ( } ) that was missing, but rather the greater-than and less-than signs (< and >). The expression ChatGPT generated, however, was correct.

Identifying the right direction for a solution

It can happen that you're faced with a problem for which you don't immediately know a solution. Here too ChatGPT can help you:

Helping choose a type of visualization

Sometimes it's quite tricky to choose the right visualization. Here too ChatGPT can help you make the right choice:

Interpreting data and data storytelling

If we're to believe the trend watchers, in the near future a large part of data storytelling will also be generated automatically. You can already get a head start on that with ChatGPT today. That is a bit more complicated than using prompts like we've shown above. You'll need to feed ChatGPT the data in some way so it can interpret it. The most obvious way to do this is by using the ChatGPT API. Qlik Architect Jacek Harazin wrote a great article on LinkedIn about how this works.

Jacek himself notes a number of important caveats in his article. For example, the ChatGPT version Jacek uses, model 3, isn't all that good at math. That means the totals and averages you see in the answer are sometimes not entirely accurate. The new version soon to be launched by OpenAI, model 4, is expected to be a lot better at this, though.

It's also important to realize that you're sending your data to an external party. OpenAI now promises not to store any data, but it's still not very wise to send highly sensitive data. Of course you can anonymize your data to limit the risks, although that will somewhat reduce the quality of the analysis.

Feeling inspired after reading this blog but could still use some help with your Qlik environment? Get in touch with us via the button below and we'll help you further.

get in touch

Written by Lennaert van den Brink
Senior Consultant