Mrcs

MRC related APIs

문서 검색 유저 피드백

post

문서 검색 결과에 유저 피드백 제공.

Authorizations
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
answerHashstringRequired

쿼리에 대해 피드백을 주거나 취소하려는 문서 검색 결과의 ID입니다. 이는 문서 검색이 발생할 때마다 생성되며 쿼리와 답변 쌍에 바인딩됩니다. 위의 문서 API를 사용하여 검색할 수 있습니다.

answerstringRequired

이 문서로부터 당신의 질문에 받은 답변.

idstringRequired

답변이 추출된 문서의 ID입니다.

positiveboolean | nullableOptional

값이 true일 때는 추출된 답변에 대해 긍정적인 피드백을 줍니다. 값이 false일 때는 부정적인 피드백을 줍니다. 값이 null일 때는 피드백을 취소합니다.

querystringRequired

추출된 검색 결과에 대해 피드백을 주거나 취소하려는 쿼리.

Responses
200

피드백이 성공적으로 제출되었습니다.

application/json
post
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"
}
200

피드백이 성공적으로 제출되었습니다.

{
  "result": {
    "userFeedback": {
      "positiveCount": 1,
      "negativeCount": 1
    }
  }
}

문서 피드백

get

이 API는 각 검색 쿼리에 대해 문서 검색 결과(업로드된 문서에서 AI가 추출한 답변)에 제공된 피드백 목록을 얻을 수 있게 해줍니다.

Authorizations
Query parameters
offsetintegerOptional

offset allows you to specify the ranking number of the first item on the page.

limitintegerOptional

limit allows you to set the number of objects returned on one page. The maximum value is 100.

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

MRC 피드백이 성공적으로 검색되었습니다

application/json
get
GET /webapi/mrc_feedbacks HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
200

MRC 피드백이 성공적으로 검색되었습니다

{
  "result": [
    {
      "query": "text",
      "feedbacks": [
        {
          "document_id": "text",
          "answer": "text",
          "answer_hash": "text",
          "positive": true
        }
      ]
    }
  ],
  "count": 1
}

문서 검색 피드백

post

이 API는 검색 쿼리에 대한 문서 검색 결과에 제공된 피드백을 제공하거나 취소할 수 있습니다.

Authorizations
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
querystringRequired

추출된 검색 결과에 대한 피드백을 주거나 취소하려는 쿼리입니다.

idstringRequired

답변이 추출된 문서의 ID입니다.

answerHashstringRequired

쿼리에 대해 피드백을 주거나 취소하려는 문서 검색 결과의 ID입니다. 이는 문서 검색이 발생할 때마다 생성되며, 쿼리와 답변 쌍에 매칭됩니다. 위의 문서 API를 사용하여 가져올 수 있습니다.

isPositiveboolean | nullableOptional

값이 true일 때, 쿼리에 대한 추출된 답변에 긍정적인 피드백이 제공됩니다. false일 때는 부정적인 피드백이 제공됩니다. null일 때는 피드백이 취소됩니다.

Responses
200

피드백이 성공적으로 제출되었습니다.

application/json
post
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
}
200

피드백이 성공적으로 제출되었습니다.

{
  "result": {
    "mrcFeedbackSearchResult": {
      "agentFeedback": {
        "positiveCount": 1,
        "negativeCount": 1
      }
    }
  },
  "errors": {}
}

문서 쿼리 기록

get

REST API와 Alli 대시보드를 통해 수행된 과거 문서 검색 결과를 반환합니다.

Authorizations
Query parameters
searchTermstringOptional

The term that should have appeared in the query

orderstringOptional

Can either be DESC (meaning latest queries come first), or ASC (meaning earliest queries come first)

endDatestringOptional

The latest date from which you want to get history (dates should be in the form YYYY-MM-DD)

startDatestringOptional

The earliest date from which you want to get history (dates should be in the form YYYY-MM-DD)

limitintegerOptional

A limit on the number of results to show (used for pagination)

offsetintegerOptional

In the list of all results, the index from which to start listing results (used for pagination)

Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

성공적인 대응

application/json
get
GET /webapi/mrc_histories HTTP/1.1
Host: backend.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
200

성공적인 대응

{
  "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?