Responsible Use of LLMs in Data Analysis

Computational Problem Solving

Francisca Javiera Rudolph, PhD

Who Am I?

Javi

  • PhD in Zoology from UF (quantitative ecology & disease modeling)
  • Computational Literacy Librarian at UF Libraries
  • Research background: movement ecology, statistical modeling, infectious disease
  • Passionate about reproducible science

Why am I here? To help you think critically about AI as a tool in your data science toolkit

What is Computational Literacy?

  • More than just coding - it’s understanding how to solve problems computationally
  • Critical evaluation of computational tools and their outputs
  • Understanding when and how to use different tools appropriately
  • Building reproducible, transparent workflows

From the Libraries Perspective

We help researchers across campus:

  • Develop computational skills for their specific domains
  • Navigate the evolving landscape of research tools
  • Make informed decisions about adopting new technologies

LLMs are now part of this landscape - we need to use them thoughtfully

LLMs and Computational Literacy

Why are we talking about this?

Large Language Models (like ChatGPT, Claude, etc.) are becoming ubiquitous in research and data analysis workflows.

Question: Are you using them responsibly and effectively?

Part of computational literacy in 2025 means:

  • Understanding what LLMs are and aren’t
  • Knowing when they’re helpful vs. harmful
  • Being able to critically evaluate their outputs
  • Integrating them into reproducible workflows

🤔 Quick Reflection

Let’s hear from you!

1. What do you think an LLM is?

Take a little time to think, then we’ll share

2. How are you currently using LLMs?

3. What concerns or questions do you have about using them?

What ARE Large Language Models?

Key Concept

LLMs are probabilistic models trained on massive amounts of text data. They predict the most likely next word (or token) based on patterns in their training data.

What they are NOT:

  • ❌ Databases with stored facts
  • ❌ Search engines
  • ❌ Thinking or reasoning entities
  • ❌ Always correct or reliable

They are pattern-matching prediction machines

🎮 Let’s Play: How LLMs Work

Interactive Exercise

I’ll start a sentence, and you complete it with what feels most natural:

“Knock Knock… _____”

“The mitochondria is the… _____”

“In R, to read a CSV file you use the function… _____”

This is essentially what an LLM does - but with billions of parameters and training examples!

LLMs as Tools for Learning & Analysis

Potential Benefits

  • 📚 Explaining concepts in different ways
  • 🐛 Debugging code and finding syntax errors
  • 💡 Generating ideas for approaches to problems
  • 📝 Writing documentation and comments
  • 🔍 Finding functions or packages you didn’t know existed
  • Speeding up routine tasks (boilerplate code, data cleaning patterns)

But…

They work best as collaborative tools, not replacements for thinking

⚠️ Things to Be Cautious About

Technical Concerns

  • Hallucinations - confidently wrong
  • Outdated information - training data cutoffs
  • Package/function errors - non-existent code
  • Statistical misconceptions - plausible but wrong advice
  • Context limitations - doesn’t understand your full problem

Ethical & Learning Concerns

  • Over-reliance - not building your own understanding
  • Data privacy - don’t share sensitive data
  • Academic integrity - know your institution’s policies
  • Reproducibility - how do you document AI assistance?
  • Bias - reflects biases in training data

Critical thinking is non-negotiable when using LLMs

When NOT to Use LLMs

Avoid LLMs when:

  • 🎓 Learning a concept for the first time - you need to build intuition
  • 📊 Making statistical decisions - you need to understand assumptions
  • 🔐 Working with sensitive/private data - privacy concerns
  • Taking exams or assessments - academic integrity
  • 🧪 You need to cite sources - LLMs don’t provide proper citations
  • 🤔 The stakes are high - always verify independently

Instead, use them for:

Getting unstuck, exploring options, routine tasks, learning syntax (after understanding concepts)

Verification Strategies

How do you know if LLM output is correct?

  1. Run the code - does it execute without errors?
  2. Check the logic - does it make statistical/ecological sense?
  3. Test with simple data - where you know the answer
  4. Consult documentation - verify functions and arguments exist
  5. Peer review - have someone else look at it
  6. Compare approaches - try solving it yourself first, then compare

Rule of Thumb

If you can’t explain what the code does and why it’s appropriate, don’t use it

Reproducibility & LLM Use

Big question: How do we maintain reproducibility when using AI assistance?

Best Practices

  • Document your prompts - save them with your analysis notes
  • Note which LLM and version you used
  • Always review and understand the generated code
  • Test thoroughly - reproducibility means others can verify
  • Keep a lab notebook - track your decision-making process
  • The final code is yours - you’re responsible for it

Note

Think of LLMs like you’d think of getting help from a colleague - you’d still verify their suggestions and take responsibility for your work.

🐧 Hands-On Demo: Palmer Penguins

Let’s see LLMs in action!

We’ll work through a simple linear model analysis:

  1. First: Do it the traditional way
  2. Then: Use an LLM to help
  3. Finally: Critically evaluate what we got

I’ll guide us through this together - let’s learn by doing!

Setup: Palmer Penguins Data

# Load packages
library(palmerpenguins)
library(tidyverse)

