Skip to main content

LLM Engine API

note

Read this page in wide view mode from here

LLM Engine API (0.1)

LLM Engine is a service responsible to manage requests from the Witboost Computational Governance to validate resources using natural language text to sent to the LLMs.

Register a LLM Engine

Once you set up the parameters necessary to connect to the APIs of an LLM, when you create a policy in Witboost, you can select the LLM Engine to use for the evaluation.

When you select LLM Engine, you will be able to provide the prompt written in natural language which provides the instructions to the LLM for the evaluation of the resource.

LlmEngine

Evaluate a resource

Computes a result based on the input resource. The result will be a policy result.

Request Body schema: application/json
required

An object containing the resource to evaluate using this executor

content
required
string

The content of the resource to be evaluated. The content can be any type of data, such as a JSON object, a string, a number, etc but always in its string representation. e.g. For a system resource, the content will be a stringified YAML descriptor.

policy
required
string

Policy written in natural language which will be applied by the LLM to the content of the resource.

resourceId
required
string

A unique Resource Identifier inside the Witboost platform.

resourceType
required
string

Resource type that is being sent in the content. This has to be agreed between the LLM Engine implementation and the platform's registered resource types.

Responses

Request samples

Content type
application/json
{
  • "content": "apiVersion: v1\nkind: dataproduct\ndomain: marketing\nmetadata:\n name: my-dataproduct\n namespace: my-namespace\n labels:\n app: my-app",
  • "policy": "The data product domain must be defined as finance.",
  • "resourceType": "dataproduct",
  • "resourceId": 123456
}

Response samples

Content type
application/json
{
  • "satisfiesPolicy": false,
  • "errors": [
    ],
  • "details": {
    }
}