Get confidence scores
https://api.chat-data.com/ api/ v2/ get- confidence- score/ get-confidence-scoreThis operation retrieves the confidence scores (defined as cosine similarity) of the related chunks used to generate answers. You can use it to obtain confidence scores before calling the /chat API endpoint, providing an estimate of the chatbot's ability to deliver high-quality answers based on the context. Chunks are cached based on the messages array, so subsequent calls to the /chat API with the same messages array will incur minimal latency in retrieving related vector embeddings from the database. Therefore, calling this API endpoint before /chat should not significantly impact overall chat performance.
Request body
Sending 2 of 3 fieldsmessagesarray of objectfiles are not downloaded or parsed (only a provided content is used), and extra files are not dropped.chatbotIdstringOnly these fields are sent (application/json).