常规:企业LLM代理系统的结构规划框架_第1页
常规:企业LLM代理系统的结构规划框架_第2页
常规:企业LLM代理系统的结构规划框架_第3页
常规:企业LLM代理系统的结构规划框架_第4页
常规:企业LLM代理系统的结构规划框架_第5页
已阅读5页,还剩50页未读, 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Routine:AStructuralPlanningFrameworkforLLM

AgentSysteminEnterprise

GuanchengZeng*1,XueyiChen*,JiawangHu*,ShaohuaQi*,YaxuanMao,ZhantaoWang,Yifan

Nie,ShuangLi,QiuyangFeng,PengxuQiu,YujiaWang,WenqiangHan,LinyanHuang,GangLi,JingjingMo,andHaowenHu†2

arXiv:2507.14447v2cs.AI22Jul2025

[]

DigitalChinaAIResearch

{cenggc1,

huhwa2}@

Abstract

Thedeploymentofagentsystemsinanenterpriseenvironmentisoftenhinderedbyseveralchallenges:commonmodelslackdomain-specificprocessknowledge,leadingtodisorganizedplans,missingkeytools,andpoorexecutionstability.Toaddressthis,thispaperintroducesRoutine,amulti-stepagentplanningframeworkdesignedwithaclearstructure,explicitinstructions,andseamlessparameterpassingtoguidetheagent’sexecutionmoduleinperformingmulti-steptool-callingtaskswithhighstability.Inevaluationsconductedwithinareal-worldenterprisescenario,Routinesignificantlyincreasestheexecutionaccuracyinmodeltoolcalls,increasingtheperformanceofGPT-4ofrom41.1%to96.3%,andQwen3-14Bfrom32.6%to83.3%.WefurtherconstructedaRoutine-followingtrainingdatasetandfine-tunedQwen3-14B,resultinginanaccuracyincreaseto88.2%onscenario-specificevaluations,indicatingimprovedadherencetoexecutionplans.

Inaddition,weemployedRoutine-baseddistillationtocreateascenario-specific,multi-steptool-callingdataset.Fine-tuningonthisdistilleddatasetraisedthemodel’saccuracyto95.5%,approachingGPT-4o’sperformance.TheseresultshighlightRoutine’seffectivenessindistillingdomain-specifictool-usagepatternsandenhancingmodeladaptabilitytonewscenarios.OurexperimentalresultsdemonstratethatRoutineprovidesapracticalandaccessibleapproachtobuildingstableagentworkflows,acceleratingthedeploymentandadoptionofagentsystemsinenterpriseenvironments,andadvancingthetechnicalvisionofAIforProcess.

1Introduction

Theemergenceofautonomousagentshasgivenrisetotheactivedevelopmentofvariousframeworksandfunctionalmodulesinindustry,bringingdiversestructuresandcapabilitiestothefield[

1

].Sincebothresearchandreal-worldpracticehaveprogressed,agentarchitectureshavegraduallyconvergedtowardsmorestabledesigns.Atypicalagentsystemconsistsoffourkeymodules:planning,execution,tools,andmemory;theycollaboratetoaccomplishcomplextasksandmaintaincoherentinteractionswithusers[

2

].Thesemodulesaretypicallydrivenbylargelanguagemodels(LLMs),whichenableagentstoadapttocommonscenariosandperformtaskssuchasdataanalysis,reportsummarization,andwebinterfacemanipulationwithstronggeneralizationandgenerativecapabilities[

3

,

4

,

5

].Numeroushigh-performingandinnovativeagentapplicationshaveemerged,demonstratingthepotentialofLLM-basedagentsystemsinpracticaluse

[6

].

*Equalcontribution.

†CorrespondingAuthor

Preprint.Underreview.

2

