Learning Python Beyond the Prompt: Educating Spatial Data Scientists in the GenAI Era

Sharon Leahy
Wednesday 21 January 2026

Dr Fernando Benitez

[email protected]

School of Geography and Sustainable Development

 What motivated you to use AI in this module, and what goals or challenges were you aiming to address?

My modules use Python, a very popular programming language in Spatial Data Science, at an introductory level and an advanced level. Students are susceptible to using GenAI to generate the code that I have asked to provide in many of the exercises or labs, but without understanding what is underneath. So, I have incorporated a comprehensive description of how LLMs work, an intro to GeoAI and also the pros and cons, to show my students the opportunities but also the risks (issues) of using GenAI.

How did you design or adapt the assessment, and how did you prepare students for using AI appropriately?

The use of GenAI in my modules isn’t compulsory but it is also not restricted. Instead, I provide some demonstrations where I show students how their code and prompts are read and processed by an LLM, and how, in many cases, this can result in workflows that are far more complex than the level of programming they actually need.

I have therefore adapted the labs and materials to include specific local examples and spatial data formats that are traditionally not heavily represented in the pre-training stages of current LLM tools. Instead of relying solely on traditional (albeit fundamental) methods, I have customised the labs so that students must work with local datasets and installed software on the lab PCs to encourage them to obtain similar results independently.

What challenges did you encounter, and how did you address them?

The main challenge arises when I ask students to source data themselves and apply a similar workflow. When they try to use GenAI instead of following the workshop materials, they often end up with questions or solutions that are more complex and not aligned with what we have asked them to do. This is why the initial session on the pros and cons of GenAI is so important: I make students aware in advance of the kinds of outcomes they might get, so that when I mark the submitted assignments, I can penalise or report cases where AI has been used inappropriately.

What benefits did you see for students and for your own teaching practice?

Last semester, several students mentioned in person and in the MQE that my session on GenAI and how LLMs work was particularly useful, and that they appreciated engaging with this topic rather than taking a purely restrictive approach. Because my main focus is on the coding experience, I don’t see GenAI as a direct benefit to learning to code itself, but rather as a teaching opportunity where my challenge is to guide students on how to use it appropriately.

However, since my course is not about data science or a specific programming language, but rather about spatial data analysis, I value the fact that GenAI can now provide hints and code snippets that support the initial stages of students’ coding experience. The key is that students remain aware of how the code is being created and understand how to use it. First, they should learn the basics; then they can use GenAI as a tool to strengthen and accelerate their skills.

How did you evaluate the usefulness of this assessment to ensure that it reflected the desirable learning outcomes?

I’m not entirely sure how to answer this question, as my learning outcomes are not explicitly tied to the use of GenAI; the module learning outcomes were defined before I started in this position. What I have noticed, however, is that students are now more likely to contact me after they have tried using GenAI several times. It seems they prefer to experiment on their own first and then approach me when they encounter difficulties. As a result, I receive fewer questions overall, but when students do get in touch, it is usually because they feel quite lost in the coding.

What would you do differently next time, and what advice would you give to colleagues?

I am working on including curated and verified practical exercises in which students use training datasets to obtain specific results from different ML tools. This will help them see the usefulness of these tools in a spatial data science environment. I believe that, as lecturers, we also need to familiarise ourselves with what is available and identify which exercises, datasets, and tools are genuinely useful, as well as understand the pitfalls of the most popular tools, so that we are aware of how students are reacting to and using them.

I do not think that a restrictive or denial-based approach, as some colleagues in my school are taking, is the right way forward. One cannot teach about something without understanding how it really works and what the impacts of its use are in the real world.

Posted in