Useful AI tools
Overview
This is a brief introduction to some currently available LLM AI tools useful for coding and data analysis tasks, especially within our tool stack.
This is a quickly changing area, so be sure to explore and try out new tools as they become available.
Goals
- Be familiar with current AI tools and when/how to use them.
- Know what tools work nicely with R, Quarto and Positron.
Reading
Introduction
It seems that every month a new LLM AI tool is announced. They keep getting better fairly rapidly. As you use these tools, it’s definitely useful to play around and explore.
The following sections describe some of the currently available LLM AI tools, with a focus on our topic of modeling and data science, and our tool stack of R, Quarto and Positron.
Main LLM AI tools
Currently, the main LLM AI tools that are widely used are from OpenAI (ChatGPT), Google (Gemini) and Anthropic (Claude). Microsoft is using versions of OpenAI’s models in their Copilot. Other tools from Meta (LLaMA) and others also exist, but are less widely used at this point in time.
Almost all of the major players provide free access to their less powerful models, and paid access to their more powerful ones. The more powerful ones tend to be much better, so in general, trying to get access to those flagship models is a good idea. That said, even the free ones can be quite useful.
Positron AI tools
One of the great features of Positron is that it provides great AI integration. It comes with a built-in AI assistant that you can use to get help with coding and data analysis tasks. You can access it by clicking on the Positron Assistant icon in the left sidebar.
You will have to configure the assistant to work with a specific LLM model. The assistant is under rapid development. It therefore doesn’t make too much sense to provide details here that will likely be outdated soon. Instead, please check the official Positron AI assistant documentation for detailed and up-to-date information.
It is worth pointing out that tools like the Positron AI assistant interact with LLM models via APIs. This means that to use them, you will typically need a paid account with the provider of the LLM model you want to use. More confusingly, even if you have a paid subscription account, the API use can cost extra (but not always, things are changing rapidly). Fortunately, it has become quite cheap to use these APIs, but it is still something to be aware of. Always check the pricing information of the provider you are using.
If you are a student and qualify for the GitHub student developer pack you get GitHub Pro, which comes with the GitHub Copilot AI. This is one of the AI tools supported by Positron’s AI assistant. Thus, this is a free way to get access to an LLM AI tool that works nicely within Positron.
Positron also supports other AI tools through extensions. There is for instance an extension for ChatGPT’s Codex tool and Claude’s Code tool. It is very easy to install and activate these extensions, which you can then access through the left sidebar. Really the only barrier is that you’ll need an account with the provider of the LLM model you want to use, and will likely need to pay for use.
Another interesting extension is DataBot which allows you to use LLM AI tools to interactively explore datasets.
R LLM AI tools
R has several packages that allow you to interact with LLM AI tools from within R. The most comprehensive and best supported one is probably the ellmer R package developed by Posit. It provides a unified interface to several LLM AI tools. The ellmer website has good tutorials and documentation to get you started.
Another interesting package is the btw package which allows you to give the AI model context information.
The vitals R package is another interesting package. It helps you assess the quality of responses you get from different LLM tools. Especially if you plan on building workflows around LLM AI tools (e.g. agentic approaches), this is an important aspect to consider.
Summary
LLM AI tools are changing rapidly, both the underlying foundation models from companies like ChatGPT, Claude and Google, and the many tools that integrate those models into your modeling and data science workflow. The ones described above are great starting points. The important thing is to try existing ones, and keep exploring as new ones become available.
Further Resources
Test yourself
Which tool is described as allowing file uploads in its free version?
Claude is noted for allowing file uploads in the free version.
- False
- True
- False
- False
What is one reason to turn off Copilot indexing in RStudio?
Indexing can share project files with the AI service, which raises privacy concerns.
- False
- True
- False
- False
What does the unit say about the pace of change in AI tools?
The unit emphasizes rapid change and frequent new tools.
- False
- True
- False
- False
Practice
- Explore the Positron AI assistant and try using it to help with a coding or data analysis task.
- Install
ellmerand try using it to interact with an LLM AI tool from within R. - Try out the DataBot extension in Positron to explore a dataset using LLM AI tools.