However,inenterprise-specificscenarios,itisstillhardtoimplementagentsystemsduetotheirinabilitytointegratereliablywithscenario-specifictoolsandeffectivelysolvereal-worldtasks[

7

].Commonplanningmodelsoftenfailtogeneraterobustexecutionplansandtendtooverlookessentialtools–particularlythoseinvolvingpermissionverificationandmodelgeneration–duetothelackofscenario-specificknowledge[

8

].Thisissueisfurthercompoundedbyinsufficienttooldescriptionsinreal-worldscenarios,makingitdifficultformodelstoselecttheappropriatetoolsandparameters,leadingtoinstabilityintaskexecution[

9

].Additionally,currentagentplanninglacksaunified,structured,andcompleteformat[

8

,

10

,

11

].Asaresult,agentsoftenpassedincustomformatstotheexecutionmodule,whichmustinfertool-callinginstructionswithoutclearstructuralguidance[

12

].Thisambiguityleadstomismatchbetweenplanningstepsandtoolcalls.Whilelow-codeplatformsofferamorestablealternative,theystilldependheavilyonmanualeffort,limitingtheefficiencyofworkflowdevelopment

[13

,

14

].

Inthispaper,weproposeRoutine[

15

],astructuredplanningframeworkforagentstoaddresstheaboveissues;themechanismisshowninFigure

1

[

8

,

16

].Givenaplanningpromptfromanexpert,theplanningmodelrefinesdetailsoftheprocedureandtransformsthemintoawell-formattednaturallanguageRoutine,whichisthenpassedtotheexecutionmodeltoperformmulti-steptoolcallingandsolveuserproblems.Inexperiments,GPT-4oachievedanoverallaccuracyof96.3%onthescenario-specifictestsetwithRoutineplanning,significantlyoutperformingitsaccuracyof41.1%withoutRoutine.Similarly,Qwen3-14B’sperformanceimprovedfrom32.6%to83.3%withtheincorporationofRoutine.

Figure1.ThemechanismofRoutineguidinganLLMagentthroughmulti-steptoolcalls

Furthermore,wesynthesizedatotalof4,209commontrainingdatawithRou-tinegenerationbasedonanopenmulti-tooldataset

3

.Aftertraining,Qwen3-14Bachievedanaccuracyof88.2%,furtherim-provingitsRoutineinstruction-followingcapability.Additionally,weperformeddatadistillationbasedonRoutineinrealen-terprisescenarios,generating537scenario-specific,single-turn,multi-steptoolcall-ingsamples.Qwen3-14Btrainedonthisdistilleddatasetachievedanaccuracyof95.5%onthetestset,approachingGPT-4o’s96.3%,demonstratingthepotentialofusingRoutine-baseddistillationtoadaptexecutionmodelstoaspecificprocess.

Insummary,ourcontributionsinclude:

1.WeproposeRoutine,awell-formattedplanningframeworkthatimprovesthestabilityofmulti-steptoolcallinginagentsystemswithinenterprisescenarios;

2.WegenerateaRoutine-complianttrainingdatasetandfine-tunedmodelstoimprovetheexecutionmodule’sabilitytofollowplanninginstructions;

3.WeconductRoutine-basedknowledgedistillationtogenerateascenario-specificmulti-tooldataset,whichimprovestheaccuracyoftheexecutionmodel.

TheseresultsdemonstratetheeffectivenessofRoutineinenhancingthestabilityandaccuracyofagentsystemsinsolvingcomplexproblemswithinspecificscenarios.

2RelatedWork

2.1AgentPlanningandExecutionFramework

LLMsandagentshaveintroducedpotentialmethodsforenterprisestoimproveoperationalefficiency,particularlybyenablingintelligentautomationanddecisionsupport[

17

].TheinitialwaveofLLM-basedagentpracticefrom2023to2024wasmarkedbytheemergenceofseveralexploratorysystemssuchasAutoGPT,atasklist–drivenautonomousagent[

18

],BabyAGI,ataskmanagercapableof

3

/PKU-Baichuan-MLSystemLab/BUTTON

3

