Integrated API

Find Match

POST https://backend.alli.ai/webapi/find_match

This API is for integrated search for fuzzy match, small talk, q&a.

Headers

NameTypeDescription

API-KEY*

string

Your cognitive search API key can be found in your dashboard Settings menu, under the General tab.

Request Body

NameTypeDescription

process_order

array

can be list of "exact_match", "small_talk", "faq", "mrc", default: ["exact_match", "small_talk", "faq"]

exact_match_list

array

exact match list when using "exact_match"

exact_match_threshold

number

default: 0.85

small_talk_threshold

number

default: 0.85

faq_threshold

number

default:0. 90

faq_direct_answer_mdethod

string

can be "adaptive", "simple". default: "adaptive"

faq_direct_answer_adaptive_thrdshold

number

default: 0.4

faq_direct_answer_direct_threshold

string

default: 0.9

faq_hashtags

array

faq filtering hashtags

faq_hashtags_operator

string

can be "and", "or", default: "or"

faq_count

number

default: 5

faq_format

string

can be "draftjs", "html", "text". default: "text"

mrc_threshold

number

default: 0.80

mrc_hashtags

array

mrc filtering hashtags

mrc_hashtags_operator

string

can be "and", "or", default: "or"

mrc_count

string

default: "5"

mrc_format

string

can be "text", "html". default: "text"

mrc_return_po

boolean

default: False

faq_excluding_hashtags

array

faq filter-out hashtags

faq_excluding_hashtags_operator

string

can be "and", "or", default: "or"

{
  "found": true, 
  "result": [
    {
      "confidence": 0.8660902048311576, 
      "effectiveConfidence": 0.8660902048311576, 
      "question": "QA 게이트(GATE)", 
      "answer": "...", 
      "id": "RkFROjYwZDA3MGU5NWRjZDlkZTliMzFlNTI5MA==", 
      "lastUpdatedDate": "2021-06-21", 
      "createdDate": "2021-06-21", 
      "hashtags": ["실무용어"], 
      "userFeedback": {"positiveCount": 0, "negativeCount": 0}, 
      "agentFeedback": {"positiveCount": 0, "negativeCount": 0}
    }
  ], 
  "process": "faq", 
  "error": null
}

Request Example

Please replace YOUR API KEY with your one in example below, To get the api key, please see getting-api-key section.

$ curl -H "API-KEY: YOUR_API_KEY" \
       -d'{"process_order":["exact_match", "small_talk", "faq"], \
           "exact_match_list": ["aaaa", "bbbb"], \
           "query": "QA", \
           "faq_threshold": 0.85}' \
       "https://backend.alli.ai/webapi/find_match"
{
  "found": true, 
  "result": [
    {
      "confidence": 0.8660902048311576, 
      "effectiveConfidence": 0.8660902048311576, 
      "question": "QA 게이트(GATE)", 
      "answer": "...", 
      "id": "RkFROjYwZDA3MGU5NWRjZDlkZTliMzFlNTI5MA==", 
      "lastUpdatedDate": "2021-06-21", 
      "createdDate": "2021-06-21", 
      "hashtags": ["실무용어"], 
      "userFeedback": {"positiveCount": 0, "negativeCount": 0}, 
      "agentFeedback": {"positiveCount": 0, "negativeCount": 0}
    }
  ], 
  "process": "faq", 
  "error": null,
  "resultId": "RmluZE1hdGNoUmVzdWx0OjYxODhkZGMwMjE1MmZhYWVkNGExMDRmOA=="
}

Match Feedback

POST https://backend.alli.ai/webapi/match_feedback

if there is no positive_feedback, It just returns previous result without feedback.

If there is no feedback_index, it returns all previous result.

Only for 'faq' process can apply feedback. and only 'faq', 'mrc' can get previous result

Headers

NameTypeDescription

API-KEY*

String

Your cognitive search API key can be found in your dashboard Settings menu, under the General tab.

Request Body

NameTypeDescription

result_id*

String

resultId from find_match result

feedback_index

Int

result index

positive_feedback

Boolean

true: positive, false:negative

Last updated