19. Data Preparation for AI
Prepare documents, logs, code snippets, and examples so AI can use them correctly.
By Jacques Botte, founder of Toptronic®. Last updated 19 September 2026.
The lesson
Clean input beats clever prompting. Remove irrelevant noise, label files clearly, preserve exact error messages, and give small examples that show the desired pattern.
For long documents, provide a summary plus exact excerpts. For code, include file paths, language versions, commands run, and observed outputs.
The Data and Examples sections in TPEE are where this preparation becomes visible.
A junior lab technician at a soil testing laboratory strips instrument headers and blank rows from result exports before pasting the cleaned table into the Data section.
A shift lead at a packaging plant labels each production log file with the line name and the date, so the model reads the right shift rather than guessing.
A warehouse manager at a distribution centre summarises a long supplier delivery report and pastes only the three disputed line items as exact excerpts.
A veterinary nurse at a small animal clinic prepares patient notes by removing billing codes and keeping only the clinical observations the model actually needs.
A graduate software developer at a payroll software firm pastes the exact error text, the file path and the command run before asking for help.
A legal clerk at a small law practice splits a long lease into themed excerpts and gives the model a one-paragraph summary before each block.
A mine site geologist prepares drill assay tables by deleting duplicate rows and noting in each column heading which unit was used.
A retail category analyst cleans a messy product feed, renames the columns in plain words, and shows one sample row of the desired output.
A records officer at a municipal library removes personal contact details from scanned forms before any of that text goes into a prompt.
A hotel revenue analyst prepares a full season of booking data by deleting test entries and stating the exact meaning of each column.
Check yourself
Question 1: What beats clever prompting?
- Random files
- Clean, labeled, relevant input data — correct
- More vague text
- No examples
Answer: Clean, labeled, relevant input data
Good input greatly improves AI output.
Question 2: For code help, what data is useful?
- File paths, versions, commands run, errors, and observed outputs — correct
- Only project name
- Only a logo
- Nothing
Answer: File paths, versions, commands run, errors, and observed outputs
Precise diagnostic context helps solve real issues.
Question 3: Where does TPEE make data preparation visible?
- Only the About dialog
- Only theme settings
- Only window title
- Data and Examples sections — correct
Answer: Data and Examples sections
Those sections carry grounding facts and patterns.
← Previous lesson · All 91 lessons · Next lesson →
The full course — 91 lessons and 273 quiz questions — ships inside the app. Get TPEE to study it offline.