dynamicgoalgenerationandprioritization[

19

],andAutoGen,amulti-agentframeworkthatleveragesGraphFlowtomodelexecutionasaDAGoftoolcalls,ensuringtraceableandreliableprocessflows[

20

].Collectively,thesesystemsunderscoredthefeasibilityofusingLLMsforautonomousreasoning,taskdecomposition,andmulti-steptoolorchestration.Atthesametime,theseprojectshighlightedlimitationsinearlyarchitectures,includinginefficienciesincontextmanagement[

21

],fragmentedexecutionflows[

21

],andvariabilityintaskcompletionsuccessrates[

22

]–particularlystemmingfromstepexplosionandsubstantialvariabilityinrunningcostcausedbyfrequentexecutionloops

[23

,

24

].

Inresponsetotheselimitations,asecondwaveofLLM-basedagentdevelopmentemergedin2025,shiftingtheresearchfocustoimproveagent’sstability,reliability,andenterpriseapplicability.Representativesystemsadoptedproduction-orientedagentarchitecturesfeaturingmodularandcollaborativedesigns[

25

,

26

].Thesesystemsfollowedaplan-then-actparadigm,whereinhigh-leveltaskplanningprecedesthedynamicselectionandexecutionoftoolsforindividualsubtasks[

27

,

28

].Thisparadigmpreservesexecutionflexibilitywhiledisciplineplanning,markingasignificantsteptowardpracticalandcontrollableagentsystemsforreal-worlddeployment.Forexample,Manusemploysathree-stagepipeline,Planner,ExecutorandVerifier,toensureaccuracyandtraceability[

25

].

Despitetheseadvancements,manyexistingsystemsstillrepresentplansinunstructuredorsemi-structurednaturallanguage,whichhampersverification,debugging,andreuseofprocess[

29

,

30

].Inpractice,thisintroducesambiguityduringexecution,hindersstaticvalidation,andlimitstheagent’sabilitytotrackintermediatestatesorrecoverfromfailure.Toaddressthesechallenges,weproposeRoutine—-astructuredplanningscriptthatservesasanintermediaterepresentationbetweenLLM-generatedplansandexecutionengines,enhancingtheexecutionmodel’sinstruction-followingcapability.

2.2Instruction-FollowingCapabilitiesofLLMs

Theincreaseinmodelsizeemergesthein-contextlearningabilitiesofLLMs[

31

].Byprovidingtask-specificrulesandoutputconstraintsinthesystemprompt,anLLMcaninterpretinstructionsandadapttoconcretetasks.Aspromptengineeringrevealssubstantialpracticalvalue,researchersincreasinglyfocusoninstruction-following,givingrisetospecializedtrainingschemesandevaluationprotocols

[32

,

33

,

34

].

GoogleDeepMindintroducedIFEval[

35

],whichprovides25verifiableinstructionsand500prompts,providingastandardizedbaseline.However,itscoverageoftaskchains,statedependence,andcompositeconstraintsremainslimited.Totranscendthisflatevaluationsurface,TsinghuaUniver-sityproposedComplexBench[

36

].Bycombiningchain,parallel,andnestedstructuresacross19constraintdimensions,ComplexBenchshowsthatGPT-4’saccuracydropsmarkedlyonchainstruc-turesanddeeplynestedchoices,highlightingweaknessesinstructuralawarenessanddistributionalgeneralization.

Tostrengthenalignmentundercomplexconstraints,TongyiLabproposedIOPO(Input–OutputPreferenceOptimization)andreleasedtheTRACEbenchmark[

37

].IOPOjointlymodelspreferencepairsfrominstructionandresponse,yieldingsignificantgainsondifficultinstruction-followingtasks.ByteDancebuiltGuideBench[

31

],introducingguidelinerulesthatemulatedynamicallyevolvingdomainregulations.ExperimentsshowthatmainstreamLLMsstillstrugglewithfine-grained,domain-specificrules.Asanalternative,contextengineeringoffersalightweightwaytoimprovemodelcompliancebystructuringpromptsandaddingtask-relevantcues.However,manualdesignsremainimpracticalandstrugglewithdeeplystructuredorbranchingtasks

4

.

