Agentic AI · Module 3Lesson 5

Study explanation · Lesson 05 · 13 min

Extract, transform, load without guessing

Messy records become one clean table in three moves: pull the data out, fix and reshape it, and load it into one place. The raw value stays beside the cleaned one, and anything unreadable is flagged, never filled in.

Listen to this lesson

Hear the lesson read aloud, with each sentence highlighted as you go.

Narrated by an AI voice.

Raw, tidy, useful

The readings describe the work behind turning a shoebox of records into a clean ledger as extract, transform and load. Pull the data out of the documents, fix and reshape it, then load it into one clean place.

Raw, tidy, useful · Module 3 readings p. 2 and prompt library pp. 9-10
  1. ExtractPull the data outTransactions from the bank export and receipts, with the source ID kept.
  2. TransformFix and reshape itStandard dates, clean names, positive amounts; the raw value kept beside the clean one.
  3. LoadOne clean placeA single ledger, one row per record, with unreadable values flagged.

Totals are not part of this step. They come next, as formulas.

The clean ledger

In the hands-on, the bank export and the receipts become one tab with one row per transaction, and every row carries the ID of the source it came from.

The Clean Ledger tab · Prompt library p. 10
ColumnRule
DateStandardized as YYYY-MM-DD
Merchant (cleaned)A readable name, for example “TST* TRADER JOES #483” becomes “Trader Joe’s”
Raw descriptionKept exactly as it appeared, next to the cleaned name
AmountA positive number, never invented
CategorySuggested by the assistant
Source IDKept on every row
ConfidenceHigh, medium or low, for each suggested category
Needs review?Yes when a value is smudged or unreadable
ReasonWhy the row needs review

Read with careTotals are deliberately left out of this tab. They come next, as formulas.

Keep the raw beside the cleaned

Asking only for the cleaned version throws away your ability to check whether the cleaning was correct. Keeping the raw value in its own column means nothing is silently lost in translation.

The improved prompt · P4Extract [FIELDS] from [SOURCE FILES] into a table, keeping the raw value in its own column next to the cleaned value. If anything is unreadable or unclear, mark it Needs review = yes with a reason. Never invent a value.

An honest flag beats a tidy guess

Lina’s folder contains a smudged receipt from CVS. The tempting failure is for the assistant to fill in a reasonable-looking amount. The library’s rule turns that row into a visible flag instead, with a stated reason, and the second guardrail repeats it as a standing instruction.

  • Scan the Needs review column first, before trusting any total built from the table.
  • Be suspicious of a round or convenient number, and ask where it came from.

Key ideaAn honest flag is more useful than a guessed number, because a guess becomes a silently wrong total.

What tidy data looks like

The core readings give the plain rules behind the ledger’s shape, and the checks behind its review flags.

  • One row per record, one value per cell, consistent names, and no merged cells.
  • Data quality means accuracy, completeness and consistency; failures of these become your needs-review flags.
  • A receipt or a PDF is unstructured and hard to analyze; pulling its fields into rows and columns makes it structured.

Key takeaways

  • Extract the data, transform it into a consistent shape, and load it into one table.
  • One row per transaction, with the source ID on every row.
  • Keep the raw value next to the cleaned one, so the cleaning can be checked.
  • Flag anything unreadable with a reason; never invent an amount.
  • Check the review column before trusting any total.

Study explanation based on the supplied Module 3 prompt library and reading list for Agentic AI in Practice. The Module 3 lecture notes were not supplied, so nothing here is attributed to a lecture. Open the source notes above for page-level traceability.

Your study checkpoint

Ready to continue?

Mark the lesson complete once you have read it and tried its idea on something real.

Next · Lesson 6