Before you start
A coding assistant and five saved fictional rental listings. A chat assistant and a spreadsheet can cover the schema, sample and scoring steps. No scraping or messaging is needed in this session.
Why this lesson exists
The original local apartment search agent in Python defined its listing schema before any scraping and started from saved sample data. This lab stops before site adapters and outreach, so you check scoring and deduplication on data you control.
Do the exercise
Set your boundary
Define a common schema, a stable source identifier and explicit unknown fields. Start with saved examples before connecting a live website.
Define a listing schema
Define a listing schema before scraping, with a stable source ID and explicit unknown fields.
Start with saved samples
Start with saved sample data: your five fictional listings, before connecting any live website.
Score and filter the samples
Build scoring and filters against those samples. Every score comes with a human-readable reason.
Store and deduplicate
Add SQLite persistence and deduplication, keeping every source link and original value.
Next sessions, not today
- A live site adapter Implement one site adapter, after checking that site’s access rules and using an approved API or permitted workflow.
- Desktop table Add a desktop table and detail panel.
- Outreach drafts Generate outreach drafts, but require a human click to send.
A prompt to adapt
Replace the bracketed parts with your own details.
Help me build a small research assistant in Python in a new practice folder, using five saved fictional rental listings. First version only: a common schema with a stable source ID and explicit unknown fields, scoring and filters, and SQLite with deduplication. No scraping, site adapters, desktop table or outreach drafts. List the setup commands before changing any files. Then work in four checkpoints and, after each, tell me how to check it: 1. A listing schema with source ID, canonical URL, price, size, location and conflict flags. 2. Loading the saved listings, with missing values kept as unknown. 3. An explainable score and filters for rentals in [your city], where every score comes with a human-readable reason. 4. SQLite persistence that flags duplicates without losing source links and keeps conflicting prices visible. My budget and must-haves: [budget, size, transit].
Once it runs, paste your code and ask:
Review the scoring in this code as an explainable rubric for rentals in [your city]. Check budget, accessibility, minimum size, transit, parks, furnishing, stale dates and contradictory fields. Every score must produce human-readable reasons, and missing or conflicting values must stay visible instead of being guessed.
Run this experiment
Include one duplicate, one stale listing and one conflicting price. Confirm the output preserves the original values and explains why each item was flagged.
Check your result
Use evidence from your output. A confident explanation from the AI is not enough.
If it isn’t working
Do not assume a publicly viewable page permits automated collection. When adding a real source, check its access rules and use an approved API or permitted workflow.
Optional. Progress stays in this browser.
Where this came from
Public project repository ↗. The practice lesson is an adaptation, not a verbatim transcript. About the sources.
Prepared September 2026. Tools and interfaces change; use current official setup instructions. Session lengths are estimates.
patrickz