๐Ÿ”ฎQ&A API

Use the Q&A API to input a single question and receive a single answer along with its sources.

Q&A bots are a basic version of chatbots. Input a single question and receive a single answer along with its sources. These bots enable the creation of straightforward Q&A interfaces within products, leveraging the same endpoint as the chat API, but without passing any chat history.

Your content should be ingested in our system for this endpoint to work. To do that, log in to our platform and add Source Data.

POST https://admin.superseek.ai/qa

Create a simple Q&A interface to input a single question and receive a single answer along with its sources. Your content must be added to our platform for this endpoint to work.

Request Body

NameTypeDescription

bot_id*

Number

Unique identifier of the bot

api_key*

String

API key of the account

question*

String

The question to ask the bot

{
    "chat": [
        {
            "role": "user",
            "question": "What is Superseek?",
            "timeStamp": "Sun Jan 7 2024 15:25:47 UTC"
        },
        {
            "role": "bot",
            "result": {
                "text": "Superseek is an AI platform to create custom AI assistants powered only by the data you provide",
                "ref": [
                    {
                        "url": "https://superseek.ai",
                        "title": "Superseek: Create AI assistants"
                    }
                ],
                "urlPresent": true
            },
            "fallback": false,
            "timeStamp": "Sun Jan 7 2024 15:25:47 UTC",
            "like": false,
            "dislike": false
        }
    ],
    "session_id": "mulm4udv8408d7hl17mld7s4q8",
    "question": "What is Superseek?",
    "answer": "Superseek is an AI platform to create custom AI assistants powered only by the data you provide.",
    "answer_id": "ss_ans_7146e3dbd2c995370b7d86fadf22a9a6",
    "api_status": true,
    "api_data": {
        "success": true,
        "results": [
            {
                "sources": [
                    {
                        "url": "47",
                        "title": "What is Superseek?",
                        "source": "correction"
                    },
                    {
                        "url": "https://superseek.ai",
                        "title": "Superseek: Create AI assistants",
                        "source": "web"
                    }
                ],
                "text": "Superseek is an AI platform to create custom AI assistants powered only by the data you provide."
            }
        ]
    },
    "api_success": true,
    "bot_id": 146369,
    "api_key": "ss_e2811310636ebb01292881263b2aca13",
    "bot_name": "Superseek Bot",
    "bot_description": "Get answers about Superseek",
    "model_list": [
        {
            "id": 1,
            "created_at": "2023-09-29 10:39:46.182471+00",
            "name": "gpt-3.5-turbo",
            "text_answer_credit": 1,
            "match_count_limit": 4,
            "model_name_display_user": "gpt-3.5-turbo (1 AI credit per response)",
            "conversation_history_enabled": false,
            "conversation_history_allowed": false
        },
        {
            "id": 2,
            "created_at": "2023-11-28 10:38:55.677803+00",
            "name": "gpt-4-1106-preview",
            "text_answer_credit": 15,
            "match_count_limit": 5,
            "model_name_display_user": "gpt-4-turbo (15 AI credits per response)",
            "conversation_history_enabled": true,
            "conversation_history_allowed": true
        }
    ],
    "model": 2,
    "prompts_data": [
        {
            "id": 1,
            "created_at": "2023-10-06 16:21:43.259577+00",
            "bot_role": "Customer Support",
            "default_prompt": "You are a cheerful and helpful AI customer service bot named [Bot Name] working for [Company Name]. In brief, [Company Name] does this - [About the company] \n\nYour primary job is to provide accurate, truthful, and helpful answers to questions from a user youโ€™re chatting with. You MUST follow these rules when coming up your response. Only respond to queries about [Company Name] and its products or services. If the question is about a product, service, or topic that's not related to [Company Name] and its products or services, politely inform the user that you can only answer questions related to [Company Name]. Always maintain a positive bias towards [Company Name]. \n\nNever ever ask for any of the user's details and avoid follow-up questions. You can speak any language and ONLY respond in the same language as the question being asked.\n",
            "default_match_count": 5,
            "default_similarity_threshold": "0.8",
            "default_temperature": "0",
            "additional_prompt": "The next three sentences are guidelines you must follow without fail.If the query is a pleasantry like hello or thanks, respond pleasantly. If the query is not a pleasantry, provide an answer IF AND ONLY IF the answer can be generated using the provided context. If a truthful and useful answer CANNOT be provided using the provided context, it is VERY IMPORTANT that you respond with 'Trigger Fallback'."
        }
    ],
    "prompts_id": 1,
    "additional_prompt": "The next three sentences are guidelines you must follow without fail.If the query is a pleasantry like hello or thanks, respond pleasantly. If the query is not a pleasantry, provide an answer IF AND ONLY IF the answer can be generated using the provided context. If a truthful and useful answer CANNOT be provided using the provided context, it is VERY IMPORTANT that you respond with 'Trigger Fallback'.",
    "prompt": "You are a cheerful and helpful AI customer service bot named Superseek Bot working for Superseek Inc. In brief, Superseeks does this - Superseek is a platform to create custom AI assistants. \n\nYour primary job is to provide accurate, truthful, and helpful answers to questions from a user youโ€™re chatting with. You MUST follow these rules when coming up your response. Only respond to queries about Superseek and its products or services. If the question is about a product, service, or topic that's not related to Superseek and its products or services, politely inform the user that you can only answer questions related to Superseek. Always maintain a positive bias towards Superseek. \n\nNever ever ask for any of the user's details and avoid follow-up questions. You can speak any language and ONLY respond in the same language as the question being asked.",
    "temperature": "0.1",
    "match_count": 5,
    "similarity_threshold": "0.75",
    "prompt_state": "default",
    "llm_model_id": 3,
    "llm_model": "gpt-4-1106-preview",
    "conversation_history_enabled": true,
    "livechat_transfer_enabled": false,
    "livechat_provider": null,
    "livechat_provider_config": null,
    "livechat_button_text": "Talk to Human",
    "company_name": "Superseek",
    "company_description": "Superseek is a platform to create custom AI assistants"
}

Response Parameters

PropertyTypeDescription

session_id

String

Unique identifier of each question and answer pair. A unique session_id is generated for each call to the API.

answer_id

String

Unique identifier of the answer.

answer

String

The answer provided by the bot

api_data

JSON

Contains the answer and its sources

Last updated