MRC
MRC related APIs
This API allows you to submit user feedback (positive, negative, or cancel) for a Document search result.
Headers
API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.
AGENT-EMAIL (string, optional): The email address of the agent performing the API call.
USER-EMAIL (string, optional): The email address to associate with the user.
OWN-USER-ID (string, required): The user ID to identify the user submitting feedback.
Request Body
answerHash (string, required): The ID of the Document search result, bound to the query and answer pair.
answer (string, required): The answer received from the document search.
id (string, required): The ID of the document where the answer was extracted from.
query (string, required): The query for which you are providing feedback.
positive (boolean, nullable, required):
truefor positive feedback,falsefor negative,nullto cancel feedback.
Your API key for authentication
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
Invalid request parameters.
Authentication failed. The API-KEY header is missing or invalid.
Access denied. The project is inactive or the request IP is not allowed.
Internal server error.
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"
}{
"result": {
"userFeedback": {
"positiveCount": 1,
"negativeCount": 1
}
}
}This API allows you to retrieve feedback history for Document search results (AI-extracted answers from uploaded documents).
Headers
API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.
AGENT-EMAIL (string, optional): The email address of the agent performing the API call. When provided, filters feedbacks by this agent.
USER-EMAIL (string, optional): The email address to associate with the user.
OWN-USER-ID (string, optional): The user ID to identify or create a user. When provided, filters feedbacks by this user.
Query Parameters
offset (integer, optional): Number of records to skip for pagination. Defaults to 0.
limit (integer, optional): Maximum number of records to return. Defaults to 100.
Your API key for authentication
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
The total number of feedbacks listed.
Invalid request parameters.
Authentication failed. The API-KEY header is missing or invalid.
Access denied. The project is inactive or the request IP is not allowed.
Internal server error.
GET /webapi/mrc_feedbacks HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
{
"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.
Your API key for authentication
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
Invalid request parameters.
Authentication failed. The API-KEY header is missing or invalid.
Access denied. The project is inactive or the request IP is not allowed.
Internal server error.
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
}{
"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.
Your API key for authentication
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
Error information if the request fails
Invalid request parameters.
Authentication failed. The API-KEY header is missing or invalid.
Access denied. The project is inactive or the request IP is not allowed.
Internal server error.
GET /webapi/mrc_histories HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
{
"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": {}
}Last updated