Watch the lesson
Step-by-step videos
Step 1: Look at the data yourself
Find the first part that is out of spec, with no AI yet.
Let AI help: Explain
In Ask mode, ask what the numbers mean and why a worn tool makes holes smaller.
Let AI help: Draw the chart
In Agent mode, Copilot turns the file into a chart. Check the count.
Let AI help: Draft the report
Copilot writes the four report lines. It is only a draft.
Step 4: Check what AI did
Compare the report with your own count, and ask Copilot to fix mistakes.
The sample file
One shift of sample data: 200 engine parts, in the order they were made, with the hole size of each. Put it in its own new folder before you open the folder in VS Code.
Sample prompts
- Download sample_shift.csv above, put it in a new folder, and open that folder in VS Code.
- Step 1 is by hand: press Cmd+F (Ctrl+F on Windows) and type 21.97.
- For Prompts 1 and 2, choose Ask in the Copilot Chat panel.
- For Prompts 3 to 7, choose Agent and add sample_shift.csv to the chat.
- Read each request before you click Allow. Use Prompt 4 only if the chart page is blank.
- Check the report against your own count. Use Prompt 6 if it is wrong, or Prompt 7 to see how it worked.
Prompt 1: What does a slow change mean?
Show the full prompt
I have a file with the hole size of 200 engine parts, in the order they were made. The target is 22.00 mm, and the limits are 21.98 and 22.02 mm. If the sizes slowly get smaller during a shift, what does that mean? Explain it to a first-year student in three short sentences.
Prompt 2: Why does a worn tool make holes smaller?
Show the full prompt
Why can a worn cutting tool make the holes smaller? Answer in two short sentences.
Prompt 3: Draw the chart
Show the full prompt
Make a web page called chart.html that shows sample_shift.csv as a chart. Use Chart.js. Show every one of the 200 parts as a dot: part number on the bottom, hole size on the side. Draw a solid line at the target, 22.00 mm, and dashed lines at the limits, 21.98 and 22.02 mm. Make a dot red only if it is below 21.98 or above 22.02. Put the data inside the page so it opens without a server. Title: "Sample data". Under the chart, write how many dots are shown and how many are red. Then open it in my browser.
Prompt 4: The chart page is blank
Show the full prompt
The page is blank. The title shows, but there is no chart. Please find the problem and fix it.
Prompt 5: Draft the report
Show the full prompt
Using sample_shift.csv, write the quality part of my end-of-shift report in four short lines: parts made, parts out of spec (how many, and the first one: part number and time), when the sizes started to change (part number and time), and what to check on the machine. The target is 22.00 mm, and the limits are 21.98 and 22.02 mm. Count from the file. Do not guess.
Prompt 6: Fix the report
Show the full prompt
You wrote [what the report says, for example: 17 parts out of spec]. I counted [what you found, for example: 18]. Please check the file again and fix the report.
Change the words in [brackets] to what the report says and what you counted.
Prompt 7: How did you find it?
Show the full prompt
How did you find the part where the sizes started to change? Explain in two short sentences.
