Tool Definition Best Practices for Qwen3-32B - ...
# ask-ai
b
Tool Definition Best Practices for Qwen3-32B - Q: Are there specific quirks or best practices for writing tool descriptions/schemas when using Qwen models with Groq? - Example: Should we favor shorter descriptions, specific formats for parameters, or avoid certain patterns?
t
Thanks for reaching out, Patrick. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — you're asking whether Qwen3-32B on Groq needs special rules when writing tool descriptions/schemas (length, parameter format, patterns to avoid). I reviewed LiveKit's tool guidance and there are no model-specific quirks documented for Qwen/Groq. Below are practical, model-agnostic best practices you can follow that improve reliability across LLMs (including Qwen): • Be specific and concise in the tool description ◦ Describe what the tool does, when it should be used, and any side effects. One clear sentence plus 1–2 short clarifying lines is ideal. • Use explicit argument names and type hints ◦ Use clear parameter names and native types (string, number, boolean, arrays, objects). The function signature drives type inference, so keep names descriptive (e.g.,
user_id
,
start_time
). • Constrain inputs with enums or schemas where possible ◦ Use enums or schema validators (e.g., zod) for limited-choice parameters to reduce ambiguity and improve parsing. • Keep parameter formats predictable and machine-friendly ◦ Prefer ISO 8601 for timestamps, canonicalized IDs, and well-defined units (e.g., seconds, bytes). Document expected formats in the parameter description. • Return structured, meaningful values — not just free text ◦ Return JSON-like objects with explicit fields so the model can reason about next steps. If no response is needed, return
None
or nothing to complete silently. • Handle and surface errors clearly ◦ Raise a structured error (e.g.,
ToolError
) with a concise message and, when helpful, an error code or suggested next action. • Avoid vague or overloaded descriptions and parameters ◦ Don’t pack multiple responsibilities into one tool or use ambiguous parameter names like
data
without a schema. Split into separate tools or add detailed parameter schemas. • Favor short, concrete examples in the description if helpful ◦ One or two short examples of valid inputs/outputs can greatly improve correct usage. If you want, I can: • Review a specific tool description/schema you have and suggest edits for Qwen/Groq compatibility. • Provide a short template you can copy for tool descriptions and parameter schemas. Sources: Tool definition and use | LiveKit docs