Integrated api

post
Find match

https://backend.alli.ai/webapi/find_match
This API is for integrated search for fuzzy match, small talk, q&a.
Request
Response
Request
Headers
API-KEY
required
string
Your cognitive search API key can be found in your dashboard Settings menu, under the General tab.
Body Parameters
process_order
optional
array
can be list of "exact_match", "small_talk", "faq", "mrc", default: ["exact_match", "small_talk", "faq"]
exact_match_list
optional
array
exact match list when using "exact_match"
exact_match_threshold
optional
number
default: 0.85
small_talk_threshold
optional
number
default: 0.85
faq_threshold
optional
number
default:0. 90
faq_direct_answer_mdethod
optional
string
can be "adaptive", "simple". default: "adaptive"
faq_direct_answer_adaptive_thrdshold
optional
number
default: 0.4
faq_direct_answer_direct_threshold
optional
string
default: 0.9
faq_hashtags
optional
array
faq filtering hashtags
faq_hashtags_operator
optional
string
can be "and", "or", default: "or"
faq_count
optional
number
default: 5
faq_format
optional
string
can be "draftjs", "html", "text". default: "text"
mrc_threshold
optional
number
default: 0.80
mrc_hashtags
optional
array
mrc filtering hashtags
mrc_hashtags_operator
optional
string
can be "and", "or", default: "or"
mrc_count
optional
string
default: "5"
mrc_format
optional
string
can be "text", "html". default: "text"
mrc_return_po
optional
boolean
default: False
Response
200: OK
Successfully retrieved. found: true/false process: matching process name error: error message When process = exact_match result: exact match keyword When process = faq result[].id: Q&A id result[].question: Q&A question result[].answer: Q&A answer
{
"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
}