STEM with AI: From Question to Discovery
Table of Contents
- Overview
- How to Use This Framework
- What You'll Learn
- Understanding AI Tools
- AI Is Your Partner, Not Your Replacement
- The 8 Steps at a Glance
- Step 1: Define Your Project
- Step 2: Set Up Your Tools
- Step 3: Design Your Application
- Step 4: Choose Your Tech Stack
- Step 5: Design UI/UX
- Step 6: Build & Test Your Application
- Step 7: Collect Data & Observations
- Step 8: Analyze Data & Draw Conclusions
- Project Completion Checklist
- Glossary
- Tips for Working with AI
- Resources
Overview
This framework combines the scientific method with software development, providing a structure from which students can devise their own STEM project. Within that project, students develop an application that helps them investigate a real-world question, collect data, and draw conclusions—all with the help of AI coding tools.
Who is this for?
- Middle school students (Grades 6-9)
- Students with little or no prior coding experience
- Science fair participants who want to incorporate technology
- Teachers and mentors guiding student projects
What makes this different? This framework is AI-first. Students use AI assistants throughout every phase—not just for coding, but for brainstorming, designing, debugging, and analyzing results. The student's role is to lead the project, ask good questions, and make decisions while AI handles the technical heavy lifting.
How to Use This Framework
Work through the 8 phases in order. Each phase includes:
- Explanations of what you're doing and why
- Prompts to try — copy these into your AI assistant to get help
- Tables and checklists — fill these in as you go to document your project
Your job isn't to do everything yourself. Your job is to:
- Ask good questions
- Give clear instructions to AI
- Check that AI's work makes sense
- Make decisions about your project
- Understand what you're building and why
Think of AI like a very smart assistant who can do almost anything—but needs YOU to be the project leader.
What You'll Learn
By completing a project using this framework, you'll gain experience in:
| Skill Area | What You'll Learn |
|---|---|
| The Scientific Method | How to ask questions, form hypotheses, design experiments, collect data, and draw conclusions based on evidence |
| Working with AI Tools | How to communicate effectively with AI assistants, write good prompts, and verify AI-generated work |
| Using AI in Real Projects | How AI fits into a complete workflow—from brainstorming to building to analyzing results |
| Software Design | How to plan an application: user stories, features, tech choices, and UI/UX design |
| Software Development | How apps are built: writing code, testing, debugging, and deploying to the web |
| STEM Project Experience | How to manage a multi-phase project from start to finish—skills you'll use in high school, college, and careers |
These aren't just school skills—they're the same skills used by scientists, engineers, and developers in the real world.
Understanding AI Tools
Before you start your project, let's talk about the AI tools available to help you. There are two main categories: AI assistants (for conversations and help) and AI coding tools (for building software).
AI Assistants
These are conversational AI tools you can chat with to brainstorm ideas, get explanations, and work through problems.
| Tool | What It Is | Cost | Best For |
|---|---|---|---|
| Claude (Anthropic) | AI assistant known for clear explanations and careful reasoning | Free tier available; Pro plan ~$20/month | Detailed explanations, writing help, working through complex problems |
| ChatGPT (OpenAI) | Popular AI assistant with broad knowledge | Free tier available; Plus plan ~$20/month | General questions, brainstorming, quick answers |
| Gemini (Google) | Google's AI assistant, integrated with Google services | Free tier available; Advanced plan ~$20/month | Research, working with Google Docs/Sheets, multimodal tasks |
For this framework: Any of these AI assistants will work well. The free tiers are sufficient for most student projects. Pick whichever one you or your school already has access to.
AI Coding Tools
These are specialized tools that help you write code. They combine AI assistants with code editors.
| Tool | What It Is | Cost | Best For |
|---|---|---|---|
| Claude Code (Anthropic) | Command-line coding assistant that can read, write, and run code directly on your computer | Requires Claude Pro ($20/month) or API access | Students comfortable with terminal/command line; powerful for full project building |
| Cursor | AI-powered code editor (like VS Code with AI built in) | Free tier available; Pro plan ~$20/month | Beginners who want a visual editor; good balance of power and ease of use |
| Windsurf (Codeium) | AI-powered code editor with "Cascade" feature for multi-step tasks | Free tier available; Pro plan ~$15/month | Beginners who want AI to handle more of the coding workflow |
| GitHub Copilot | AI that suggests code as you type inside VS Code or other editors | Free for students (with GitHub Education); otherwise ~$10/month | Students who want AI suggestions while learning to code themselves |
| Replit | Browser-based coding platform with AI assistant built in | Free tier available; paid plans for more features | Complete beginners; no setup required; build and host in one place |
Choosing Based on Your Budget
$0 Budget (All Free):
- Use free tier of Claude, ChatGPT, or Gemini for brainstorming and help
- Use Replit or Project IDX to build your app (no installation needed)
- Use GitHub Pages for free hosting
$0-20/month Budget:
- Use Cursor or Windsurf free tier for coding
- Upgrade one AI assistant for better responses and fewer limits
School/Club Provided:
- Ask your teacher if your school has licenses for any of these tools
- GitHub Education (free for students) includes GitHub Copilot
- Some schools have Google Workspace which includes Gemini
"I'm a middle school student starting a STEM project. I have [describe your setup: computer type, internet access, budget]. What AI tools would you recommend I use for building a data collection app?"
Your Friend Markdown
As you work with AI, you'll notice it often writes things in a format called Markdown. This is a simple way to format text that's easy to read and write.
Why should you care?
- AI naturally writes in Markdown, so understanding it helps you read AI's output
- It makes your notes, documentation, and project write-ups look professional
- GitHub, Google Docs, Notion, and many other tools understand Markdown
- It's much faster than clicking formatting buttons
Basic Markdown you'll see:
| What You Type | What It Becomes |
|---|---|
# Big Heading | A large title |
## Smaller Heading | A section heading |
**bold text** | bold text |
*italic text* | italic text |
- item one | A bullet list |
`code here` | code here |
You don't need to memorize Markdown—AI will write it for you. But recognizing it helps you understand what AI gives you and make quick edits yourself.
AI Is Your Partner, Not Your Replacement
This is the most important thing to understand: AI is here to help you do YOUR project, not to do the project for you.
Think of AI like having a super-smart study partner who:
- Never gets tired of answering questions
- Can explain things in different ways until you understand
- Types really fast and knows a lot about coding
- Is happy to do tedious work while you focus on the interesting parts
But here's what AI cannot do:
- Have your curiosity or come up with questions that matter to YOU
- Make decisions about YOUR project
- Know if something is actually working without you testing it
- Present your project or explain what you learned
- Feel proud of what you built
What AI Does for You
| Your Role (The Leader) | AI's Role (The Assistant) |
|---|---|
| Come up with ideas and questions | Help organize and expand your ideas |
| Decide what your project is about | Take notes and help you write things down clearly |
| Describe what you want your app to do | Write the code that makes it work |
| Test if things are working | Debug and fix problems you find |
| Understand your data and what it means | Do calculations and create charts |
| Draw conclusions and learn from results | Help you write up your findings clearly |
The "Grunt Work" vs. The Real Work
There are two kinds of work in any project:
"Grunt Work" — Tedious tasks that take time but don't require creativity:
- Typing out code syntax
- Formatting documents
- Calculating averages from 50 data points
- Looking up how to do something you've done before
- Fixing small bugs and typos
Let AI handle this.
The Real Work — The thinking that makes it YOUR project:
- Deciding what question you want to answer
- Figuring out how to test your hypothesis
- Noticing that something in your data is surprising
- Understanding why your results matter
- Explaining your project to others
This is YOUR job. AI helps, but you lead.
A Good Way to Think About It
You are the scientist. AI is your lab assistant.
You are the architect. AI is your construction crew.
You are the chef. AI helps prep ingredients and wash dishes.
The final product has YOUR name on it because YOU made the important decisions.
How to Know If You're Using AI Right
Ask yourself these questions:
- ☐Can I explain what my project does and why?
- ☐Do I understand the main parts of my code (even if I couldn't write it from scratch)?
- ☐Did I make the key decisions, or did I just accept whatever AI suggested?
- ☐Could I answer questions about my project from a teacher or judge?
- ☐Do I know what my data means and why my conclusions make sense?
If you can answer "yes" to these questions, you're using AI the right way—as a powerful tool that helps YOU accomplish YOUR goals.
The 8 Steps at a Glance
| # | Step | Goal | What You'll Do | AI Helps You... |
|---|---|---|---|---|
| 1 | Define Your Project | Establish the scientific foundation | Pick a topic, write hypothesis, identify variables | Brainstorm ideas, refine your question, check your logic |
| 2 | Set Up Your Tools | Gather everything you need | Identify and set up experiment tools, dev tools, accounts | Recommend tools, explain options, troubleshoot setup |
| 3 | Design Your Application | Plan what your app will do | Decide what your app does and who uses it | Create user stories, suggest features, think through edge cases |
| 4 | Choose Your Tech Stack | Select the right technologies | Pick the right technologies | Recommend beginner-friendly options, explain trade-offs |
| 5 | Design UI/UX | Create the visual design | Plan what your app looks like | Generate wireframes, suggest layouts, improve usability |
| 6 | Build & Test | Create a working application | Write code and fix bugs | Write code, debug errors, explain what code does |
| 7 | Collect Data | Run your experiment | Use your app to gather experiment data | Monitor data quality, spot issues early |
| 8 | Analyze & Conclude | Answer your research question | Find patterns and draw conclusions | Create charts, run statistics, check your reasoning |
Step 1: Define Your Project
In this phase, you'll establish the scientific foundation for your project. You'll work through the key elements of the scientific method:
| # | Element | What It Is | Example |
|---|---|---|---|
| 1 | Topic | The subject area you're curious about | Sleep and academic performance |
| 2 | Research Question | A specific, measurable question you want to answer | "How does sleep duration affect test scores in 7th graders?" |
| 3 | Hypothesis | Your educated guess about the answer | "If students sleep 8+ hours, then their test scores will be higher, because sleep improves memory." |
| 4 | Independent Variable | What you change or compare | Hours of sleep |
| 5 | Dependent Variable | What you measure (the result) | Test score |
| 6 | Constants | What you keep the same for all participants | Same test, same time of day, same grade level |
Working with AI to Find Your Topic
Start a conversation with your AI assistant:
"I'm a middle school student doing a STEM project. I need to build an app that helps me collect data for a science experiment. I'm interested in [your interests: sports, music, sleep, plants, etc.]. Can you help me brainstorm 5 project ideas that would work well?"
"I like idea #3. Can you help me turn that into a specific research question?"
Building Your Research Question
A good research question can be measured and tested.
| Weak Question | Strong Question |
|---|---|
| "Is exercise good?" | "How does 20 minutes of daily exercise affect 7th graders' math test scores over 2 weeks?" |
| "Do plants need light?" | "How do red, blue, and white LED lights affect bean plant height over 3 weeks?" |
Building Your Hypothesis
"My research question is: [your question]. Can you help me write a hypothesis using the 'If... then... because...' format? Give me a few options."
Template:
If [I change this variable], then [this will happen], because [scientific reasoning].
Identifying Your Variables
"For my experiment about [your topic], help me identify my independent variable, dependent variable, and constants. Explain each one."
| Variable Type | Definition | Your Variable |
|---|---|---|
| Independent Variable | What YOU change or control | [Fill in] |
| Dependent Variable | What you MEASURE (the result) | [Fill in] |
| Constants | What stays the SAME for all tests | [Fill in] |
Step 2: Set Up Your Tools
Before you start building, you need to gather all the tools required for your project. This includes tools for your experiment and tools for development.
Identify Your Project Tools
"I'm doing a science project about [your topic]. My experiment involves [describe what you'll be measuring/testing]. I also need to build a web app to collect data. What tools and equipment will I need for both the experiment and the app development? Keep it simple and suggest free options where possible."
Experiment Tools
| Category | Examples | Your Tools | Status |
|---|---|---|---|
| Measurement Tools | Rulers, scales, timers, thermometers, sensors | [Fill in] | ☐ Ready |
| Materials | Plants, soil, test subjects, supplies | [Fill in] | ☐ Ready |
| Recording Tools | Camera, notebook, voice recorder | [Fill in] | ☐ Ready |
| Communication | Email, messaging app | [Fill in] | ☐ Ready |
Development Tools
| Tool | Purpose | Status |
|---|---|---|
| Computer/Laptop | Running your AI assistant and code editor | ☐ Ready |
| AI Assistant | Your partner for designing, building, and debugging | ☐ Access confirmed |
| GitHub Account | Storing your code and tracking changes | ☐ Created |
| Code Editor | Where you'll view and edit code | ☐ Installed |
| Web Browser | Testing your app | ☐ Ready |
Setting Up Your Tools
"Walk me through setting up a GitHub account step by step. I'm new to this."
"I installed VS Code. What extensions should I add for web development?"
"How do I use [measurement tool] to accurately measure [what you're measuring]?"
Step 3: Design Your Application
Describing Your App to AI
The better you describe what you need, the better AI can help you build it.
"I need an app that collects data for my experiment. Here's what it needs to do:
- My experiment is about: [describe it]
- People using the app will: [what they do]
- Data I need to collect: [list the data points]
- The app should work on: [phones/computers/both]
Can you help me design this? Start by listing the features I'll need."
User Stories
User stories describe WHO does WHAT and WHY.
"Help me write user stories for my data collection app. The users are: [participants in your experiment] and me (the researcher)."
| As a... | I want to... | So that... |
|---|---|---|
| Participant | [AI helps fill this in] | [AI helps fill this in] |
| Researcher | [AI helps fill this in] | [AI helps fill this in] |
Feature List
"Based on the user stories, what's the minimum set of features I need for my app to work? What features would be nice to add later if I have time?"
Must Have (MVP):
- ☐[Feature 1]
- ☐[Feature 2]
- ☐[Feature 3]
Nice to Have (Later):
- ☐[Feature 4]
- ☐[Feature 5]
Step 4: Choose Your Tech Stack
Letting AI Recommend Technologies
You don't need to know all the technology options—AI does.
"I'm a middle school student building my first web app. It needs to:
- Collect form data from users
- Store the data somewhere I can access it
- Show me the results
- Be free to host
What's the simplest tech stack for a beginner? Explain why you're recommending each part."
Understanding AI's Recommendations
"Why did you recommend [technology] instead of [other option]?"
"Is [technology] free? Will it still be free if 50 people use my app?"
"What's the hardest part about using [technology]? Can you help me with that part?"
My Tech Stack
| Component | Technology | Why I Chose It |
|---|---|---|
| Frontend (what users see) | [AI recommendation] | [AI's reasoning] |
| Backend (stores data) | [AI recommendation] | [AI's reasoning] |
| Hosting (where app lives) | [AI recommendation] | [AI's reasoning] |
Step 5: Design UI/UX
Creating Your App's Look with AI
AI can help you design screens before you write any code.
"Help me design the screens for my data collection app. I need:
- A home/welcome screen
- A form where users enter data about [your data points]
- A page where I can see all the responses
Draw each screen using ASCII art boxes. Keep it simple and mobile-friendly."
User Flow
"Create a user flow diagram showing how someone moves through my app from start to finish."
Design Review
"Review my app design. Is it easy to use? What problems might users have? How can I make it better?"
Step 6: Build & Test Your Application
Building with AI
This is where AI becomes your coding partner. You'll describe what you want, AI writes the code, and you make sure it works.
"Let's start building my app. Based on the design we created, what file should we create first? Walk me through it step by step."
"Now I need to add [feature]. Here's what it should do: [describe it]. Write the code and explain what each part does."
"I'm getting this error: [paste the error]. Here's my code: [paste relevant code]. What's wrong and how do I fix it?"
"I don't understand this part of the code: [paste it]. Can you explain it like I'm in 7th grade?"
Development Checklist
Setup
- ☐Created GitHub repository
- ☐Set up project files
- ☐Can run the app locally
Core Features
- ☐Home screen displays correctly
- ☐Data entry form works
- ☐Data saves to database
- ☐Can view saved data
Testing
- ☐Tested on different browsers
- ☐Tested on phone
- ☐Had a friend try it without help
- ☐Fixed all major bugs
Bug Tracking
"I found a bug: [describe what's happening]. Help me figure out what's causing it and how to fix it."
Getting Your App Online
"My app is working locally. How do I deploy it so other people can use it? Walk me through step by step using [your hosting choice]."
Step 7: Collect Data & Observations
Before You Start Collecting
"I'm about to start collecting data for my experiment. Help me create a data collection plan. I need to know:
- How many participants I should have
- How long I should collect data
- What could go wrong and how to prevent it"
Data Collection Plan
| Question | Your Plan |
|---|---|
| Number of participants | [Number] |
| Data collection period | [How long] |
| How often users submit data | [Frequency] |
| What I'll do about missing data | [Your plan] |
| How I'll remind participants | [Your method] |
Monitoring Your Data
"Here's the data I've collected so far: [paste or describe it]. Does anything look wrong? Are there any problems I should fix now?"
Observation Log
| Date | What I Noticed | Does It Affect My Experiment? |
|---|---|---|
| [Date] | [Observation] | [Yes/No and why] |
Step 8: Analyze Data & Draw Conclusions
Analyzing with AI
AI can help you understand what your data means.
"Here's all the data I collected for my experiment: [paste your data]. Help me analyze it:
1. What are the basic statistics (average, min, max)?
2. What patterns do you see?
3. Does this support or reject my hypothesis?
4. What charts should I create to show my findings?"
Creating Visualizations
"Help me create a [bar chart/line graph/scatter plot] showing [what you want to visualize]. What tool should I use and how do I make it?"
Key Findings
| Question | What the Data Shows |
|---|---|
| What patterns did you find? | [AI helps identify] |
| Does it support your hypothesis? | [Yes/No/Partially] |
| Were there surprises? | [Describe them] |
| What might explain unexpected results? | [AI helps brainstorm] |
Writing Your Conclusion
"Help me write a conclusion for my science project. Here's my hypothesis, my data, and what I found. Make it sound like a middle school student wrote it, not an AI."
Reflection Questions
"What are the limitations of my experiment? What would I do differently next time? What new questions does this raise?"
What I Learned:
- About my topic: [Fill in]
- About building apps: [Fill in]
- About working with AI: [Fill in]
Project Completion Checklist
Step 1: Define Project
- ☐Research question finalized
- ☐Hypothesis written
- ☐Variables identified
Step 2: Tools Setup
- ☐All accounts created
- ☐Software installed
- ☐AI assistant ready
Step 3: App Design
- ☐User stories written
- ☐Features listed
- ☐MVP defined
Step 4: Tech Stack
- ☐Technologies chosen
- ☐Understand why each was picked
Step 5: UI/UX
- ☐Screens designed
- ☐User flow mapped
Step 6: Build & Test
- ☐App built and working
- ☐Tested thoroughly
- ☐Deployed online
Step 7: Data Collection
- ☐Data collection complete
- ☐Observations logged
- ☐Data quality verified
Step 8: Analysis
- ☐Data analyzed
- ☐Visualizations created
- ☐Conclusion written
Glossary
| Term | Simple Definition |
|---|---|
| API | How apps talk to each other |
| Backend | The invisible part that stores and processes data |
| Bug | A mistake in code that causes problems |
| Constant | What stays the same in your experiment |
| Database | Where your app remembers information |
| Debug | Finding and fixing code mistakes |
| Deploy | Putting your app online for others to use |
| Dependent Variable | What you measure (the result) |
| Frontend | What users see and click on |
| GitHub | A website for storing code |
| Hypothesis | Your educated guess |
| Independent Variable | What you change on purpose |
| MVP | The simplest version that works |
| Prompt | Instructions you give to AI |
| Repository (Repo) | A folder for your project on GitHub |
| Tech Stack | The technologies your app uses |
| UI | User Interface—how your app looks |
| UX | User Experience—how easy your app is to use |
Tips for Working with AI
Good Prompting Habits
- Be specific — "Help me build a form" is okay. "Help me build a form that collects name, age, and 3 multiple choice answers" is better.
- Give context — Remind AI what you're building and what you've already done.
- Ask for explanations — Don't just copy code. Ask "explain what this does" so you learn.
- Break big tasks into small ones — Instead of "build my whole app," go feature by feature.
- Verify AI's work — AI makes mistakes. Test everything. If something seems wrong, ask AI to double-check.
When AI Gets Something Wrong
"That's not working. Here's what happened: [describe the problem]. Can you try a different approach?"
"I don't think that's right because [your reasoning]. Can you explain why you suggested that?"
"That's too complicated for me. Can you give me a simpler solution?"
Resources
AI Assistants
- Claude — Great for coding help and explanations
- GitHub Copilot — Suggests code as you type (free for students)
Free Hosting
- GitHub Pages — Free hosting for simple websites
- Replit — Build and host in your browser
- Vercel — Free hosting with easy setup
Learning More
- Khan Academy — Free coding courses
- Scratch — Visual coding to learn concepts
- freeCodeCamp — Free full courses
Remember: You're the scientist and project leader. AI is your very capable assistant. Your curiosity, questions, and decisions are what make this YOUR project.