Skip to content

Lesson 1: import Olist data and plant evaluation scenarios - #2

Merged
mjesar merged 28 commits into
masterfrom
lesson-01-data-model
Oct 7, 2026
Merged

mjesar merged 28 commits into
masterfrom
lesson-01-data-model

Conversation

@mjesar

@mjesar mjesar commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Lesson 1 gives the agent something real to investigate. The Olist dataset is loaded
into six tables (customers, products, orders, items, payments, shipments), with
generated names and emails since Olist has none.

Real orders alone can't test an agent, because nobody knows the right answer for
them. So a second task plants five orders with known outcomes (delayed shipment,
lost package, closed return window, final sale item, duplicate charge). These
become the eval cases in later lessons. The orders are picked by a fixed rule and
the task is safe to run twice.

The import first took about 70 minutes because it created one row at a time. It now
inserts in batches of 1,000 and takes about 3 minutes with identical totals
(99,441 orders, 112,650 items, 103,886 payments). It uses insert_all!, so a
duplicate raises an error instead of being skipped silently.

Every model has a spec, and the scenarios task has its own (20 examples, all passing).
A clean db:reset, import, scenarios and spec run from scratch passes too.

@mjesar mjesar self-assigned this Oct 7, 2026
@mjesar
mjesar merged commit 2dddd89 into master Oct 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant