-
Notifications
You must be signed in to change notification settings - Fork 108
Add --valuable-results to search feedback #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
2e9cadc
fb87413
9c5ae59
54e9987
236435e
6d7d925
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -83,7 +83,7 @@ Keep large search responses in `--json -o` output and select the relevant result | |||||
| - **`--highlights` on by default:** results are query-relevant excerpts from the page. Use `--no-highlights` for the original snippets. | ||||||
| - **`--scrape` fetches full content** — reuse that content instead of re-scraping result URLs. This saves credits and avoids redundant fetches. | ||||||
| - For large results, use `-o` and bounded local reads when a filesystem is available. Do not dump the full response into context. | ||||||
| - Use `jq` to extract URLs or titles: `jq -r '.data.web[].url' .firecrawl/search.json` | ||||||
| - Use `jq` to extract URLs **with their source and 1-indexed position** (you'll need both for feedback): `jq -r '.data | to_entries[] | .key as $s | .value | to_entries[] | "\($s):\(.key + 1)\t\(.value.url)"' .firecrawl/search.json` | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This jq walks every top-level key of Prompt for AI agents
Suggested change
|
||||||
| - Naming convention: `.firecrawl/search-{query}.json` or `.firecrawl/search-{query}-scraped.json` | ||||||
|
|
||||||
| ## Send feedback after every search (refunds 1 credit) | ||||||
|
|
@@ -96,9 +96,10 @@ Search costs 2 credits. After you've actually used the results (or decided they | |||||
|
|
||||||
| - **Time window:** must be sent within ~2 minutes of the search. Late feedback is rejected. | ||||||
| - **`--missing-content` is the most important field.** It's a list of _specific pieces_ of content you expected but did not find. One topic per entry, each in its own string. These aggregate across teams and tell us what to index next. | ||||||
| - **`--valuable-results` marks which results were useful.** Results come back grouped (`data.web`, `data.images`, `data.news`) and **each group is numbered from 1 independently**, so every entry is `source:position` — `web:1` and `news:1` are two different results. **Be exhaustive** — list every result that was actually useful; unlisted results are treated as not useful, so a partial list corrupts the signal. Reserve `--valuable-sources` for useful URLs that were NOT among the returned results (e.g. a page you found by following a result's link) — never report the same result in both. | ||||||
| - **Substantive content required** (zero-effort feedback is rejected with HTTP 400): | ||||||
| - `good` → must include at least one `--valuable-sources` entry. | ||||||
| - `partial` → must include `--valuable-sources` or `--missing-content`. | ||||||
| - `good` → must include `--valuable-results` or at least one `--valuable-sources` entry. | ||||||
| - `partial` → must include `--valuable-results`, `--valuable-sources`, or `--missing-content`. | ||||||
| - `bad` → must include `--missing-content` or `--query-suggestions`. | ||||||
| - **Daily refund cap (per team, per UTC day, default 100 credits).** Once your team has been refunded 100 credits today, further submissions still record feedback but no longer refund credits. The response includes `creditsRefundedToday` / `dailyRefundCap` / `dailyCapReached`. **When `dailyCapReached: true`, stop calling `search-feedback` for the rest of the UTC day** — it won't refund anything and you're wasting bandwidth. | ||||||
| - **Idempotent:** re-submitting for the same search id returns success but no extra refund. | ||||||
|
|
@@ -113,7 +114,7 @@ Verify the search returned results before reading its `id`. Zero-result searches | |||||
| if SEARCH_ID=$(jq -er 'select(any(.data[]; length > 0)) | .id' .firecrawl/search-react-hooks.json); then | ||||||
| firecrawl search-feedback "$SEARCH_ID" \ | ||||||
| --rating "<good|partial|bad>" \ | ||||||
| --valuable-sources '[{"url":"https://react.dev/reference/react/hooks","reason":"Most authoritative"}]' \ | ||||||
| --valuable-results "web:1,web:3" \ | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This reusable example hardcodes Prompt for AI agents
Suggested change
|
||||||
| --missing-content '[{"topic":"useDeferredValue","description":"No example of useDeferredValue with Suspense"}]' \ | ||||||
| --silent & | ||||||
| fi | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: The README documents only the compact syntax, leaving users of the advertised
positionsOrJsonform without its required JSON shape. Document the supported{source, position, reason}array here too.Prompt for AI agents