{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/from-exploration-to-mastery-enabling-llms-to","title":"From Exploration to Mastery: Enabling LLMs to Master Tools via Self-Driven Interactions","arxiv_id":"2410.08197","date":"2024-10-10","proceeding":null,"authors":["Changle Qu","Sunhao Dai","Xiaochi Wei","Hengyi Cai","Shuaiqiang Wang","Dawei Yin","Jun Xu","Ji-Rong Wen"],"abstract":"Tool learning enables Large Language Models (LLMs) to interact with external environments by invoking tools, serving as an effective strategy to mitigate the limitations inherent in their pre-training data. In this process, tool documentation plays a crucial role by providing usage instructions for LLMs, thereby facilitating effective tool utilization. This paper concentrates on the critical challenge of bridging the comprehension gap between LLMs and external tools due to the inadequacies and inaccuracies inherent in existing human-centric tool documentation. We propose a novel framework, DRAFT, aimed at Dynamically Refining tool documentation through the Analysis of Feedback and Trails emanating from LLMs' interactions with external tools. This methodology pivots on an innovative trial-and-error approach, consisting of three distinct learning phases: experience gathering, learning from experience, and documentation rewriting, to iteratively enhance the tool documentation. This process is further optimized by implementing a diversity-promoting exploration strategy to ensure explorative diversity and a tool-adaptive termination mechanism to prevent overfitting while enhancing efficiency. Extensive experiments on multiple datasets demonstrate that DRAFT's iterative, feedback-based refinement significantly ameliorates documentation quality, fostering a deeper comprehension and more effective utilization of tools by LLMs. Notably, our analysis reveals that the tool documentation refined via our approach demonstrates robust cross-model generalization capabilities.","url_abs":"https://arxiv.org/abs/2410.08197v1","url_pdf":"https://arxiv.org/pdf/2410.08197v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"from-exploration-to-mastery-enabling-llms-to","repo_url":"https://github.com/quchangle1/DRAFT","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"diversity","task_name":"Diversity"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2410.08197","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.08197"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/quchangle1/DRAFT","reach":null}],"summary":{"ran":9,"ran_honours":1,"ran_draft_wrong":6,"ran_violates":1,"unverified":10},"by_repo_kind":{"official":{"samples":27,"ran":17,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"90652e52f646264e","entry":"Info","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"90652e52f646264e"}},{"code_sha256_prefix":"8fa191b03e06ca45","entry":"answer_check","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8fa191b03e06ca45"}},{"code_sha256_prefix":"80196c9b6d0a1371","entry":"change_name","repo":"quchangle1/draft","repo_kind":"official","path":"Cal_path_rate.py","file_url":"https://github.com/quchangle1/draft/blob/HEAD/Cal_path_rate.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"80196c9b6d0a1371"}},{"code_sha256_prefix":"b273ba46971479bb","entry":"change_name","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b273ba46971479bb"}},{"code_sha256_prefix":"20b0113771cb17f2","entry":"choose_parameter","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"20b0113771cb17f2"}},{"code_sha256_prefix":"6925fcd2a5d56794","entry":"choose_parameter_depend","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6925fcd2a5d56794"}},{"code_sha256_prefix":"e0e1e1a4f708f8c7","entry":"choose_tool","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e0e1e1a4f708f8c7"}},{"code_sha256_prefix":"fe3dcc49d4415434","entry":"cosine_similarity","repo":"quchangle1/draft","repo_kind":"official","path":"DRAFT.py","file_url":"https://github.com/quchangle1/draft/blob/HEAD/DRAFT.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fe3dcc49d4415434"}},{"code_sha256_prefix":"1baad03523efe558","entry":"dict_shorten","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1baad03523efe558"}},{"code_sha256_prefix":"e247a2919937c8b6","entry":"get_response","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e247a2919937c8b6"}},{"code_sha256_prefix":"a3869e242f4b29e5","entry":"observation_shorten","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a3869e242f4b29e5"}},{"code_sha256_prefix":"99eef45bc570d9d0","entry":"prepare_tool_name_and_url","repo":"quchangle1/draft","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/draft/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"99eef45bc570d9d0"}},{"code_sha256_prefix":"2e8458283ddaa9b4","entry":"process_error","repo":"quchangle1/draft","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/draft/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2e8458283ddaa9b4"}},{"code_sha256_prefix":"9103b4347a03d6f5","entry":"process_name","repo":"quchangle1/draft","repo_kind":"official","path":"Cal_path_rate.py","file_url":"https://github.com/quchangle1/draft/blob/HEAD/Cal_path_rate.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9103b4347a03d6f5"}},{"code_sha256_prefix":"8a54f4acce793e65","entry":"run","repo":"quchangle1/draft","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/draft/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8a54f4acce793e65"}},{"code_sha256_prefix":"c25f57d20852531f","entry":"standardize","repo":"quchangle1/draft","repo_kind":"official","path":"Cal_path_rate.py","file_url":"https://github.com/quchangle1/draft/blob/HEAD/Cal_path_rate.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c25f57d20852531f"}},{"code_sha256_prefix":"1f9fe0a7c687f7f6","entry":"task_decompose","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1f9fe0a7c687f7f6"}},{"code_sha256_prefix":"4a851234c230b4f3","entry":"answer_generation","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4a851234c230b4f3"}},{"code_sha256_prefix":"166d885b223fec87","entry":"answer_generation_depend","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"166d885b223fec87"}},{"code_sha256_prefix":"f092dbfafd36bcc8","entry":"answer_summarize","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f092dbfafd36bcc8"}},{"code_sha256_prefix":"e1ed82e16201c68a","entry":"choose_API","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e1ed82e16201c68a"}},{"code_sha256_prefix":"54fedb6237f6f7d5","entry":"get_rapidapi_response","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"54fedb6237f6f7d5"}},{"code_sha256_prefix":"721a78b42e639559","entry":"openai_response","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"721a78b42e639559"}},{"code_sha256_prefix":"cdac1abe959ba09c","entry":"retrieval","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cdac1abe959ba09c"}},{"code_sha256_prefix":"8be639625e74f9fc","entry":"task_execution","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8be639625e74f9fc"}},{"code_sha256_prefix":"19a64bf2fd72679c","entry":"task_topology","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"19a64bf2fd72679c"}},{"code_sha256_prefix":"479a78407b99eb56","entry":"update_progress","repo":"quchangle1/DRAFT","repo_kind":"official","path":"Inference_DFSDT.py","file_url":"https://github.com/quchangle1/DRAFT/blob/HEAD/Inference_DFSDT.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"479a78407b99eb56"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}