paint-brush
Syntax Error-Free and Generalizable Tool Use for LLMs: Appendixby@textmodels
131 reads

Syntax Error-Free and Generalizable Tool Use for LLMs: Appendix

Too Long; Didn't Read

Researchers propose TOOLDEC, a finite-state machine-guided decoding for LLMs, reducing errors and improving tool use.
featured image - Syntax Error-Free and Generalizable Tool Use for LLMs: Appendix
Writings, Papers and Blogs on Text Models HackerNoon profile picture

Authors:

(1) Kexun Zhang, UC Santa Barbara and Equal contribution;

(2) Hongqiao Chen, Northwood High School and Equal contribution;

(3) Lei Li, Carnegie Mellon University;

(4) William Yang Wang,UC Santa Barbara.

A. APPENDIX

A.1 PSEUDO-CODE OF THE DECODING ALGORITHM

A.2 GENERALIZING TOOLKENGPT TO UNSEEN NEW TOOLS

Figure 6: Once a tool call begins, TOOLDEC injects a special prompt (blue text) into context to generate the tool name.

In this section, we show examples of TOOLDEC preventing tool-related errors on various baselines. Baselines are displayed in the left column and TOOLDEC is showed on the right.





Figure 7: TOOLDEC can prevent function name error, function argument error, and invalid ReAct syntax on ToolLLM.


Figure 8: TOOLDEC can eliminate the common tool-related errors for fine-tuned models.

A.4 EXAMPLES OF KAMEL RELATIONS

Table 6: Examples of KAMEL Relations


This paper is available on arxiv under CC 4.0 DEED license.