# Knowledge AI NLP

{% hint style="info" %}
**API SUBPATH**: eva-al-nlp
{% endhint %}

## POST /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/v2/conversations/cockpit

> Predicts cockpit data based on provided parameters.

```json
{"openapi":"3.0.1","info":{"title":"eva-al-nlp API Documentation","version":"4.8.0"},"tags":[{"name":"KAI Prediction","description":"Controller responsible for performing prediction on documents and question"}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/v2/conversations/cockpit":{"post":{"tags":["KAI Prediction"],"summary":"Predicts cockpit data based on provided parameters.","operationId":"predictCockpit","parameters":[{"name":"orgUUID","in":"path","description":"The UUID of the organization.","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"The UUID of the environment.","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"The UUID of the bot.","required":true,"schema":{"type":"string"}},{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CockpitPredictRequestDTO"}}},"required":true},"responses":{"200":{"description":"Ok","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CognitiveResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"CockpitPredictRequestDTO":{"required":["collectionUUID","examples"],"type":"object","properties":{"collectionUUID":{"type":"string","description":"Unique identifier for the collection."}},"description":"Data transfer object for Cockpit Predict V2 requests."},"CognitiveResponseDTO":{"type":"object","properties":{"answer":{"type":"string"},"documentId":{"type":"string"},"documentEnabled":{"type":"boolean"},"filename":{"type":"string"},"type":{"type":"string"},"storageFilename":{"type":"string"},"answers":{"type":"array","items":{"$ref":"#/components/schemas/CognitiveResponseAnswerDTO"}}}},"CognitiveResponseAnswerDTO":{"type":"object","properties":{"content":{"type":"string"},"score":{"type":"number","format":"double"},"storageFilename":{"type":"string"},"collectionUUID":{"type":"string"}}},"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```

## POST /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/conversations/cockpit

> Performs a prediction with a given String. The return value will\
> be a key with an answer to be delivered, along with it's associated\
> document and textual position.<br>

```json
{"openapi":"3.0.1","info":{"title":"eva-al-nlp API Documentation","version":"4.8.0"},"tags":[{"name":"KAI Prediction","description":"Controller responsible for performing prediction on documents and question"}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/conversations/cockpit":{"post":{"tags":["KAI Prediction"],"summary":"Performs a prediction with a given String. The return value will\nbe a key with an answer to be delivered, along with it's associated\ndocument and textual position.\n","operationId":"predictCockpit_1","parameters":[{"name":"orgUUID","in":"path","description":"A valid organization Uuid","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"A valid environment Uuid","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"A valid bot Uuid","required":true,"schema":{"type":"string"}},{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CockpitPredictExamplesRequestDTO"}}}},"required":true},"responses":{"200":{"description":"Ok","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CognitiveResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}},"deprecated":true}}},"components":{"schemas":{"CockpitPredictExamplesRequestDTO":{"type":"object","properties":{"name":{"type":"string","description":"Question variable"}},"description":"Object that contains the data needed to perform the prediction from the Cockpit"},"CognitiveResponseDTO":{"type":"object","properties":{"answer":{"type":"string"},"documentId":{"type":"string"},"documentEnabled":{"type":"boolean"},"filename":{"type":"string"},"type":{"type":"string"},"storageFilename":{"type":"string"},"answers":{"type":"array","items":{"$ref":"#/components/schemas/CognitiveResponseAnswerDTO"}}}},"CognitiveResponseAnswerDTO":{"type":"object","properties":{"content":{"type":"string"},"score":{"type":"number","format":"double"},"storageFilename":{"type":"string"},"collectionUUID":{"type":"string"}}},"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.conversational-ai.syntphony.com/user-guide/api-docs/api-guidelines/management-api/instance-api/knowledge-ai-nlp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
