stanford-oval / thingpedia-common-devices

Thingpedia interface code for commonly used devices
Other
38 stars 28 forks source link

Restaurant search results are not consistent #256

Open s-jse opened 3 years ago

s-jse commented 3 years ago

Maybe more of a design decision than a bug, but due to how the Yelp skill is currently implemented, search results change after a filter is added in the next turn of the conversation. A side effect of this is that argmax and argmin change as well.

U: show me nearby restaurants. A: I see Evvia Estiatorio and Ramen Nagi. They're restaurants rated 4.5 star. U: can you show me the worst ones? A: The worst rated restaurant is Rangoon Ruby. It is a moderate restaurant near 420 Emerson St, Palo Alto, CA 94301. U: what is its rating? A: Rangoon Ruby is a restaurant rated 3.5 star. U: do you have anything lower than 3.5 stars? A: The worst rated restaurant is Rangoon Ruby. It is a restaurant rated 3.5 star. U: how about Chinese ones? A: The worst rated restaurant is P.F. Chang's. It is a restaurant rated 2.5 star.

Full log: log.txt

gcampax commented 3 years ago

I think the reason for this issue is that we don't fetch enough results from Yelp to do a consistent argmin. If you add constraints, we'll fetch more focused data from Yelp and give you more consistent results.

We can mitigate this issue by fetching more data from the skill on demand, using the pagination ability of the API.