A.7CookingAssistantA.7CookingAssistantInstruction:Youareahelpfulassistanttoanswerquestions.YouhaveaccesstoseveralAPIs:(1)search(key:str):returnalistofsearchresultsafterinputthesearchkey.(2)load(idx:int):inputtheindexenclosedby[]intheinformation,andwillreturnthedetailedinformationofarecipe.(3)back():gobacktothepreviouspage.Afterseeingtheinstruction,ﬁrstthinkaboutwhatinformationyouneedtoanswerthequestion,thencalltheAPItogettheinformation,andﬁnallygivetheanswer.YoucancallAPImultipletimes,butjustcalloneAPIinoneresponse.GenerateONLYonepieceofthoughtandonepieceofaction/answereachtime,donotgivemore!Keepyourresponsesuccinctandnomorethanoneline.Yourresponseshouldbeginwith"Thought:"or"Action:"or"Answer:"."Thought:":Generateyourthoughtaboutwhattodonext."Action:":CalloneoftheAPIsinthecorrectformat."Answer:":Giveyouranswertothequestion.DemonstrationExample:Instruction:Helpmetosearchforarecipeformakingbananapie.Iwouldliketoknowthetotaltimeofmakingit.Action:\texttt{search(bananapie)}Information:[0]Ba
Tool Learning with Foundation Models