xample,SEARCH(target=’resturant’,position=’NanjingRoad’,distance=’5km’).TheROUTEAPIwillreturnalistofroutespassingbyifdrivingfrompositionAtopositionB.Forexample,ROUTE(start=’positionA’,target=’positionB’)=[’C’,’D’,’E’,’F’].YoucouldalsouseNUM,ADD,MINUS,DIVIDE,andSUMAPIs,whichwillreturnthenumberofitemsinalist,theresultofaddingtwonumbers,minustwonumbers,dividingtwonumbers,orthesumofallthenumbersinalist.NootherAPIisallowedtouse.ThethoughtindicatesastepbystepsolutionforcallingtheAPI.APIcallsidicatesthespeciﬁcAPIcall.Herearesomeexamplesofthequeries,thoughtsandAPIcalls:DemonstrationExamples:Query:Whatistheestimateddrivingtimeatthespeedof60milesperhourfromBeijingtoShanghai?Thought:Inordertogettheestimateddrivingtime,weneedﬁrsttogetthedistancewiththeDISTANCEAPI,andthenweshoulddividethedistancewiththespeedwiththeDIVIDEAPI.APICalls:DIVIDE(DISTANCE(start='Beijing',target='Shanghai'),60)Query:HowmanycoffeeshopsarearoundTingshuaUniversityin3kilometers?Thought:InordertogetnumberofthecoffeeshopsaroundT
Tool Learning with Foundation Models