AI Knowledge Base Chat Connector: Functionality and Operation
The AI Knowledge Base Chat Connector generates AI-supported responses to user prompts and uses previously stored data to answer them.
Properties
| Defines the operation executed by the adapter. Possible values:
|
Parameters
| Main adapter class (do not change!) Possible values: de.softproject.integration.nativeadapter.NativeAdapter: Main class (Default) |
| The virtual repository of the adapter project. Possible values:
|
| Used protocol (HTTP oder HTTPS) Possible values:
|
| Name of AI gateway host Possible values: Any valid character string without protocol specification (e.g. |
| (optional) Number of AI gateway port Possible values: Any integer (e.g. |
| Is required to establish a Keycloak connection. Possible values: unique access token The access token needs to be generated in Keycloak. |
| Configuration key for the chat service. The key originates from a valid X4AI configuration in the system. Possible values: Any string Examples:
|
| List of data records used for the response, comma-separated. Possible values: Any character string for existing data records in the system, comma-separated. Example:
|
| Initial context or background information for the LLM (Large Language Model). There are two options:
Possible values (Examples) for a statement with the variables
Possible value when using a text file:
Example:
Example contents of the text file:
|
| Outputs information during execution, such as token consumption. |
Status values
| The operation was executed successfully. |
| The operation was executed successfully, but without result. |
| The operation failed due to a technical error. |
Input
The adapter expects an XML document with the following structure as input.
<x4ai_adapter>
<prompt>your prompt</prompt>
</x4ai_adapter>
The following elements are included in the input:
Element | Description |
|---|---|
| Enclosing element for the |
| Prompt or question, i.e. instruction to the AI |
Output
The adapter generates a XML document as output:
<output>
<original_prompt>customer’s question</original_prompt>
<response>AI Response</response>
<sources>
<metadata>
<id>uuid</id>
<source>document name</source>
<page>page</page>
<source_url>url</source_url>
<version>document version</version>
<similarity_score>number between (0; 1)</similarity_score>
</metadata>
<metadata>
<id></id>
<source>X4BPMS_731_ESB_EN</source>
<page>588</page>
<source_url>http://download.softproject.de/x4bpms/7-3-1/X4BPMS_731_ESB_EN.pdf#page=588</source_url>
<version>7.3.1</version>
<similarity_score>0.16465315713444784</similarity_score>
</metadata>
</sources>
<callback_log>
<total_tokens>30</total_tokens>
<completion_tokens>13</completion_tokens>
<prompt_tokens>17</prompt_tokens>
<total_cost_usd>0.01327</total_cost_usd>
<successful_requests>1</successful_requests>
</callback_log>
</output>
The following elements are included in the output:
Element | Description |
|---|---|
| Root element for the operation |
| Original question to the AI |
| AI answer |
| Enclosing element for the element |
| Meta data of document with the elements:
|
| Returns the token consumption during execution. Contains the elements:
|