patrickz.aiLet’s talk ↗

Automate safely / Project lab

Build a research assistant from sample listings

Normalize and compare listings without silently inventing missing facts.

About 75 minutesSome experienceRead free · No sign-up

Before you start

A chat or coding assistant and five saved fictional rental listings. No scraping or messaging is required.

Why this lesson exists

This lab adapts the “Build a Local Apartment Search Agent in Python” project write-up into a practice build. The time is an estimated first session, not a promise to finish a production system. Use the public repository as a reference when available; the exercise can be built with original sample content.

Do the exercise

  1. Define the practice version

    Define a common schema, a stable source identifier and explicit unknown fields. Start with saved examples before connecting a live website.

  2. Build step 1

    Define a listing schema before scraping.

  3. Build step 2

    Start with saved sample data.

  4. Build step 3

    Build scoring and filters against those samples.

  5. Build step 4

    Add SQLite persistence and deduplication.

  6. Build step 5

    Implement one site adapter.

  7. Build step 6

    Add a desktop table and detail panel.

  8. Build step 7

    Generate outreach drafts, but require a human click to send.

  9. Run the 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.

A prompt to adapt

Replace the bracketed parts with your own practice details.

Work in a disposable practice project. Explain any setup requirements before changing files. Build one small step at a time and show how I can check it.

Design a normalized rental-listing schema for multiple websites. Include source ID, canonical URL, project, price, size, beds, baths, location, transit, amenities, agent contact, listing date, extraction confidence, and conflict flags.

Create an explainable scoring rubric for Bangkok apartments. Rank budget, accessibility, minimum size, transit, parks, furnishing, stale dates, and contradictory fields. Every score must produce human-readable reasons.

My first-version boundary: Define a common schema, a stable source identifier and explicit unknown fields. Start with saved examples before connecting a live website.

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.

  • Duplicates are identified without losing source links.
  • Missing and conflicting values remain visible.
  • Any outreach remains a human-reviewed draft.

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.

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.

KEEP GOING

Your next useful step

Browse all 59 guides ↗