RoutinewasfirstintroducedintheOpenAICookbook[

15

].AccordingtotheCookbook,Routineenablesthedecompositionofinstructionsintosmaller,manageabletasks,therebyreducingtheriskofhallucinationsinLLMsandfacilitatingmoreeffectivecustomerservicesolutions.inourresearch,weaddedmorecomponentstoRoutineandfurtheroptimizeditsstructure,andwealsofocusedmoreonthemodel’sproceduralinstruction-followingability.ByprovidingthemodelwithastructuredRoutineformatthatexplicitlyencodestheentireworkflow,weimproveitsstabilityinfollowingtheprescribedplan.ConstructingatrainingsetthatpairsinputswiththisRoutinerepresentationfurtherenhancesthemodel’sabilitytogenerateoutputsthatconformtotherequiredstructure.

4

/davidkimai/Context-Engineering

4

Figure2.FrameworkofourRoutine-basedagentsystem.Tobegin,thesystemusesexpert-annotatedplanningpromptstogenerateRoutines.Duringruntime,itprocessesuserinputandsystemparameters,completingtasksthroughtheinteractionbetweenthemodules,andultimatelyprovidesafinalsummarybasedontheobservationfromadedicatedsummarizationtool.

2.3ToolCallingDataSynthesisandPost-Training

TrainingdataqualityandstructurearecrucialtotheperformanceofLLM.However,thecollectionofhigh-quality,human-annotatedscenario-specificdatasetsentailssubstantiallaborcosts.AcommonstrategytotacklethisissueistopromptLLMstosynthesizetrainingdata,whichissubsequentlyusedtoenhancemodelperformancethroughtargetedpost-training[

38

].Intoolcalling,datasynthesispipelinesareessentialforconsistencyandeffectiveness.Tothisend,severalstudieshaveproposeddatasetgenerationframeworks[

39

,

40

,

41

,

42

].Beyondtheseefforts,Kimi-k2introducedascalableautomatedpipelinetosimulatereal-worldmulti-turntool-usescenariosandgeneratelarge-scale,diverse,andhigh-qualitytrainingdatasets[

43

].Theseframeworksprimarilyfocusongeneratingtool-callingdatasetstoimprovemodels’abilitytoreadinputsandproducestandardizedtoolcallingcommands,ensuringconsistentoutputoftoolcallinginstructionsalignedwithcommonlyacceptedstructuralconventionsintheecosystem.

Despitetheseadvances,commontool-usemodelsstillunder-performinscenario-specificscenarios.Whiletheymaintainconsistentoutputformatting,theyoftenstruggletoselectthecorrectfunctionsorparametersduetoalackofscenario-specificknowledge[

38

].Promptengineeringandconstructingscenario-basedtrainingdatasetsusingknowledgedistillationcanbeusedtoaddresstheissue[

44

].Distillingexpertknowledgeabouttoolselectionandparameterconfigurationintosmallermodelsenableslightweightexpertagentstosolvescenario-specifictasks.

Buildingonpriorworkinenterprise-leveltoolcalling,wepreviouslydevelopedatrainingpipelinetoimprovesingle-stepfunctionexecutionbygeneratingtask-specificdatabasedonacuratedtoollist

[45

].Thepresentstudyextendsthatworkbyfocusingonmulti-steptoolcallingcapabilities.

3AgentSystemFramework

Anagentsystemtypicallycomprisesfourcoremodulesthatcollaborateonsoleusertasks:Planning,Execution,Tools,andMemory[

2

].Whenataskisreceived,thePlanningModulegeneratesastep-by-stepplan.TheExecutionModulethenfollowsthisplan,generatingtheappropriatetoolcallinstructionforeachstep.TheToolModulereceivestheseinstructionsandreturnstheexecution

5

results[

46

].TheMemoryModuleassiststheentireagent,improvingexecutioncoherenceandenhancinggeneration.BasedonourRoutineandotheroptimizationmechanisms,wehaveredesignedthesefourprimarymodulestocreateanagentsystemcenteredaroundRoutinesandmulti-steptoolcallingmechanism.TheoverallarchitectureofthissystemisshowninFigure

2

.Inthissection,wewillintroducehowwedesignthesefunctionalmodules.

3.1PlanningModuleandRoutine

