Witty Autocomplete Agent
Witty Autocomplete Agent is an AI agent that helps users to fill Data Contract schemas faster. It leverages the Witty Autocomplete Agent microservice which, by contacting an LLM provider of your choice, generates fields suggestions.
Prerequisites
- Witty Autocomplete Agent microservice must be up & running and reachable from Witboost Core.
Configuring the agent
In your app-config
add these lines:
witty:
scaffolder:
smartSuggestions:
baseUrl: <base URL where Witty Autocomplete Agent is running>
apiKey: <(optional) api key>
enabled: true
This will tell Witboost Core where to send autocomplete requests coming from enabled templates.
Setting up a Witty template
Witty Autocomplete is available both for Creation and Edit templates kinds. However, as of now, you can only enable Witty for tables and its inner rows.
Now, let's take this template as a reference:
apiVersion: witboost.com/v1
kind: EditTemplate
metadata:
name: edit-template
title: Edit Template
description: Edit Template
spec:
owner: agile_lab
useCaseTemplateId:
- urn:dmb:utm:my-template:0.0.0
parameters:
- title: Data Contract Schema
properties:
schema:
title: Schema
description: Data Contract Schema
type: array
ui:ArrayFieldTemplate: ArrayTableTemplate
default: []
items:
type: object
ui:ObjectFieldTemplate: TableRowTemplate
required:
- name
- dataType
properties:
name:
type: string
title: Name
surname:
type: string
title: Surname
# ... other template stuff ...
To enable Witty on this template table, we will modify the schema
property, which is an ArrayTableTemplate
, and set it to be a WittyTableTemplate
as follows:
apiVersion: witboost.com/v1
kind: EditTemplate
metadata:
name: edit-template
title: Edit Template
description: Edit Template
spec:
owner: agile_lab
useCaseTemplateId:
- urn:dmb:utm:my-template:0.0.0
parameters:
- title: Data Contract Schema
properties:
schema:
title: Schema
description: Data Contract Schema
type: array
ui:ArrayFieldTemplate: WittyTableTemplate
default: []
items:
type: object
ui:ObjectFieldTemplate: TableRowTemplate
required:
- name
- dataType
properties:
name:
type: string
title: Name
surname:
type: string
title: Surname
# ... other template stuff ...
But we are not done yet! We have just enabled Witty on this table. Now, we need to decide which are the fields to be autocompletable by the agent.
To do so, let's define both name and surname as Witty-enabled fields:
schema:
title: Schema
description: Data Contract Schema
type: array
ui:ArrayFieldTemplate: WittyTableTemplate
default: []
items:
type: object
ui:ObjectFieldTemplate: TableRowTemplate
required:
- name
- dataType
properties:
name:
type: string
title: Name
ui:field: WittyTextPicker
surname:
type: string
title: Surname
ui:field: WittyTextPicker
That's it! Now both Name and Surname fields will be adorned by the Witty Autocomplete button. Moreover, the Witty Table autocomplete button will show up.
Witty Enabled Fields
To check the list of available witty-enabled fields, look into the Pickers section of the docs.
Advanced settings
You can supply some additional settings to a Witty table. To do so, you can add properties into the WittyTableTemplate
. Here you have a list of available properties:
apiVersion: witboost.com/v1
kind: EditTemplate
metadata:
name: edit-template
title: Edit Template
description: Edit Template
spec:
owner: agile_lab
useCaseTemplateId:
- urn:dmb:utm:my-template:0.0.0
parameters:
- title: Data Contract Schema
properties:
schema:
title: Schema
description: Data Contract Schema
type: array
witty:
maxRowsPerChunk: 30 # tells witty how many rows at most to attach into each request towards the Witty service
context: # a list of strings that can be attached into the request to give additional context to the underlying LLM model
- each row of this table is a set of metadata about columns of a dataset.
- each metadata row follows the open metadata specification
ui:ArrayFieldTemplate: WittyTableTemplate
default: []
items:
# ... other template stuff ...
Supported models
The Witty Autocomplete Agent microservice has been tested against the following models/providers:
LLM Provider | Model |
---|---|
Azure OpenAI | gpt-4o |
Google Gemini AI | gemini-2.0-flash |
Below you can check how to configure your LLM provider on the Witty Autocomplete Agent side.
- Azure OpenAI
- Google GeminiAI
generator:
kind: AzureOpenAIChatGenerator
parameters:
azure_endpoint: https://<your azure endpoint>.cognitiveservices.azure.com
azure_deployment: gpt-4o
generation_kwargs:
temperature: 0
You can find some more configuration properties here
generator:
kind: GoogleAIGeminiChatGenerator
parameters:
model: gemini-2.0-flash
generation_config:
response_mime_type: application/json
temperature: 0
You can find some more configuration properties here