-
Notifications
You must be signed in to change notification settings - Fork 1
Add evals for mapbox-search-patterns #41
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
Open
mattpodwysocki
wants to merge
1
commit into
main
Choose a base branch
from
add-search-patterns-evals
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "skill_name": "mapbox-search-patterns", | ||
| "evals": [ | ||
| { | ||
| "id": 1, | ||
| "prompt": "I'm building a location app and need to handle two different search buttons: one labeled 'Find Starbucks' and one labeled 'Find Coffee Shops'. Both should bias results toward the user's current location at (-122.4194, 37.7749). Which Mapbox search tool should I use for each, and why are they different?", | ||
| "expectations": [ | ||
| "Uses search_and_geocode_tool for 'Find Starbucks' — Starbucks is a specific brand name, not a category", | ||
| "Uses category_search_tool for 'Find Coffee Shops' — coffee shops is a generic category/plural type", | ||
| "Explains that using category_search_tool for a brand name like Starbucks would return an error (brands are not valid category values)", | ||
| "Sets proximity to the user's coordinates for both calls to bias results toward the user's location" | ||
| ] | ||
| }, | ||
| { | ||
| "id": 2, | ||
| "prompt": "A user clicks 'Find restaurants near me' in my app. I have their GPS coordinates. I'm currently calling: `search_and_geocode_tool({ q: 'restaurants', proximity: { longitude: -87.6298, latitude: 41.8781 } })`. Is this the right approach?", | ||
| "expectations": [ | ||
| "Identifies this as the wrong tool — 'restaurants' is a generic category/plural type, not a specific place name", | ||
| "Recommends switching to category_search_tool with an appropriate category value (e.g. 'restaurant')", | ||
| "Confirms that proximity is the correct spatial parameter for 'near me' searches — it biases results without a hard exclusion boundary", | ||
| "Notes that search_and_geocode_tool is designed for specific names, addresses, and brands — not generic category searches" | ||
| ] | ||
| }, | ||
| { | ||
| "id": 3, | ||
| "prompt": "I'm building a hotel finder. When a user searches 'hotels in downtown Chicago', should I use proximity, bbox, or country to spatially constrain the results? What's the difference and which is right here?", | ||
| "expectations": [ | ||
| "Recommends using proximity (centered on downtown Chicago) as the primary parameter — it biases results toward downtown without hard-excluding nearby hotels", | ||
| "Explains that bbox creates a hard boundary — ONLY results within the box are returned, which can miss good nearby results or return nothing if the box is too tight", | ||
| "Notes that combining proximity with bbox is valid when the user specifies a defined area like 'in downtown' — proximity biases, bbox constrains", | ||
| "Recommends category_search_tool (not search_and_geocode_tool) since 'hotels' is a generic category" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
Oops, something went wrong.
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.
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.
It may not return an error, but may end up returning no results.