Inoursystem,themainpurposeofRoutineistoenhancethestabilityofcommonmodelsinhandlingscenario-specifictasks,therebyimprovingthemodel’sinstruction-followingcapabilitiestoincreaseexecutionaccuracy.

Table1.ThecomponentsofaRoutine.Note:Componentsmarkedwith*areoptionalelements.

Component

Description

StepNumber

Thesequentialnumberofthestepwithinthemainprocess.

StepName

Aconcisesummaryofthestep’spurposeorfunction.

StepDescription

Detailedinstructions,executionconditions,andobjectivesofthestep.

InputDescription*

Adescriptionoftheparametersrequiredforexecutingthisstep.

OutputDescription*

Theoutputparametersgeneratedaftersuccessfulexecution.

StepTool*

Thecorrespondingfunctiontoolusedinthisstep;onlyonetooliscalled.

3.1.1RoutineComponentsandFormat

ARoutineiscomposedofmultiplespecificexecutionstepsofsub-tasks,whichareindependentyetofteninterrelated.Therefore,aRoutineexecutionsequencemustcontainsufficientinformationfortheagenttoreliablyfollowtheplannedsteps.ThecomponentsofacompleteRoutineandtheirdescriptionsforasub-tasksamplearedescribedinTable

1

.

Routinesforsimilarscenariosmaycontainoverlappingsteps,differingonlyincertainprocesssegments,similartodifferentbranchesofthesameworkflow.Insuchcases,similarscenarioscanbemergedbycreatingbranchingstepsandexecutingconditionstodifferentiatebetweentheworkflowsinonesingleRoutine.

HereisanexampleofaRoutinewithbranches:

StepX.<StepName>:Thisstepperformsabranchconditioncheck:

•BranchX-1Step1.<StepName>:If<Condition>,perform<StepDescription>,usingthe<ToolName>tool;

•BranchX-1Step2.<StepName>:<StepDescription>,usingthe<ToolName>tool;

•BranchX-2Step1.<StepName>:If<Condition>,perform<StepDescription>,usingthe<ToolName>tool;

StepY.<StepName>:<StepDescription>,usingthe<ToolName>tool;

StepZ.<StepName>:<StepDescription>,usingthe<ToolName>tool,andterminatetheworkflow;

Forinstance,abranchcanbedenotedas"BranchX-nStepi",representingthei-thstepwithinthen-thbranchofmainstepX.Basedonthisnotation,theexecutionmodelcandetermineitscurrentbranchandpositionwithintheworkflow.Whenaworkflowterminatesafteracertainstep,thismustbedescribedintheRoutineaccordingly.Thisstructuredformatensuresthateachplanningstepcontainsclearandcompleteinformation,facilitatingprogresstrackingandtaskexecutionfortheagent.Whenaworkflowneedstobemodified,developerscanquicklyinsert,delete,oreditsteps,allowingforagileadjustmentstothetaskplan.AnexampleofaRoutinecanbefoundintheAppendix

B

.

6

Figure3.AIOptimizationandManagementofRoutines

3.1.2AI-PoweredRoutineGenerationandOptimization

Whilegeneral-purposemodelscaneffectivelydeconstructproblemsintonaturallanguageRoutinesinopen-endedscenarios,theystruggleinenterprisecontextsduetoalackofdomain-specificknowledge.ThismakesitdifficultforthemtodirectlyandreliablygeneratecontextualizedRoutineswithoutassistancefromdomainexpertsorenterprisedocumentation.

Toimproveefficiency,anexpertcanprovideasimpledraftpromptoutliningtheplanofaspecificscenario.Thisdraftisthenoptimizedbyamodelequippedwithaspecializedprompttemplate.Theoptimizationprocessinvolvesdecomposingtheplanintodetailedsub-steps,mappingthesestepstoavailabletools,andfinallyoutputtingastructuredandcomprehensivenaturallanguageRoutinethatiseasyfortheexecutionmoduletofollow.TheoverallprocessingflowisshowninFigure

3

.TheprompttemplateforthisAI-drivenoptimizationcanbefoundintheAppendix

A

.

3.2ExecutionModuleandSmall-ScaleLLMs

