Ai apiQuestion answer mode
Custom Tool Calls for the Question Answer API
Inkeep's inkeep-qa
API allows you to pass in custom tool calls to the AI assistant.
You can use this to:
- determine an answer's confidence and escalate to a human if needed
- route, categorize, or label the question
- trigger actions based on the content of a question or answer
To effectively use tool calls, you should:
- Define a clear semantic schema for the tool call arguments
- Write detailed descriptions of each tool call and its intended use cases
- Experiment with multiple test cases
For more details on implementing function calling, see this guide on tool calling.
Note
The examples below leverage the tool argument definitions found in the Common Tools guide.
Single Tool Call
You can provide a single tool definition to the AI assistant by passing a tool object to the tools
array parameter in the chat.completions.create
function.
Multiple Tool Calls
We can also combine multiple tool calls. The LLM will choose all relevant tools. If you'd like a tool to always be invoked, include that in the description of the tool.