Introduction
- Who’s heard about ChatGPT and AI Coding Assistants?
- These are large language models (LLMs)
- Since there is lots of code written by software developers on the internet they are pretty good at generating code
-
And since there are lots of lessons on how to learn to code on the internet they can also be good generating text that explains code
- There are a variety of meaningful ethical concerns about using LLMs
- Writing code with them when lacking the background to evaluate that code can also be dangerous
- But they can be useful
- In the AIDE Lab we use these tools to help students debug code
- We also use it as a tool to do actual new research
Using LLMs for learning
- LLMs can be useful for learning and you are allowed to use them for in this course
- Using them to directly answer the exercises won’t help you learn, because humans need practice to learn
- That’s why we have exercises
- As a result using LLMs to solve exercises has been compared to taking a forklift to the gym to lift weights
- The goal of lifting weights is to get stronger, so having the forklift move the weights for you doesn’t help
- Likewise, the goal of the exercises is to learn the foundations of computing in Stata, which you’ll need to work effectively with coding assistants (if you choose to)
- To put that somewhat more enjoyably here’s quick short from Hero of Coding with Strangers
- I’m here to teach and I’m assuming that you’re all here to learn, so I recommend listening to Hero and not using LLMs to directly answer the exercises
- I won’t be policing LLM content in submissions
-
But the exercises do need to be answered using the approaches we learned in class and often LLMs will use a different approach
- So what are useful ways to use them?
- You can prompt them to explain things you don’t understand and they will parrot relevant advice from material on the web
- This can be easier, especially for folks learning to code, than trying to search for a specific site that has the answer
- That said, there are several very useful help sites for Stata
- Stata documentation, also available by typing
helpin the Stata counsel - Statalist is a forum where you can ask questions and get answers. Often your question has already been asked and answered
- Stack Overflow or Cross Validated, which are the coding- and stats-focused Stacks on Stack Exchange
- Stata documentation, also available by typing
- You can also use LLMs to help debug your code, which we’ll talk about more when we talk about debugging, but trying to fix bugs yourself is also important to learning
Summary
- LLMs like ChatGPT generate code and explanations based on vast training data.
- Always evaluate their output, as AI assistants can introduce subtle errors.
- Use LLMs as a learning aid, but do not bypass actual practice and exercises.