Question & Answer
Allows to query the knowledge base using a specific AI model.
The Knowledge Base model
id
String
The unique identifier for the knowledge base which is given by Tiledesk.
name
String
The knowledge base name.
id_project
String
The unique identifier of the project
preview_settings
Object
The settings for the knowledge base preview
default
Boolean
Specifies if the knowledge base is the default one
hybrid
Boolean
Specifies if the knowledge base is hybrid. Default is false (standard type)
engine
Object
Specifies the configuration of the vector store system used by the knowledge base. A default engine is provided.
embedding
Object
Indicates which embeddings are used for vector-based search. A default embedding is present.
Ask the Knowledge Base
POST https://api.tiledesk.com/v3/:project_id/kb/qa
Allows to query the knowledge base using a specific AI model.
Path Parameters
project_id
string
The Project Id is a unique code assigned to your project when you create it in Tiledesk.
Headers
Authorization
string
Authorization token. Basic Auth or JWT
Request Body
question
string
The question submitted
namespace
string
The id of the Knowledge Base in which to search for the answer
llm
string
(Optional) The LLM to use to generate the response (Default: "openai")
model
string
The model to use to generate the response (e.g. gpt-4o)
max_tokens
Number
The maximum number of tokens that can be consumed to generate the response
temperature
Number
Defines creativity in generating responses (low values determine more specific and predictable responses)
top_k
Number
The number of nearby chunks to use to generate the response
engine
Object
(Optional) The engine configuration object to use for the vector store system if different from the Default Engine
embedding
Object
(Optional) The embedding object to use for the embedding generation if different from the Default Engine
system_context
string
(Optional) The context to give to the AI to shape its behavior in generating the response.
alpha
Number
(Optional) Defines the balance of hybrid search (0 = full-text focused, 1 = semantic/vector focused).
chunks_only
Boolean
(Optional) Returns only the retrieved text chunks without generating a final answer.
stream
Boolean
(Optional) Enables real-time streaming of the response as it is generated.
citations
Boolean
(Optional) Includes source references for the retrieved or generated content.
tags
Array
(Optional) Filters or categorizes results based on associated tags.
rereanking
Boolean
(Optional) Applies a secondary ranking step to improve the relevance of retrieved results.
Example
Last updated