Documentation
Engine API
FAQ

FAQ

If what you’re looking for isn’t answered here, check out our general FAQ

Bots and text analysis

  • Yes. You can build a symptom checker chatbot using Infermedica’s Engine API. While you need to handle the conversation flow on your own, you can rely on our language technology to read symptoms mentioned in user messages. Also, our /diagnosis endpoint will provide you with questions that the user may be asked directly (such as “Is your headache severe?”).

    We have a special endpoint for reading symptoms mentioned in user messages (read more about the /parse endpoint) and an exemplary implementation of chatbot (opens in a new tab) . This service is currently available only in English.

  • Yes. You can build a symptom checking chatbot using Infermedica’s Engine API. While you need to handle the conversation flow on your own, you can rely on our language technology to read symptoms mentioned in user messages. Also, our /diagnosis endpoint will provide you with questions that the user may be asked directly (such as “Is your headache severe?”).

    We have a special endpoint for reading symptoms mentioned in user messages (read more about the /diagnosis endpoint). This service is currently available only for English.

  • Yes, we have a special endpoint for reading observations mentioned in user messages. Read more about NLP.

  • Yes! Our Natural Language Processing technology makes it possible to understand observations in a user’s messages. We don’t provide voice recognition or text-to-speech, but you can use a commercially available platform, such as Alexa Voice Service, Baidu Deep Voice, Google Speech, or Yandex Speechkit.

    We would be happy to spread the word about your Infermedica-based voice application. If you wish, feel free to share!

  • The search endpoint assumes that you are looking for one particular observation — a symptom or risk factor — and returns a list of candidate matches. The whole input text is treated as a query for one observation. The behavior is customized for searching (possibly partial) user input. It is best for implementing search boxes in the UI.

    The /parse endpoint gives you access to our NLP technology. You can use it to read what a user said in their own words, describing one or more observations. It is best suited for reading user messages that were sent to a chatbot or an unstructured description of the patient’s observations in the health records. This endpoint returns a list of captured mentions of observations, each of them assigned with an id code and understood status (present or absent).

Technical

  • Infermedica’s Engine API is a language-independent, standard web service that can be easily integrated with any existing HTTP client using virtually all of the popular programming languages and frameworks.

  • The /diagnosis endpoint returns a structure containing a few lines of useful information. One of the items returned is the most relevant question given the current knowledge about the person being examined. This is the question we suggest asking the user next unless you decide that enough questions have already been asked. This question has three possible types:

    • single – a yes/no question about a single symptom (e.g. “Do you have a headache?”); when the user answers this type of question, you should send back all the evidence collected thus far, including the status of the symptom that has just been learned (present, absent or unknown)
    • group_single – a single-choice question about a group of related symptoms (e.g. “What is your body temperature?”); with single-choice questions it is sufficient to send back the answer chosen by the user (the ID of the answer with the present status) together with the evidence collected in the earlier stages
    • group_multiple – a multiple-choice question about a group of related symptoms (e.g. “What is the character of your headache?”); any number of symptoms (including none) can be sent as present; if you are sure that the others should be interpreted as absent, please send them explicitly as such; you may also send some symptoms as unknown to prevent getting questions about them (this makes sense if the user didn’t answer conclusively).
  • If you are getting error 403 in response to your API call, it’s most likely because you have exceeded your monthly limit of API requests. Should this happen, contact us.

    Learn more about Infermedica’s Engine API errors by clicking the link. If that doesn’t help, please contact us.

  • When using the /diagnosis endpoint, you can disable group questions to make sure the API returns only single questions by sending "disable_groups": true in "extras". Here is an example:

    JSON
        {
          "age": 50,
          "sex": "male",
          "evidence": [
            {"id": "s_98", "choice_id": "present"}
          ],
          "extras": {"disable_groups": true},
        }
  • This is not available directly in the current API version, but you could compute BMI on your side and add one of the corresponding BMI-related risk factors to the evidence about the current case before sending it along when calling /diagnosis.

    There are two such risk factors:

    • p_6 – BMI below 19
    • p_7 – BMI over 30

    If the computed value of the person’s BMI exceeds 30, add "p_7": "present". If the value is lower than 19, add "p_6": "present". If the value falls within the healthy range (19 < BMI < 30), it’s best to add both of these risk factors as absent to prevent the API from asking about BMI.

  • This endpoint gives access to our in-house Natural Language Processing technology. It allows you to capture symptoms and risk factors mentioned in unstructured text descriptions, such as user messages sent to a chatbot or a text description extracted from a medical record.

    Our language technology is also able to understand some typical ways of expressing negation (e.g. “I don’t have a headache” or “lymph nodes are not enlarged”).

    Each captured mention is assigned an ID code and a status (present or absent), which makes it compatible with our /diagnosis endpoint. This way you can send the captured evidence directly for assessment and learn current predictions, the triage level, and what question to ask next.

    This service works best with simple phrases or sentences (such as “I have a terrible headache and back pain” or “feeling sick”). It may be unable to understand complex stories (descriptions of accidents, complications, and general descriptions involving a series of events whose mutual relationship in time is relevant).

    Our technology is based on automated syntactic analysis and matching techniques tailored to the medical domain. We are constantly improving the quality of this service.

    See an exemplary implementation of chatbot leveraging our NLP engine (opens in a new tab).

  • We’re doing all we can to make this service as accurate as possible, but no NLP technology is perfect, including ours. The service works best with simple phrases and sentences (such as “I have a sore throat” or “no vomiting but feeling sick”). It’s not good at understanding complex stories, in particular descriptions of accidents or complications after diseases.

    If you feel that it’s not working properly for a case that it should be able to handle, please contact us. While we can’t promise that it will understand every possible description correctly, we’re constantly improving the technology and such feedback is very important to us.

  • This is due to security measures. For all API calls containing less than three reported observations, the list of conditions will be limited to a single condition. For all calls with more than two observations (either present or absent), the API will return the full ranking of relevant conditions.

    In all real life situations, you will want to collect more than two pieces of evidence (e.g. two symptoms, two answers). Given that, we believe this API behavior is not a limitation for any proper application.

  • Infermedica can try to recreate an interview and check what happened if the client uses Interview-id. Interview-id is mentioned in the developer's documentation and in Infermedica’s help center several times, should the client’s tech team need help implementing it.