Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejson
{
    "transaction_id": "4mWpY50Z5ZpovKkXjt7Liw",
    "questions": [
        {
            "question_id": alpha numeric,
            "text": "string"
        }
    ]
}

Result:

API Response Body:

Code Block
languagejson
{
    "transaction_id": "4mWpY50Z5ZpovKkXjt7Liw",
    "data": [
        {
            "puretext_api_fail": 0,
            "ai_generated_response": 0,
            "incoherent_response": 0,
            "duplicate_response": 0,
            "language_mismatch": 0,
            "question_id": “alpha numeric”
        }
    ]
}

...

Code Block
languagejson
{
    "transaction_id": "4mWpY50Z5ZpovKkXjt7Liw",
    "questions": [
        {
            "question_id": alpha numeric,
            "text": "string"
        },
        {
            "question_id": alpha numeric,
            "text": "string"
        }
    ]
}

Result:

API Response Body:

Code Block
languagejson
{
    "transaction_id": "4mWpY50Z5ZpovKkXjt7Liw",
    "data": [
        {
            "puretext_api_fail": 0,
            "ai_generated_response": 0,
            "incoherent_response": 0,
            "duplicate_response": 0,
            "language_mismatch": 0,
            "question_id": “alpha numeric”
        },
        {
            "puretext_api_fail": 0,
            "ai_generated_response": 0,
            "incoherent_response": 0,
            "duplicate_response": 0,
            "language_mismatch": 0
            "question_id": "alpha numeric"
        }
    ]
}

If "puretext_api_fail": 1we recommend to terminate the session with status code 84. However, you can create your own termination logic with all the information provided.

For example, if you have a survey which is in French but also accepts English responses, to not terminate sessions where "language_mismatch": 1.

...

Code Block
languagejson
{
    "transaction_id": "4mWpY50Z5ZpovKkXjt7Liw",
    "questions": [
        {
            "question_id": 123A,
            "text": "As an AI language model I don't have a personal opinion."
        }
    ]
}

API Response which results in a termination:

Code Block
languagejson
{
    "transaction_id": "4mWpY50Z5ZpovKkXjt7Liw",
    "data": [
        {
            "puretext_api_fail": 1,
            "ai_generated_response": 1,
            "incoherent_response": 0,
            "duplicate_response": 0,
            "language_mismatch": 0,
            "question_id": “123A”
        }
    ]
}

...

Code Block
languagejson
{
    "transaction_id": "4mWpY50Z5ZpovKkXjt7Liw",
    "questions": [
        {
            "question_id": ABC987,
            "text": "I prefer white chocolate over any other chocolate."
        }
    ]
}

API Response which results in a termination:

Code Block
languagejson
{
    "transaction_id": "4mWpY50Z5ZpovKkXjt7Liw",
    "data": [
        {
            "puretext_api_fail": 1,
            "ai_generated_response": 0,
            "incoherent_response": 0,
            "duplicate_response": 1,
            "language_mismatch": 0,
            "original_transaction_id": 3rWnTCAisTABjZEa2P3ZMF,
            "question_id": “ABC987”
        }
    ]
}

...

Code Block
languagejson
{
    "transaction_id": "4mWpY50Z5ZpovKkXjt7Liw",
    "questions": [
        {
            "question_id": 1573,
            "text": "I prefer dark chocolate over white chocolate. "
        },
        {
            "question_id": 1575,
            "text": "I prefer white chocolate over dark chocolate. "
        }
    ]
}

API Response:

Code Block
languagejson
{
    "transaction_id": "4mWpY50Z5ZpovKkXjt7Liw",
    "data": [
        {
            "puretext_api_fail": 0,
            "ai_generated_response": 0,
            "incoherent_response": 0,
            "duplicate_response": 0,
            "language_mismatch": 0,
            "question_id": 1573
        },
        {
            "puretext_api_fail": 0,
            "ai_generated_response": 0,
            "incoherent_response": 0,
            "duplicate_response": 0,
            "language_mismatch": 0,
            "question_id": 1575
        }
    ]
}