# Look at the data
glimpse(penguins)
Rows: 344
Columns: 8
$ species           <fct> Adelie, Adelie, Adelie, Adelie, Adelie, Adelie, Adel…
$ island            <fct> Torgersen, Torgersen, Torgersen, Torgersen, Torgerse…
$ bill_length_mm    <dbl> 39.1, 39.5, 40.3, NA, 36.7, 39.3, 38.9, 39.2, 34.1, …
$ bill_depth_mm     <dbl> 18.7, 17.4, 18.0, NA, 19.3, 20.6, 17.8, 19.6, 18.1, …
$ flipper_length_mm <int> 181, 186, 195, NA, 193, 190, 181, 195, 193, 190, 186…
$ body_mass_g       <int> 3750, 3800, 3250, NA, 3450, 3650, 3625, 4675, 3475, …
$ sex               <fct> male, female, female, NA, female, male, female, male…
$ year              <int> 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007…
# What are we working with?
head(penguins)
# A tibble: 6 × 8
  species island    bill_length_mm bill_depth_mm flipper_length_mm body_mass_g
  <fct>   <fct>              <dbl>         <dbl>             <int>       <int>
1 Adelie  Torgersen           39.1          18.7               181        3750
2 Adelie  Torgersen           39.5          17.4               186        3800
3 Adelie  Torgersen           40.3          18                 195        3250
4 Adelie  Torgersen           NA            NA                  NA          NA
5 Adelie  Torgersen           36.7          19.3               193        3450
6 Adelie  Torgersen           39.3          20.6               190        3650
# ℹ 2 more variables: sex <fct>, year <int>

The Traditional Approach

Research Question

Note

How does body mass relate to flipper length in Adelie penguins?

Let’s work through this step-by-step:

# 1. Filter to one species
adelie <- penguins %>% 
  filter(species == "Adelie") %>% 
  drop_na(body_mass_g, flipper_length_mm)

# 2. Visualize the relationship
ggplot(adelie, aes(x = flipper_length_mm, y = body_mass_g)) +
  geom_point() +
  geom_smooth(method = "lm") +
  theme_minimal() +
  labs(title = "Body Mass vs Flipper Length in Adelie Penguins",
       x = "Flipper Length (mm)", y = "Body Mass (g)")

# 3. Fit the linear model
model <- lm(body_mass_g ~ flipper_length_mm, data = adelie)
summary(model)

Introducing: Navigator at UF

UF’s LLM Access Point

Navigator Chat is UF’s interface to access multiple LLMs (ChatGPT, Claude, etc.)

  • Accessible to all UF students, faculty, and staff
  • Access at: https://it.ufl.edu/ai/navigator-chat/
  • Provides a safer environment than public ChatGPT
  • But still: Don’t share sensitive or private data

Today’s Demo

We’ll use Navigator to help us with the penguin analysis. I’ll share my screen and we’ll:

  1. Craft an initial prompt together
  2. Evaluate the response
  3. Refine our prompt
  4. Critically assess the code we get

🖥️ Live Demo: Using Navigator

Let’s build a prompt together!

Initial prompt ideas:

  • What should we include?
  • How specific should we be?
  • What context matters?

Prompt Refinement Tips

What makes a good prompt for data analysis?

  1. Be specific about your goal - “I want to fit a linear model to test…”
  2. Provide context - mention your data structure, variables
  3. State your constraints - “using base R” or “using tidyverse”
  4. Ask for explanations - “explain each step” or “add comments”
  5. Specify output format - plots, tables, diagnostic checks
  6. Request checks - “include assumption testing”

Iterative prompting is key - refine based on what you get back

Critical Evaluation Checklist

After getting code from an LLM, ask yourself:

  • ✅ Does this code run without errors?
  • ✅ Do I understand what each line does?
  • ✅ Are the statistical assumptions appropriate for my question?
  • ✅ Does the approach make biological/ecological sense?
  • ✅ Are there better alternatives I should consider?
  • ✅ Did it include necessary checks (assumptions, diagnostics)?
  • ✅ Is the output interpretation correct?
  • ✅ Would this pass peer review / my advisor’s scrutiny?

If you answered “no” or “I’m not sure” to any of these - STOP and investigate!

Ethical Considerations

The bigger picture

Data Privacy

  • LLMs learn from inputs
  • Don’t share: personal data, unpublished results, sensitive information
  • Check your institution’s policies

Academic Integrity

  • Understand your course/institution policies
  • Document AI assistance
  • You’re responsible for submitted work

Bias & Fairness

  • LLMs reflect biases in training data
  • Be especially cautious with social/demographic questions
  • Critical for ecology: consider representation in training data

Environmental Impact

  • Training LLMs requires energy
  • Building data centers and water usage

Best Practices Summary

Your LLM Workflow

  1. Understand the problem first - before asking an LLM
  2. Write clear, specific prompts - with context and constraints
  3. Always verify outputs - run, test, check assumptions
  4. Iterate and refine - improve prompts based on results
  5. Document your process - save prompts, note LLM versions
  6. Learn from the code - don’t just copy-paste
  7. Know when to stop - some things need human expertise
  8. Maintain reproducibility - your analysis should be verifiable

💡 Key Takeaways

  1. LLMs are tools, not oracles - use them thoughtfully

  2. Critical thinking is essential - verify everything

  3. They’re best for getting unstuck, not replacing learning

  4. Reproducibility matters - document AI assistance

  5. You’re responsible for the work you submit

  6. Build your skills - don’t let LLMs prevent deep learning

The goal: Use AI to enhance your capabilities, not replace your thinking

Resources for Further Learning

Where to go from here

UF Resources:

Questions? Discussion?

Contact me: javiera.av@ufl.edu

UF Libraries ARCS: arcs.uflib.ufl.edu

Thank You! 🐧

Remember: The best computational tool is your brain.

LLMs are just another tool in your toolkit - use them wisely!