Question Answer API Overview
The inkeep-qa
API is specifically tailored for customer-facing question-answer scenarios like support chatbots or auto-reply workflows.
Overview
This API comes with Inkeep's sensible built-in behavior for:
- format of citations
- tone
- protecting your brand
- minimal hallucinations
inkeep-qa
is best suited for when you want to develop your own chat UX or question-answer automations with a great out of the box building block.
Available Models
You can specify the model used in the format of inkeep-qa-[model]
inkeep-qa-expert
- Let Inkeep manage which model is usedinkeep-qa-sonnet-3-5
- Use Anthropic's Claude Sonnet 3.5inkeep-qa-gpt-4o
- Use OpenAI's GPT-4o
Response Structure
The API responds with an AI assistant message (content
) and optional tools for displaying extra metadata or annotations about an answer.
Component | Description |
---|---|
content | Contains the conversational answer of the AI assistant as any normal OpenAI chat completion request. This is what you would display as the AI assistant answer in a traditional chat UI. |
Tools
In addition to content
, which is always returned, inkeep-qa
can return additional tool calls.
You can provide your own and use the two built in ones:
Tools | Description |
---|---|
provideRecordsConsidered | Provides a list of records considered (sources) by the AI assistant to generate a response. You can use this to give a preview of relevant records that were considered for an answer prior to the generation of the response. If using streaming, it will stream the records used before the response is generated. NOTE: Not all of these records are used in the final answer. |
provideLinks | Provides a list of links (sources) used by the AI assistant to generate a response. You can use this to display citations for an answer. |
[customToolCall] | Allows you to pass in custom tool calls to the AI assistant. You can use this to, for example, determine whether the AI assistant is confident, detect buying intent, categorize a question, determine when to call your own backend APIs to retrieve dynamic information from backend systems, or perform custom actions. These are defined by you and are not managed by Inkeep. See common tools for examples. |
Built In Schemas
Implementation Examples
To learn more about implementing the QA API with different SDKs and frameworks: