With the advent of generative AI, universities all over the country are reassessing their approach to both teaching and learning. And while Carnegie Mellon University Libraries already has many resources to help members of our community understand AI, it’s also on the cutting edge of figuring out how AI can support students and faculty alike; as a result, Libraries faculty and staff have begun integrating AI into areas they already support — with a new programming workshop powered by AI serving as an example.
“For the last five years, we have provided resources and workshops related to foundational coding in open source languages, Python and R. This support has been popular with researchers and students across all of the colleges,” STEM Librarian and Open Science Program Director Melanie Gainey said.
Libraries Open Science Postdoctoral Associate Kristen Scotti worked closely with many of the students and researchers coming to the University Libraries for help with coding. “These students have a lot on their plate. They’re starting school, they’ve got all this other stuff, and now they have to learn how to code,” she said. “I wanted to figure out a way to ease the learning curve for them.”
She found that when these students ran into problems, they tended to turn to the Internet to figure out why their code wasn’t working. Scotti realized that this was a place where AI models like ChatGPT could be of use. “You can put an error in [ChatGPT], and tell it to help you troubleshoot it. And it’s a lot faster than trying to search for the answer yourself,” Scotti said.
Scotti began developing materials for a workshop titled “Python for All: Democratizing Coding Mastery with AI Chatbot Support.” She chose Python as the coding language for the workshops because it’s an open source one — unlike MATLAB, a widely-used computing platform that includes its own proprietary coding language.
During the workshop, Scotti led participants through a series of collaborative, hands-on exercises demonstrating AI’s potential as a tool and how to use it effectively. Participants learned the importance of prompt engineering, for example, by writing their own prompts instructing the AI to debug or optimize code. Scotti then told them to compare results with each other — something that revealed the importance of AI literacy when participants noticed mistakes in the AI-generated code.
Scotti took this as a learning opportunity and used this as a jumping off point to discuss the issues that come with being overly dependent on AI; she then showed students how to identify and resolve errors in AI-generated code. “In the Libraries, we have to be in a position where we’re teaching people how to use these tools — how to benefit from them, but also how to understand their limitations,” Scotti said. “If you’re having ChatGPT write an English paper, for example, a lot of what it would write is probably going to be wrong. It’s the same thing with coding. We want people to be able to check their code — to understand how to evaluate and use it, and how to figure out if other information is being generated from the same source.”
“We know that researchers are eager to use AI chatbots to facilitate their research,” Gainey said. “But at the same time, it's easy to use AI in a way that is actually detrimental to research so it's important that people learn recommended practices and how to use it responsibly.”
Scotti ran the first workshop in February 2024. Since then, she’s led multiple versions of it, both within the Libraries and outside of them — including in other departments at CMU.
“One significant component of all of our research and coursework is programming efficiently in Python, and most of our students come in and don’t know it,” Chemical Engineering Professor Coty Jen said. Jen invited Scotti and STEM Librarian Chasz Griego to present a version of the workshop in the professional development seminar she teaches for chemical engineering graduate students. “I believe the workshop exposed students to tools that will help them code,” Jen said.
A paper Scotti wrote detailing the rationale and methodology behind “Python for All” is forthcoming in College & Research Libraries, and includes turning the workshop materials into open education resources through the Open Science Framework so that anyone at any institution can access them and even teach their own version. And this semester, Scotti will lead sessions of “Python for All” on January 28th and March 25th.
“With coding specifically, people who don’t know how to program often have a lot of anxiety about it. They think that they can't do it, or they're not smart enough, or maybe they remember their teachers telling them that they weren't good at math years ago. But this gives them on-demand tutor support in the form of AI, and teaches people how to use it,” Scotti said. “The end goal of all of this is really to make science — or knowledge in general — more accessible.”