Skip to content

feat(webmd): add WebMD mirror site (20 tasks, hardened)#62

Open
alidezhihui wants to merge 5 commits into
aiming-lab:mainfrom
alidezhihui:feat/webmd
Open

feat(webmd): add WebMD mirror site (20 tasks, hardened)#62
alidezhihui wants to merge 5 commits into
aiming-lab:mainfrom
alidezhihui:feat/webmd

Conversation

@alidezhihui

Copy link
Copy Markdown

Add WebMD mirror site

A new WebHarbor mirror of WebMD (https://www.webmd.com/), a consumer health-information site. Built following the Website Contribution Guide + CONTRIBUTING.md (clone → design-tasks → evolve → harden → seed), registered at index 16 → port 40016.

Real site mirrored

https://www.webmd.com/ — health articles across 6 sections with topic filters, conditions A–Z, drugs A–Z with per-category browse, an interactive symptom checker, author/medical-reviewer profiles, search, and user accounts (saved articles + reading history + password change).

Content licensing (please read)

This mirror deliberately does not copy WebMD's copyrighted expression. Instead:

  • Facts are real and cross-checkable against webmd.com: all 68 drugs are grounded in openFDA drug-label data (generic/brand names, classes, dosages, side effects, interactions, warnings); the 61 conditions are grounded in MedlinePlus/NIH (public domain).
  • All prose is original (article bodies, condition overviews, bios); authors/reviewers are fictional personas.
  • Images are 233 generated labeled placeholders (Pillow, correct aspect ratios) — no scraped photography. No task depends on image content; every answer is in page text.
  • Layout/nav emulate webmd.com's structure; CSS and the text wordmark are original.

Seeded rows per major model

Model Rows
Article 82
Drug 68
Condition 61
Symptom 40 (+214 condition↔symptom links)
Author (writers + reviewers) 22
Section 6
User (benchmark) 4
SavedArticle 18
ReadingHistory 16

4 benchmark users (alice.j@test.comdavid.k@test.com, password TestPass123!) with pre-seeded saved articles and reading history.

Assets (HF dataset PR)

Heavy assets (instance_seed/webmd.db, 233 static/images/) are in the dataset PR:
https://huggingface.co/datasets/ChilleD/WebHarbor/discussions/42

.assets-revision is pinned to refs/pr/42 so this PR builds end-to-end before the assets PR merges (fetch, build, and byte-identity all verified against that ref). Please bump the pin to the merge sha once HF PR #42 lands. Note: on this branch without the pinned assets, webmd would boot on a runtime-generated seed (functional but not byte-stable) — the other 16 sites are unaffected either way.

Byte-identical reset ✅

$ curl -X POST http://localhost:8201/reset/webmd
{"pid":164,"ready":true,"site":"webmd"}

$ docker exec wh-ship md5sum /opt/WebSyn/webmd/instance/webmd.db \
                             /opt/WebSyn/webmd/instance_seed/webmd.db
c310c56b564af7d6caba87ec895e0ce7  /opt/WebSyn/webmd/instance/webmd.db
c310c56b564af7d6caba87ec895e0ce7  /opt/WebSyn/webmd/instance_seed/webmd.db

All seed_*() functions early-return at the function level (gated on Section.query.count() / alice.j@test.com). Byte-identity also verified after docker restart (module-level seed re-runs on a populated DB with zero metadata drift) and after dirtying the DB with a real registration POST. 17/17 sites return HTTP 200.

Tasks

sites/webmd/tasks.jsonl20 WebVoyager-schema tasks (web_name, id, ques, web, upstream_url only), covering: section/topic browse, search, drug lookups (dosage/interaction/warning facts), condition pages, symptom checker (strictly-ranked results), author credentials, register, login + save-article, password change, counting (no count labels — agents must count cards), and multi-page comparisons (e.g. cross-referencing condition pages → drug pages, statin "Used For" set differences).

Anti-shortcut screening applied to every task: answers are anchored on mirror-specific values (fictional bylines, printed dates, exact seeded dose strings, checker rankings, list set-differences that differ from real-world labels) rather than textbook facts an LLM can recall without navigating.

Hardening (Phase 4) — verified

  • De-leak: grepped 127 rendered listing surfaces (homepage, all sections + topic filters, drugs/conditions A–Z + categories, task-query search pages, all 22 author pages) for every task's answer strings — zero hits; answers appear only on detail pages. Two leaks found and fixed during the audit (section rows and author pages carried bylines/dates).
  • Search breadth ≥6: every natural task query returns ≥6 results (measured: RSV vaccine 6, Flomax 6, melatonin 6, levothyroxine 6, gout 6, vertigo 6, atorvastatin 7, rosuvastatin 6) via near-miss distractors whose cards show only name + broad category.
  • Cross-field consistency: scripted checks — reviewed_date ≥ published_date (82/82), all related-drug/symptom slugs resolve, topic filters exact, reciprocal drug↔condition links (incl. a BPH condition hub for the 4 BPH distractor drugs).
  • Known-and-kept: ?next= redirect on login follows the merriam_webster exemplar pattern.

Agent self-check

Drove 6 representative tasks with agent_demo/agent.py (gpt-5.1): all completed in 4–10 steps (max 15), LLM-judge confidence 0.93–0.98, byte-identical reset held between stateful runs. One instructive result: on the statin-comparison task the agent hallucinated a fact from a page it had left two steps earlier and the LLM judge passed it anyway — a concrete case for strict deterministic verifiers (the reviewer's verifier for WebMD--19 should require the full unique set).

Pre-PR checks

  • python3 -m py_compile sites/webmd/app.py (+ all seed files)
  • ./scripts/build.sh from the pinned assets ref
  • 17/17 sites HTTP 200
  • byte-identical reset (md5 match, restart-stable, dirty-state-tested)
  • site self-contained, no cross-site imports; runtime data in seed DB (not JSON); scraped_data/ gitignored + dockerignored
  • no answer keys / verifiers / rubrics in tasks.jsonl (reviewer's role per CONTRIBUTING.md)

Port slot note

Registered as index 16 → port 40016 on top of current main (16 sites). PRs #57/#59 (CarMax, Healthline) are queued for the same slot — happy to renumber to the next free index at merge time (the verifiers-to-be are unaffected; task web URLs and the three sync points move together in one commit).

🤖 Generated with Claude Code

alidezhihui and others added 5 commits July 9, 2026 19:30
Facts sourced from openFDA drug labeling and MedlinePlus/NIH public-domain
health topics; all prose original; authors are fictional personas; images
are generated placeholders (HF-managed, not committed).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…+ quality fixes

- Breadth: every natural task query now returns >=6 results. Added 11
  near-miss drugs (BPH alpha-blockers/5-ARIs, melatonin supplement,
  liothyronine, methimazole, allopurinol, colchicine, pravastatin,
  lovastatin), 6 conditions (Enlarged Prostate, Pseudogout, Labyrinthitis,
  Meniere's, Vestibular Neuritis, Vestibular Migraine), 10 articles
  (vaccine news, sleep supplements, thyroid labs, uric acid, dizziness
  triage, statin choice, BPH options). openFDA/MedlinePlus-sourced facts,
  original prose; all 20 task answers verified unchanged.
- De-leak: removed author byline + published date from section listing
  rows and dates from author-page article lists; answer strings now hit
  zero of 127 listing surfaces (audit in scraped_data/harden_audit.md).
- Consistency: gout/hyperthyroidism/high-cholesterol related-drug lists
  now match their treatments text; reviewed>=published and slug
  referential checks pass.
- Quality: symptom checker batch-loads symptom links (selectinload);
  /drugs active_letters via distinct substr query; dead Drug.letter
  property removed; empty-note <p>-inside-<ul> fixed to <li>; needless
  |safe on save-button literals replaced with plain if/else.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
webmd.tar.gz (seed DB md5 c310c56b..., 233 placeholder images) uploaded to
huggingface.co/datasets/ChilleD/WebHarbor as PR aiming-lab#42. Pinning to refs/pr/42
lets this branch build end-to-end before the assets PR merges. Bump to the
merge sha (or back to main) once HF PR aiming-lab#42 lands.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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