Classify a query as information seeking or not. If so, generate an AI answer and/or provide relevant documents. Useful for integrating into existing chat interfaces.
Ask request
OK
Invalid request
Not Authorized
Forbidden
Invalid Query
Too Many Requests
{- "detectOnly": true,
- "AskExperimentalMetadata": {
- "QueryHasMentions": true,
- "QueryIsLengthAppropriate": true,
- "QueryIsAnswerable": true
}, - "searchRequest": {
- "trackingToken": "trackingToken",
- "query": "vacation policy",
- "pageSize": 10,
- "requestOptions": {
- "facetFilters": [
- {
- "fieldName": "type",
- "values": [
- {
- "value": "article",
- "relationType": "EQUALS"
}, - {
- "value": "document",
- "relationType": "EQUALS"
}
]
}, - {
- "fieldName": "department",
- "values": [
- {
- "value": "engineering",
- "relationType": "EQUALS"
}
]
}
]
}
}, - "excludedDocumentSpecs": [
- {
- "url": "string"
}
], - "operators": "string",
- "backend": "SEARCH",
- "chatApplicationId": "string",
- "inclusions": {
- "containerSpecs": [
- {
- "url": "string"
}
], - "documentSpecs": [
- {
- "url": "string"
}
], - "datasourceInstances": [
- "string"
]
}, - "exclusions": {
- "containerSpecs": [
- {
- "url": "string"
}
], - "documentSpecs": [
- {
- "url": "string"
}
], - "datasourceInstances": [
- "string"
]
}
}
{- "isQuestion": true,
- "question": "string",
- "searchResponse": {
- "trackingToken": "trackingToken",
- "suggestedSpellCorrectedQuery": "suggestedSpellCorrectedQuery",
- "hasMoreResults": true,
- "errorInfo": {
- "errorMessages": [
- {
- "source": "gmail",
- "errorMessage": "invalid token"
}, - {
- "source": "slack",
- "errorMessage": "expired token"
}
]
}, - "requestID": "5e345ae500ff0befa2b9d1a3ba0001737e7363696f312d323535323137000171756572792d656e64706f696e743a323032303031333074313830343032000100",
- "results": [
- {
- "snippets": [
- {
- "snippet": "snippet",
- "mimeType": "mimeType"
}
], - "metadata": {
- "container": "container",
- "createTime": "2000-01-23T04:56:07.000Z",
- "datasource": "datasource",
- "author": {
- "name": "name"
}, - "documentId": "documentId",
- "updateTime": "2000-01-23T04:56:07.000Z",
- "mimeType": "mimeType",
- "objectType": "objectType"
}, - "title": "title",
}, - {
- "snippets": [
- {
- "snippet": "snippet",
- "mimeType": "mimeType"
}
], - "metadata": {
- "container": "container",
- "createTime": "2000-01-23T04:56:07.000Z",
- "datasource": "datasource",
- "author": {
- "name": "name"
}, - "documentId": "documentId",
- "updateTime": "2000-01-23T04:56:07.000Z",
- "mimeType": "mimeType",
- "objectType": "objectType"
}, - "title": "title",
}
], - "facetResults": [
- {
- "buckets": [
- {
- "percentage": 5,
- "count": 1,
- "value": {
- "stringValue": "stringValue",
- "integerValue": 5
}
}, - {
- "percentage": 5,
- "count": 1,
- "value": {
- "stringValue": "stringValue",
- "integerValue": 5
}
}
], - "sourceName": "sourceName",
- "operatorName": "operatorName",
- "objectType": "objectType"
}, - {
- "buckets": [
- {
- "percentage": 5,
- "count": 1,
- "value": {
- "stringValue": "stringValue",
- "integerValue": 5
}
}, - {
- "percentage": 5,
- "count": 1,
- "value": {
- "stringValue": "stringValue",
- "integerValue": 5
}
}
], - "sourceName": "sourceName",
- "operatorName": "operatorName",
- "objectType": "objectType"
}
], - "rewrittenQuery": "rewrittenQuery",
- "rewrittenFacetFilters": [
- {
- "fieldName": "fieldName",
- "values": [
- "fieldValues",
- "fieldValues"
]
}, - {
- "fieldName": "fieldName",
- "values": [
- "fieldValues",
- "fieldValues"
]
}
]
}, - "chatResponse": {
- "messages": [
- {
- "agentConfig": {
- "agent": "DEFAULT",
- "mode": "DEFAULT"
}, - "author": "USER",
- "citations": [
- {
- "trackingToken": "string",
- "sourceDocument": {
- "id": "string",
- "datasource": "string",
- "connectorType": "API_CRAWL",
- "docType": "string",
- "content": {
- "fullTextList": [ ]
}, - "containerDocument": { },
- "parentDocument": { },
- "title": "string",
- "url": "string",
- "metadata": {
- "container": "container",
- "parentId": "JIRA_EN-1337",
- "createTime": "2000-01-23T04:56:07.000Z",
- "datasource": "datasource",
- "author": {
- "name": "name"
}, - "documentId": "documentId",
- "updateTime": "2000-01-23T04:56:07.000Z",
- "mimeType": "mimeType",
- "objectType": "Feature Request",
- "components": [
- "Backend",
- "Networking"
], - "status": [
- "Done"
], - "customData": {
- "someCustomField": "someCustomValue"
}
}, - "sections": [
- null
]
}, - "sourceFile": {
- "id": "FILE_1234",
- "url": "www.google.com",
- "name": "sample.pdf",
- "metadata": {
- "status": null,
- "uploadTime": null,
- "processedSize": null,
- "failureReason": null,
- "mimeType": null
}
}, - "sourcePerson": {
- "name": "George Clooney",
- "obfuscatedId": "abc123"
}, - "referenceRanges": [
- {
- "textRange": null,
- "snippets": [ ]
}
]
}
], - "uploadedFileIds": [
- "string"
], - "fragments": [
- {
- "structuredResults": [
- {
- "document": null,
- "person": null,
- "customer": null,
- "team": null,
- "customEntity": null,
- "answer": null,
- "extractedQnA": null,
- "app": null,
- "collection": null,
- "answerBoard": null,
- "code": null,
- "shortcut": null,
- "querySuggestions": null,
- "relatedDocuments": [ ],
- "relatedQuestion": null,
- "disambiguation": null,
- "snippets": [ ],
- "trackingToken": null,
- "prominence": null,
- "source": null
}
], - "trackingToken": "string",
- "text": "string",
- "querySuggestion": {
- "query": "app:github type:pull author:mortimer",
- "label": "Mortimer's PRs",
- "datasource": "github"
}, - "file": {
- "id": "FILE_1234",
- "url": "www.google.com",
- "name": "sample.pdf",
- "metadata": {
- "status": null,
- "uploadTime": null,
- "processedSize": null,
- "failureReason": null,
- "mimeType": null
}
}, - "action": {
- "metadata": {
- "type": null,
- "name": null,
- "displayName": null,
- "toolId": null,
- "displayDescription": null,
- "logoUrl": null,
- "objectName": null,
- "knowledgeType": null,
- "createdBy": null,
- "lastUpdatedBy": null,
- "createdAt": null,
- "lastUpdatedAt": null,
- "writeActionType": null,
- "auth": null,
- "permissions": null
}, - "parameters": {
- "property1": null,
- "property2": null
}
}
}
], - "ts": "string",
- "messageId": "string",
- "messageTrackingToken": "string",
- "messageType": "UPDATE",
- "hasMoreFragments": true
}
], - "chatId": "string",
- "followUpPrompts": [
- "string"
], - "backendTimeMillis": 1100,
- "chatSessionTrackingToken": "string"
}
}