Powering the Thinkwise Platform with AI 🤖

  • 11 May 2023
  • 6 replies
  • 952 views

Userlevel 6
Badge +3

Hi, everyone!

If you've been keeping a close eye on the news recently, you might have noticed that AI and Large Language Models (LLMs) such as ChatGPT are making big waves. They're popping up everywhere, becoming integral parts of countless processes and applications, and for a good reason. The potential of AI is immense, and here at Incentro, we're beyond excited to explore it!

In our journey to explore the power of AI, we've brainstormed countless ways to implement it within the Thinkwise platform. We've thought of various use cases, and today, we're excited to showcase one of them.

Introducing TW-GPT, an application that uses the power of AI to take the Software Factory to new heights. This application incorporates a standout feature - the ability to autonomously generate descriptions for different entities within the Software Factory that currently lack descriptions.

Control procedures and tables can sometimes be a mystery to those unfamiliar with them. They're crucial components of our Software Factory, but without descriptions, it can be challenging to understand their purpose or how they fit into the bigger picture. That's where TW-GPT comes in.

Let's take a sneak peek at how TW-GPT works:

Note: You'll notice that the part of generating descriptions is sped up. This is due to the use of the gpt-4 model which sadly, as of right now, is slower in generating output than the gpt-3.5-turbo model.

Control Procedures:


Tables:


And here's a look at the process flow:

We tried to make the process flow as generic as possible, as the idea is to expand this to all entities.

 

Now, you might be wondering, "Why do we need these descriptions? And why automate the process?"

Firstly, having clear, concise descriptions for control procedures and tables will tremendously help new colleagues or developers who are trying to understand the ins and outs of your application. It's like a welcome guide that says, "Hey, here's what you need to know!"

Secondly, by automating this process, we free our developers from the time-consuming task of writing and updating documentation. Instead, they can focus on what they do best - developing innovative solutions! The potential time saved and productivity gained make this feature an absolute game-changer.

Lastly, automated descriptions play a vital role in initiating the peer review process. By offering clear summaries of control procedures and tables right from the start, TW-GPT ensures a shared understanding among reviewers. This facilitates quicker, more constructive feedback, thus making TW-GPT an invaluable tool for streamlining the development cycle.

In conclusion, we believe that the integration of AI, particularly LLMs like ChatGPT, into the platform will significantly enhance the Thinkwise ecosystem. TW-GPT is just the beginning. It's a small taste of what's possible when we combine the power of AI with the versatility of the platform. And the most exciting part? This is just the start. So, stay tuned for more updates as we have a couple more use cases being worked on right now.

Don’t be afraid to share your ideas and thoughts on applying AI in Thinkwise and let's continue to innovate together! 

This post is generated by ChatGPT


This topic has been closed for comments

6 replies

Userlevel 7
Badge +5

That’s awesome, thanks for sharing!

Do you use the English translations for tables and columns to provide it with a clearer ‘ontological model’ or can it manage just fine with the ‘raw’ ids?

Userlevel 4
Badge +4

That’s awesome, thanks for sharing!

Do you use the English translations for tables and columns to provide it with a clearer ‘ontological model’ or can it manage just fine with the ‘raw’ ids?

We do not use any translations. We just use the table name (tab_id) and columns (col_id) and that’s giving us pretty concise and accurate descriptions. We’re planning on adding the data types and even the references to see if that results in an even better description

This is the prompt that’s used to generate the descriptions:

You are Datamodeller-GPT. A senior datamodeller who assists in creating brief  descriptions of tables you've been given in the following format: 

[table_name] = [column_name];[column_name] etc.

Use a maximum of 2 sentences. Do NOT list the columns.

 

Userlevel 1

How about generating unit tests? That's quite a bit more involved but especially for simple cases it should be doable already with smart prompting

Userlevel 6
Badge +3

How about generating unit tests? That's quite a bit more involved but especially for simple cases it should be doable already with smart prompting

 

That's an interesting use-case! I've actually generated some unit tests for some SQL code as a test. So, prompting wise it should be doable for sure.

With the new browsing functionality for GPT4+ you could give it the Thinkwise documentation for unit testing and let it generate unit tests based on those guidelines for example. 

We're actually curious to hear more use-cases from within the community and maybe even demo's? Let's inspire each other 🤩

Userlevel 3
Badge +11

Interesting. I have been experimenting (and will continue to do so) with ChatGPT to create SQL code. I think that especially in the low-code world ChatGPT or alike could be helpful with generating code. Right now it is possible to have ChatGPT create simple peaces of code.

 

When asking: create T-SQL code to list the items from the database mail for SQL Server 2019

It replies with an almost correct answer:

USE msdb;

-- List all sent items
SELECT sent_item_id,
recipients,
subject,
sent_status,
sent_date
FROM sysmail_sentitems;

-- List all unsent items
SELECT unsent_item_id,
recipients,
subject,
last_mod_date
FROM sysmail_unsentitems;

Correction is easy by replying: leave out the sent_item_id

 

For a more complex problem more input is required. In the example below I asked for:

Write a T-SQL procedure to export invoice-data from a table to an xml-file using UBL2.1 and Peppol. The invoice-data contains invoice_number, invoice_date and each invoice record has multiple child records containing the invoice lina - data.

The result is not what I need (see code below) but I think that in the near future ChatGPT or alike will be able to write procedures and functions that are quite complex. After this summer I will actually start a project to export invoices to UBL/Peppol standards, and I plan on using ChatGPT to do a part of the project as an experiment.

 

-- Create a stored procedure to export invoice data to XML
CREATE PROCEDURE ExportInvoiceDataToXML
AS
BEGIN
-- Declare variables
DECLARE @XML XML

-- Generate XML using UBL2.1 and Peppol standards
SET @XML = (
SELECT
invoice_number AS 'Invoice/ID',
invoice_date AS 'Invoice/IssueDate',
(
SELECT
invoice_line_number AS 'InvoiceLine/ID',
invoice_line_data AS 'InvoiceLine/Description'
FROM
YourInvoiceLineTable
WHERE
YourInvoiceLineTable.invoice_number = YourInvoiceTable.invoice_number
FOR XML PATH(''), TYPE
)
FROM
YourInvoiceTable
FOR XML PATH('Invoice'), ROOT('Invoices'), TYPE
)

-- Export XML to a file
DECLARE @FileName NVARCHAR(255) = 'C:\Path\To\Your\File.xml'
DECLARE @FileID INT
EXEC sp_xml_preparedocument @FileID OUTPUT, @XML

EXEC sp_xml_removedocument @FileID

PRINT 'Invoice data exported to XML file: ' + @FileName
END


 

Badge +1

I have tried two things.
(I don't have my exact prompts and the results at hand)

Automating the design of an application.
I asked something like: Give me the SQL to create a simple CRM database.
Result was surprisingly ​good. Nice set of tables, columns, relationships, datatypes etc.
This indicates that in the future we can leave designing the basics of an application to AI and we can focus on what has to be different for a specific customer.

Automatic legacy code conversion.
I asked something like: Convert this Oracle PL/SQL code to Microsoft T-SQL.
Result was very good, I could not improve it much.
If we would have permanent access to a fast AI API, with an unlimited number of calls and unlimited length of input, I would build this into our Upcycler tomorrow.

I also tried a more difficult one, Uniface code to Microsoft T-SQL.
This did gave a result, which in itself is already impressive.
But even with more elaborate prompting it was not very good/usable. The conceptual differences between the platform make a one-on-one code conversion pointless.
Although I have handled a Uniface customer that had thousands of routines with just business rules, using it on those routines alone would already be great.

Â