Mrcs
MRC related APIs
ドキュメントの検索結果に対するユーザーフィードバックを取得する。
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
クエリに対してフィードバックを与えるまたは削除するために利用するドキュメント検索結果のIDです。このIDはドキュメント検索が行われるたびに作成され、クエリと回答のペアに紐付けられます。上記のドキュメント情報を取得するためのAPIを使用してIDを取得できます。
質問に対するドキュメントからの回答
抽出されたドキュメントのID
値がtrueの場合、クエリに対する回答に対して肯定的なフィードバックが与えられます。値がfalseの場合、否定的なフィードバックが与えられます。値がnullの場合、フィードバックはキャンセルされます。
抽出された検索結果に対してフィードバックを与えたり削除するクエリ
OK
POST /webapi/mrc/user_feedback HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 80
{
"answerHash": "text",
"answer": "text",
"id": "text",
"positive": true,
"query": "text"
}
OK
{
"result": {
"userFeedback": {
"positiveCount": 1,
"negativeCount": 1
}
}
}
このAPIを使用することで、各検索クエリに対して、ドキュメント検索の結果(アップロードされたドキュメントからAIが抽出した回答)に対して与えられたフィードバックのリストを取得できます。
offset allows you to specify the ranking number of the first item on the page.
limit allows you to set the number of objects returned on one page. The maximum value is 100.
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
取得に成功しました。
GET /webapi/mrc_feedbacks HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
取得に成功しました。
{
"result": [
{
"query": "text",
"feedbacks": [
{
"document_id": "text",
"answer": "text",
"answer_hash": "text",
"positive": true
}
]
}
],
"count": 1
}
このAPIを使用すると、検索クエリに対するドキュメント検索結果に付けられたフィードバックを付与または取り消すことができます。
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
抽出された検索結果に対してフィードバックを与えるまたはキャンセルしたいクエリ。
答えが抽出された文書のID。
クエリに対してフィードバックを与えたりキャンセルしたいドキュメント検索結果のIDです。これはドキュメント検索が行われるたびに作成され、クエリと回答のペアに結び付けられます。このIDは上記のドキュメントAPIを使用して取得できます。
値が真の場合、クエリに対する抽出された答えに肯定的なフィードバックが与えられます。値が偽の場合、否定的なフィードバックが与えられます。値がnullの場合、フィードバックが取り消されます。
フィードバックが正常に送信されました。
POST /webapi/mrc_feedback HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 66
{
"query": "text",
"id": "text",
"answerHash": "text",
"isPositive": true
}
フィードバックが正常に送信されました。
{
"result": {
"mrcFeedbackSearchResult": {
"agentFeedback": {
"positiveCount": 1,
"negativeCount": 1
}
}
},
"errors": {}
}
過去に行われたドキュメント検索を返しますが、それはREST APIとAlliダッシュボードの両方を通じて行われたものです。
The term that should have appeared in the query
Can either be DESC (meaning latest queries come first), or ASC (meaning earliest queries come first)
The latest date from which you want to get history (dates should be in the form YYYY-MM-DD)
The earliest date from which you want to get history (dates should be in the form YYYY-MM-DD)
A limit on the number of results to show (used for pagination)
In the list of all results, the index from which to start listing results (used for pagination)
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
OK
GET /webapi/mrc_histories HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
OK
{
"result": {
"histories": [
{
"agent": {
"id": "text"
},
"question": "text",
"answers": [
{
"knowledgeBase": {
"id": "text",
"fileName": "text"
},
"answer": "text",
"answerHash": "text",
"answerFormat": "text",
"hashtags": [
"text"
],
"feedbackAvailable": true,
"columnFilterValues": [
"text"
]
}
]
}
],
"count": 1
},
"errors": {}
}
Was this helpful?