Theagent’sExecutionModuleisresponsibleforreceivingtheplanprovidedbythePlanningModuleandfollowingitsprescribedpathtooutputtoolcallinginstructions.Inmostagentsystems,bothplanningandexecutionarehandledbythesamemodel.Duetothediversityandcomplexityoftasks,planningoftenrequireshighperformanceandconsumessignificantcomputationalpowerandinferencetime,requiringtheuseoflarge-scalemodels

[47

].

However,inenterprise-levelagentsystems,theexecutionprocessbringsalargeamountofcontext,includingnumerousdecisionnodesandavailabletools.Usingahigh-performancemodelforeachexecutionstepconsumessubstantialresourcesandtime,makingitdifficulttodeployinarealenterpriseenvironment

[48

].

FortheExecutionModule,thecorerequiredcapabilitiesaremulti-steptoolcallingandinstructionfollowing,ratherthancomplexlogicalreasoningorabstraction.Therefore,theExecutionModulecanbedrivenbyasmaller,specializedinstruction-followingmodel.Thismodelisonlyresponsibleforfollowingtheplanfromtheplanningmodelandoutputtingthecorrespondingtoolcallinginstructions.Theexecutionmodeldoesnotgeneratenaturallanguageresponses;instead,afinalsummaryisgeneratedbyadedicatedsummarizationtoolinthelaststep[

49

].Thisseparationensuresthattheprompttemplatesforsummarizationandtoolcallingdonotinterferewitheachother.

Byprovidingapredefinedplan,anExecutionModulepoweredbyasmallspecializedmodelcansavesignificantresources,thusimprovingitsviabilityforreal-worldenterpriseagentapplications

[50

].

7

3.3ToolModuleandMCPServer

TheToolModuleisresponsibleforreceivingtoolcallinginstructionsfromtheExecutionModule,usingthesetoolstoperformtasks,andreturningtheexecutionresults,therebyprovidingtheagentsystemwithexternalinformation.Inoursystem,weuseMCPserversastheToolModule.TheMCPservernotonlyservesastheresourcefortheExecutionModulebutalsodefinesandmanagesthesetoftoolsavailabletotheagent

5

.

MCPdefinestoolsinastructuredmannerwithitsprotocol.Eachtoolisuniformlydescribedbythisprotocol,whichspecifiesitsname,parametertypes,andcallingconstraints.TheexecutionmodulesimplyretrievesthetargetfunctionfromtheMCPtoolsetbystep-by-stepinstructionsfromthePlanningModuleandfillsintherequiredparameters.Thisprotocol-basedstructurenolongerneedstomanagetheimplementationdetailsofthetools.Consequently,theExecutionModuleonlyneedstodetermine"whichtooltocall"and"whatparameterstopass"basedontheplanprovidedbythePlanningModule

[51

].

Furthermore,thestandardizeddesignoftheToolModuleprovidesthesystemwithextremelyhighextensibility,makingiteasyfordeveloperstoaddnewfunctionsorconnectwithnewsystems.Thisallowsforadiverseecosystemoftools,includingvariousfunctions,models,otheragents,orevenuserresponsestoassisttheagent.

Inenterprisescenarioswithawidevarietyofcomplexandinteractivetools,theMCPToolModuleeffectivelydecouplestheexecutionlogicfromthetoollayer,creatingacleardivisionoflabor:theToolModuleprovidesstableandreliablefunctionstandardsandinterfaces,whileanExecutionModuledrivenbyasmall-scalemodelcallsthesetoolsstep-by-step

[50

].

3.4MemoryModule:ProceduresandVariables

Agentsystemstypicallyprocessalargevolumeofcontext,includingsystemprompts,listsofavailabletools,andconversationhistory[

52

].Thisimposesasignificantloadonthemodel:increasedcontextnotonlyleadstohigherinferencecostsbutalsodecreasesthemodel’sattentionalaccuracy.Thisrequiresaspecializedmemorystorageandretrievalmechanismthatprovidestheagentwithonlythemostrelevantinformationforthecurrenttask

[53

].

