Repository navigation
feat(extract): steer prepare callers to send several example URLs of one page type - #72
Draft
zenrows-dev-pool[bot] wants to merge 2 commits into
Draft
zenrows-dev-pool[bot] wants to merge 2 commits into
zenrows-dev-pool[bot] wants to merge 2 commits into
Conversation
…one page type Preparing a domain maps a page type more completely when it gets several example pages of that type: Extract compares them to check the fields it found and fill in fields one page is missing. The help, skills and docs said "one per page kind", which steered users to send a single page of each type. The prepare help, the skills, the README and the capability notes now say one URL works and at least 3 of the same page type work better, up to 5, with an example of three product pages. With fewer than 3 --url the command prints a tip on stderr. 1 to 5 URLs are still accepted; the JSON output and the exit code do not change.
…in one consistent wording
The prepare guidance used several phrasings ("at least 3 of each page type", "work best") that read as a requirement or disagreed with each other. One works; 3 or more of the same page type is a recommendation, now stated the same way in help, errors, docs and skills, including the discovery_failed next step.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Preparing a domain for Extract maps a page type more completely when it gets several example pages of that type: Extract compares pages of one type to check the fields it found and fill in fields one page is missing. The CLI told users to pass "one per page kind", which steers them to a single page of each type.
What changes
zenrows extract prepare --help: "1 to 5 example URLs. One works; we recommend 3 or more of the same page type (e.g. 3 product pages), because Extract compares pages of one type to check the fields it found and fill in fields one page is missing. Several page types can share the 5 (e.g. 3 product pages + 2 search-result pages)", with a three-product-page example. The--urlflag help says "One works; we recommend 3 or more of the same page type (e.g. 3 product pages)".--url, the command prints a short tip on stderr. It is never an error: 1 and 2 URLs are still sent as given, the--jsonoutput on stdout and the exit code are unchanged.INVALID_USAGEnext step, theEXTRACT_DOMAIN_NOT_PREPAREDnext step, thediscovery_failednext step, the API client doc comments, README,docs/capabilities.md,registry/capabilities.jsonnotes, the CLI skills and the agent-plugin skills (extract,zenrows, README) carry the same message: one works; we recommend 3 or more of the same page type.No API contract change:
example_urlsstill accepts 1 to 5 URLs.Tests
npm run typecheck: passnpm test: 484 pass, 0 fail (tests for the stderr tip with 1 and 2 URLs, no tip with 3, the help text, thediscovery_failednext step, and the capability notes)