Mrcs
MRC related APIs
Provide user feedback to the Documents search result.
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
The ID of the Document search result you want to give or cancel feedback for the query. It is created whenever a Documents search happens and bound to the query and the answer pair. It can be retrieved using the Documents API above.
The answer that you received to your query from this document.
The ID for the document where the answer was extracted from.
When the value is true, positive feedback is given to the extracted answer for the query. When it's false, negative feedback is given. When it's null, it cancels the feedback.
The query you want to give or cancel feedback for, toward the extracted search result.
Feedback submitted successfully
POST /webapi/mrc/user_feedback HTTP/1.1
Host: backend.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"
}
Feedback submitted successfully
{
"result": {
"userFeedback": {
"positiveCount": 1,
"negativeCount": 1
}
}
}
This API lets you get the list of feedbacks given to Document search results (AI-extracted answers from uploaded documents) for each search query.
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
MRC feedbacks retrieved successfully
GET /webapi/mrc_feedbacks HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
MRC feedbacks retrieved successfully
{
"result": [
{
"query": "text",
"feedbacks": [
{
"document_id": "text",
"answer": "text",
"answer_hash": "text",
"positive": true
}
]
}
],
"count": 1
}
This API lets you give or cancel feedback given to a Document search result for a search query.
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
The query you want to give or cancel feedback for, toward the extracted search result.
The ID for the document where the answer was extracted from.
The ID of the Document search result you want to give or cancel feedback for the query. It is created whenever a Documents search happens and bound to the query and the answer pair. It can be retrieved using the Documents API above.
When the value is true, positive feedback is given to the extracted answer for the query. When it's false, negative feedback is given. When it's null, it cancels the feedback.
Feedback submitted successfully
POST /webapi/mrc_feedback HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 66
{
"query": "text",
"id": "text",
"answerHash": "text",
"isPositive": true
}
Feedback submitted successfully
{
"result": {
"mrcFeedbackSearchResult": {
"agentFeedback": {
"positiveCount": 1,
"negativeCount": 1
}
}
},
"errors": {}
}
Returns the past Documents Searches that have been done, both through the REST API and the Alli dashboard.
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
Successful response
GET /webapi/mrc_histories HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
Successful response
{
"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?