langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Question on LLMRequests

Open pruksmhc opened this issue 2 years ago • 2 comments

I'm trying to implement an agent that has a Yelp tool to find the best restaurants in an area. I have been using LLMRequests, but it seem as though the beautiful soup output of the requests response is very noisy (see below). For something like this, should one implement a different chain (e.g. a 'Yelp' chain that integrates with Yelp API) instead?

'Between >>> and <<< are the raw search result text from yelp\n Extract the names of top restaurants or say "not found" if there are no results.\n >>> \n\n\nSearch Businesses In San Francisco, CA - Yelp\nYelpFor BusinessesWrite a ReviewLog InSign UpRestaurantsHome ServicesAuto ServicesMoreMoreFilters$$$$$$$$$$SuggestedOpen Now\xa0--:--WaitlistFeaturesOffering a DealOffers DeliveryOffers TakeoutGood for KidsSee allNeighborhoodsAlamo SquareAnza VistaAshbury HeightsBalboa TerraceSee allDistanceBird\'s-eye ViewDriving (5 mi.)Biking (2 mi.)Walking (1 mi.)Within 4 blocksBrowsing San Francisco, CA businessesSort:RecommendedAllPriceOpen NowWaitlist1.\xa0Bi-Rite Creamery10004Ice Cream & Frozen Yogurt$$MissionThis is a placeholder“Nice little shop near Mission Dolores Park! Like a 1 min walk away\n\nThey had a buncha unique flavors to choose from, I tried banana, cream brûlée, honey…”\xa0more2.\xa0Brenda’s French Soul Food11895Breakfast & BrunchSouthernCajun/Creole$$TenderloinThis is a placeholder“Today I go there with my coworker and then have orders foods \nAfter having the food \nWe settle bills and the server charges more than usual price \nAfter that I…”\xa0more3.\xa0Gary Danko5800American (New)FrenchWine Bars$$$$Russian HillThis is a placeholder“Amazing service and food! An error was made with our reservation so we showed up and weren\'t on their books! After showing proof of the res, they offered for…”\xa0more4.\xa0Tartine Bakery8666BakeriesCafesDesserts$$MissionThis is a placeholder“So cute here! The treats were so delicious. Honestly, the brownies were so very delish! We had a a good variety of treats to enjoy and they were all really…”\xa0more5.\xa0Mitchells Ice Cream4623Ice Cream & Frozen YogurtCustom Cakes$Bernal HeightsThis is a placeholder6.\xa0Hog Island Oyster6782SeafoodSeafood MarketsLive/Raw Food$$EmbarcaderoThis is a placeholder“Great place. Fresh oysters ! I love the area and the view of the bay! Great food and ambiance!”\xa0more7.\xa0House of Prime Rib8300American (Traditional)SteakhousesWine Bars$$$Nob HillThis is a placeholder“I\'m not going to say much but this is basically the best Prime Rib restaurant in America. It was so good that I brought my mom here from out of town. Here is…”\xa0more8.\xa0Fog Harbor Fish House8700SeafoodWine BarsCocktail Bars$$Fisherman\'s WharfThis is a placeholderOutdoor seatingFull barLive wait time: 12 - 22 mins“First time here and I wasn\'t disappointed, the foods are yummy. The staffs are very good specially to our server Shawn.”\xa0moreFind a Table9.\xa0B Patisserie3196BakeriesPatisserie/Cake ShopMacarons$$Lower Pacific HeightsThis is a placeholder“One of my absolute favorite pastry shops in SF. Their Kouign amann are the best that I\'ve ever tasted. They have classic flavors (plain and chocolate) and also…”\xa0more10.\xa0Burma Superstar7367Burmese$$Inner RichmondThis is a placeholder“Great food. great service. \nOutdoor seating has heater when it\'s cold out. \nHighly recommend the place.”\xa0moreStart Order1234567891 of 24Can\'t find the business?Adding a business to Yelp is always free.Add businessGot search feedback? Help us improve.More NearbyActive LifeArts & EntertainmentAutomotiveBeauty & SpasEducationEvent Planning & ServicesFoodHealth & MedicalHome ServicesHotels & TravelLocal FlavorLocal ServicesNightlifePetsProfessional ServicesPublic Services & GovernmentRestaurantsShoppingMore categoriesAboutAbout YelpCareersPressInvestor RelationsTrust & SafetyContent GuidelinesAccessibility StatementTerms of ServicePrivacy PolicyAd ChoicesYour Privacy ChoicesDiscoverYelp Project Cost GuidesCollectionsTalkEventsYelp BlogSupportYelp MobileDevelopersRSSYelp for BusinessYelp for BusinessBusiness Owner LoginClaim your Business PageAdvertise on YelpYelp for Restaurant OwnersTable ManagementBusiness Success StoriesBusiness SupportYelp Blog for BusinessLanguagesEnglishCountriesUnited StatesAboutBlogSupportTermsPrivacy PolicyYour Privacy ChoicesCopyright © 2004–2023 Yelp Inc. Yelp, , and related marks are registered trademarks of Yelp.Some Data By Acxiom\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n <<<\n Extracted:

pruksmhc avatar Jan 08 '23 03:01 pruksmhc

yes! if there a good yelp api, it will probably be a lot easier to integrate with that

hwchase17 avatar Jan 08 '23 03:01 hwchase17

@pruksmhc did you manage to get a working Yelp chain integrated? Would appreciate any tips if you've got any.

saadzafar avatar May 09 '23 10:05 saadzafar

Following this discussion!

johnxie avatar Aug 01 '23 08:08 johnxie

Hi, @pruksmhc! I'm Dosu, and I'm helping the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale.

Based on my understanding, you were considering implementing a different chain, specifically the 'Yelp' chain, instead of using LLMRequests for finding the best restaurants. Another user suggested that integrating with the Yelp API would be easier. There is also interest from other users in following the discussion and getting tips on integrating Yelp.

Before we close this issue, we wanted to check if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.

Thank you for your contribution to the LangChain repository!

dosubot[bot] avatar Oct 31 '23 16:10 dosubot[bot]