Currently available AI tools

Author

Andreas Handel

Modified

2024-03-20

Overview

In this tutorial, we discuss some currently available LLM AI tools and when/how you might want to use them. This is of course a rapidly moving field, so a few months from now things might have changed. I can hopefully keep up somewhat, but check the last modified date of this page šŸ˜.

Learning Objectives

  • Be familiar with current AI tools and when/how to use them.

Introduction

It seems that every month a new LLM AI tool is announced. They are expected to keep getting better fairly rapidly for the foreseeable future. As you use these tools, itā€™s definitely useful to play around and explore. Here, Iā€™m describing those that seem - as of this writing - the most useful ones for coding and data analysis tasks. Other AI tools might be more suitable for other tasks.

In brief

Currently, ChatGPT 4 is the most powerful LLM AI tool. You can access it through a paid subscription via OpenAi, or for free through Microsoftā€™s Bing. ChatGPT 3.5 is the less powerful, free version you can access by creating a free OpenAI account. Despite being less powerful, Iā€™ve found it to work pretty well to write R code. Other LLM are worth trying too, e.g. Claude for data exploration/analysis.

OpenAI ChatGPT

As of this writing, for the AI tools we are interested in (the LLMs), ChatGPT is probably the most useful tool. You can access it by creating a free account.

ChatGPT is also part of the Microsoft Bing search engine (currently located under the ā€œChatā€ tab) and GitHubā€™s CoPilot.

If you havenā€™t already, I suggest you create a ChatGPT/OpenAI account. As of this writing, you can get a free account. Once you log in, you see a fairly plain interface with an area into which you can type your prompts. You can provide fairly elaborate prompts. Weā€™ll look at examples in other units.

Microsoft Copilot/Bing (still OpenAI GPT)

A free OpenAI account gives you access to ChatPGT 3.5. While I find it often quite useful, especially for writing code, itā€™s not the best AI out there. ChatGPT 4.0 is generally better. You have to pay OpenAI if you want to use it. Or, you can use Microsoft Copilot - aka Bing Chat, and not to be confused with the GitHub Copilot, which is also owned by Microsoft šŸ¤·ļø. It is recommended to use it in ā€œCreativeā€ or ā€œPreciseā€ mode. Of course feel free to explore and play around. I will use the terms Microsoft Copilot or Bing AI/Chat interchangably. Iā€™m sure all these names will change soon again anyway.

GitHub Copilot

GitHub Copilot is currently free for students with the GitHub student developer pack I asked you to sign up for. Set it up by following the Quickstart guide.

Once you have Copilot activated, you can use it in R Studio. (It is also possible to use it with other popular editors, such as VS Code, but for this course I will focus on R Studio. If you prefer to code in VS Code, you can install the Copilot plugin).

To get Copilot working in R Studio, follow these instructions. You might want to leave Copilot indexing unchecked for now. The instruction guide explains what this is. Basically, if you check this, copilot can access all files that are part of your current project. This can lead to confidentiality issues. Therefore, only check it if you are sure that all files in your project are ok being shared with the AI (and possibly make their way to Github/Microsoft/OpenAI servers).

Once you have Copilot up and running, you should see it show up in the bottom of your R Studio input window (the top right window where you write code). It will start suggesting things as you type, once you stop for a few seconds. You can set that time in the options.

An introduction to using Copilot can be found in this video by Thomas Mock from Posit/RStudio. In general, if you want bigger chunks of code, it seems currently better to go straight to ChatGPT. Copilot seems most useful to help you write bits of code as you go along. It can also be useful to help you remember the names of functions and arguments. This blog post provides some additional useful information on how to best use Copilot.

In general, I recommend you turn off Copilot in RStudio when you are not actively using it. And before you turn it on, make sure the document you have open, and any other files it might have access to, do not contain information you want to keep private.

Claude/Anthropic

Anthropic is another company developing LLM AI tools. Their main AI is called Claude. As for ChatGPT, you can sign up to get a free account. It is apparently not as powerful as ChatGPT. However, it has one nice feature that the free versions of ChatGPT or Bing do not have, namely it lets you upload files. This is useful for data analysis tasks. Iā€™ll show an example of that in the Explore data with AI unit.

Other LLM AI

Other companies, such as Google, are also busy creating LLM AIs. I havenā€™t tried them yet. Once I do, Iā€™ll add my impressions. If you are using any other LLM for coding or data analysis tasks and find it useful, please let me know.

Other tools

It is quite likely that in the future, there will be several LLM AI tools that are used by the majority of users, and then there will be lots of customizations running on top of those. There are already specialized LLM AI tools for lawyers and doctors and other professions that use ChatGPT under the hood. GitHub CoPilot is such a customization for coding. I expect further tools to keep coming out at a fairly rapid pace.

For instance, as you learned from Thomas Mockā€™s video above, the chattr R package seems like another great way to use ChatGPT from within R. Unfortunately, as of this writing, I havenā€™t been able to get it to work. It is not entirely clear to me based on the information provided on the chattr website, but I think this is because talking to ChatGPT via the API (which is what chattr does) requires a paid account.

Iā€™m also aware of the chatAI4R R package, but havenā€™t tried it yet. My guess is since it likely also talks to ChatGPT through their API, it also requires a paid account. If thatā€™s not the case and you try it and find it useful, please report back!

As you are probably aware, AI tools are changing rapidly. Iā€™m writing this in December 2023, you will read this a few months later. It could be that by this point, some new versions of AI tools have come out that are even better. Do explore and if you find some especially promising platform or package, let me know!

Summary

LLM AI tools are changing rapidly. Currently, ChatGPT seems to do a good job at helping with coding and data analysis related tasks. Claude seems a useful option too, since it allows upload of files (such as data). New tools keep showing up and are generally worth exploring.

Further Resources

For a list and description of some other AI tools (e.g., those that can produce images), see this guide on using AI to do stuff. Also see the AI resource unit.