Skip to content
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

Clarified instructions for restaurants database #183

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

rishsriv
Copy link
Member

Previously, we had instructions like this:

Match city_name and food_type case-insensitively. Match with ILIKE and percent sign for substring matching for all other string matches.

This was confusing because both these lines were saying the same thing. I have changed this to Match all strings case-insensitively for all database types.

@rishsriv rishsriv requested review from wongjingping and wendy-aw and removed request for wongjingping June 25, 2024 05:56
@wendy-aw
Copy link
Contributor

Ok noted! Quick question, do you think we should keep the percent wildcard sign instruction since that hasn't got anything to do with case insensitivity?

@rishsriv
Copy link
Member Author

Good point will fix post lunch!

Copy link
Collaborator

@wongjingping wongjingping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for flagging this out. iirc case-insensitive match is slightly different from LIKE and percent sign match (or aka wildcard match). The former was generally used to refer to LOWER(column)='value', while the latter was used to refer to column LIKE '%value%'. Hence, "Match city_name and food_type case-insensitively. Match with LIKE and percent sign for substring matching for all other string matches." would that we match city_name and food_type with the former syntax (LOWER), while other columns like restaurant.name or location.street_name would use the latter syntax (LIKE).
That said, all of our questions would pass given existing data if we used the latter syntax (since city_name and food_type do not have additional prefixes/suffixes to the matched value).

I think we have 2 options on how to modify:

  1. We can just specify the instructions for all of them to just use wildcards. This is the simplest, but doesn't test the model's ability to avoid using ILIKE and stick with LOWER.
  2. We can keep the existing instructions, but should tweak the data such that we have data with extensions like food_type='neo-italian' that shouldn't be returned, so as to ensure that the model uses the former syntax (LOWER).

Lmk your thoughts!

@rishsriv
Copy link
Member Author

Thanks for the clarifications!

I'm good with matching all strings case-insensitively for now. We should specify more granular and challenging instructions in the future (sp because our current benchmark is getting a bit saturated now with scores in/approaching 90+%). But that's a task for the future and not the best use of our time right now, methinks!

Let me know. I have modified the instructions to Match all strings case-insensitively using wildcard operators for clarity

@wendy-aw
Copy link
Contributor

Okie gotcha!

@rishsriv rishsriv merged commit 6e08675 into main Jun 25, 2024
2 checks passed
@rishsriv rishsriv deleted the rishabh/final-instruction-fixes branch June 25, 2024 09:12
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.

3 participants