Inouragentsystem,wehaveimplementedtwoformsofmemory:long-termProcedureMemoryandshort-termVariableMemory.

3.4.1ProcedureMemory

ThroughtheAI-drivenRoutinegenerationandoptimizationprocess,thePlanningModulecreatesacollectionofRoutinesneededforagivenscenarioincollaborationwithdomainexperts.EachgroupofRoutinesinthiscollectionisdesignedtohandleaspecificsub-task.Sinceasinglescenariomaycontainmultiplesub-scenariosandtheircorrespondingRoutines,placingthisentirecollectionintotheexecutionmodel’ssystempromptwouldsignificantlyincreaseinferencecostsandcoulddecreaseaccuracybyintroducingirrelevantinformation

[47

].

Therefore,weestablishedaProcedureMemorybaseforouragentsystem.Beforedeployment,expertspopulatethismemorybasewiththenecessarysetofRoutines.Whenthesystemreceivesarelevantquery,itretrievestheappropriateRoutine(s)frommemorybasedonasimilaritycalculationbetweentheRoutine’sdescriptionandtheuser’stask,therebyassistingtheexecutionmodel

[48

].

3.4.2VariableMemory

Inmulti-steptoolcallingprocesses,theexecutionhistorygraduallyaccumulates.Theinputandoutputparametersoftenoccupyalargeportionofthecontextwindow,leadingtoissuessuchasexcessivelylongparametervalues,excessivenumberofparameters,andredundantpunctuation.Theseproblemsnotonlyincreasethepressureonthemodel’scontextwindowandheightenthe

5

/news/model-context-protocol

8

probabilityofmodelhallucinations,butalsocausesmallermodelstomakesyntaxerrorsinvolvingbrackets,quotes,andescapecharacterswhenpassingparameters

[53

].

Toeffectivelyaddressthisissue,weintroduceourVariableMemorymechanism,asshowninFigure

4

.Itscorefunctionistooptimizeparame-terpassingbetweenmulti-steptoolcalls.Whenatoolcallreturnsanexcessivelylongparameter,thesystemautomaticallystoresitinthevariablememorybase.Themodelthenonlyneedstoprovidethecorrespondingkeywhenfillinginthetoolparameters,ratherthanthefullvalue.Uponreceivingthetoolcallrequest,theMem-oryModuleautomaticallyretrievesthesekeysbacktotheiractualparametervaluesbeforepass-ingthemtothetool[

53

].TheVariableMemorymechanismsignificantlyreducescontextpres-sure,anditalsoreducestokenconsumptionandimprovessyntacticaccuracy.

Itisimportanttonotethatthisvariablememoryisnon-persistent;allrelatedvariablememoriesareusedonlyfortheexecutionofthecurrenttask.Thisdesignensuresthatmemoryremainslightweightandresponsive,avoidsunnecessarystorageoverheadanddataaccumulation,andguaranteestheindependenceofeachtaskexecution

[54

].

4AgentExecutionModelTraining

Figure4.Aschematicdiagramofagent’svariablememorymechanism.

CommonmodelscaneffectivelyexecuteRoutinesbasedontheirgeneralizedprompt-followingcapabilities.However,evenwhenthetoolsandparametersforeachsteparespecified,lightweightmodelsremainsusceptibletohallucinations,oftenleadingtoincorrecttoolcallsandparameterupdates[

47

].Toaddressthis,acommonRoutine-followingdatasetcanbeconstructedtoenhancetheexecutionmodel’sabilitytofollowinstructions.Inaddition,Routinescanserveastheproceduralknowledgefordatadistillation:Byusinghigh-capacitymodelsandRoutine,wecangeneratescenario-specificmulti-steptoolcalltrainingdata.Thisdistilleddatacanthenbeusedtotrainscenario-specificexecutionmodels,therebyreducingtheirrelianceonexplicitplanning

[48

].

Inthispaper,weexploretheimpactofthesetwotrainingstrategiesonimprovingthecapabilitiesofexecutionmodels,withtheaimofidentifyingthebestwaysforleveragingRoutine-basedplanninginreal-worldscenarios[

49

].The

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论