Build your self-training chatbot with Tiledesk

In this article we’ll examine how to enable your Tiledesk AI Agents with self train capabilities using the Tiledesk flow designer, the Tiledesk semantic engine (aka Knowledge base) and OpenAI/ChatGPT integrations.

Tiledesk, the Product

Within the field of no-code development platforms, this case study investigates the features of Tiledesk platform (https://tiledesk.com/) by showing the value it can generate to address the automation of business operations.

Tiledesk is an emerging prominent framework in the no-code development landscape, especially for creating LLM-enabled conversational applications. It is an open-source platform (with MIT license), thus promoting community contributions and offering flexibility for customization and installation on private cloud or data centers.

It is designed to empower business people and individuals that do not have any extensive coding skills to build complex chatbot functionalities, by providing them with a visual and block-based design approach.

As shown in Figure 1, Tiledesk has integrated LLMs like ChatGPT (Claude, Gemini and LLAMA coming by December 2024), to enhance chatbot responses and decision-making capabilities. This integration allows blocks within the chatbot flow to analyze user input and make decisions, thus enhancing the dynamism and intelligence of the entire conversational application.

Figure 1 – Integration of Tiledesk with LLMs with a OpenAI Action

AI Agents Design Studio

Tiledesk is equipped with a proper flow-design studio for AI Agents (aka chatbots) that enables a visual and no-code design of AI applications, thus ensuring a wide range of accessibility and customization options. The platform aims to simplify the development of conversational apps by enabling a next-gen drag-and-drop developer interface for connecting logical blocks, including those powered by AI, to design complex conversational flows without writing any lines of coding.

Tiledesk offers user-friendly interfaces and pre-built functionalities that empower users to deploy AI models and develop chatbot applications, thus eliminating the need for in-depth knowledge of complex algorithms and integration of complex technological architectures. Additionally, the cloud-based nature of this platform removes concerns regarding installation, maintenance, and management, significantly simplifying the overall chatbot development process (on-prem installation always available because of the open-source distribution).

The application development process proposed by Tiledesk consists in assembling pre-built AI components that are visualized as modular blocks. These blocks are chained together in a user-defined sequence, with specific flow’s attributes are defined for each of them for input or output that serves as the input for the successive block. Once the AI Agent (aka chatbot) application is deployed, it can be accessed through a conversational interface, such as Whatsapp or a native Web Widget (or trhough APIs). This triggers the execution of the defined workflow, where each block performs its designated function according to the user’s design.

This methodological approach realizes a paradigm shift in application development since it eliminates the need for traditional programming languages, by offering an intuitive and potentially more accessible method for building applications. This approach ushers in a new era of conversational applications, where user interaction and application functionalities are seamlessly integrated within a conversational interface.

A simple use case (self-training chatbot)

Just think of the following use case: a company would like to create a new application with a couple of requirements:

Requirement 1: Getting suggestions from employes to enrich the description of existing products and AI-analyzing them for approval (skipping a human-approval phase) to enrich the Products’s documentation. Once approved the employe suggestions are put in a Knowledge Base (KB) repository, thus enriching the Company’s knowledge base.

Requirement 2: On the other hand, the same (Conversational) application will provide the opportunity to search for specific products features among the ones uploaded and certified using natural language LLM approval step from Requirement 1. The reply must be human-like, exactly if it is generated by a human.

Instead of developing a classical web or mobile application we’ll opt for a conversational application (aka chatbot or AI Agent).

Advantages of the approach:

  1. Initial Knowledge is provided by Company’s official products documentation (pdf and website). This will provide initial replies to eployes questions regarding products features
  2. Each employe can contribute to the Company’s Knowledge base, providing new information over time that will boost the KB capability to always be up-to-date
  3. The approval step is LLM-powered, accelerating the admission of new contents that will be immediately available for the Information Retrieval engine
  4. New updated documentation can be generated for the official documentation, directly generated by employes

Let’s design our AI Agent!

Requirement 1: upload and approve new product suggestions

While – during a conversation – it’s easy to automate a task to upload a new suggestion and put it into the company’s KB, it’s generally a human-task to analyze and approve a new content. Why not delegate this task to AI? With Tiledesk Visual Flow Designer it’s possible to create an OpenAI task to “approve” new CVs in two minutes (the time to write an LLM “approval” prompt). The flowchart below shows how to setup a ChatGPT action approval block:

A “GPT Task” action block is embedded in the flow. It receives the uploaded user suggestion and analyzes it through a specific prompt for OpenAI:

Check if the user content is a consistent text to upgrade a Knowledge base. It should talk about one of the following arguments:
Engineering tools for manufacturing, some examples:
Tube Tools
Tube & Pipe Cleaners
Tube Installation
Tube Testers
Tube Plugs
Tube Removal
Header Plugs
Nutrunners
[a lot more...and...]
If the content is consistent reply "yes" otherwise reply "no".
User content to check: {{content}}

ChatGPT receives the suggestion and replies after analyzing it accordingly to the prompt. The output (yes or no) will be used to move on in the flow accordingly.

With a simple “drag and drop” operation and the right “prompt” configuration Tiledesk just replaced a human task with an automated one. And the task is executed in real-time. The flow in action is represented below:

Validating content…

Content validated!

The next step is adding and semantic-indexing the content to be searched in the future. We used Tiledesk APIs (invoked using the Web Request Action) to feed the Information Retrieval engine (aka Knowledge base) with our colleague’s suggestion. We can move to the Knowledge Base module to see the content we added during the conversation.

Knowledge base

When you deal with contents you need an Information Retrival engine. Tiledesk comes with a fully-featured one, named Knowledge base (KB). This engine provides a beautiful UI that provides easyness in managing company contents. You can add your own pdf, docx, txt contents as well as the entire sitemap of your website (and reindex it as well on regular intervals). The Knowledge base will take care of correctly chunking contents, indexing them using our ibrid semantic-fulltext search engine and providing a special Designer Action (aka Ask Knowledge base action) for querying information in your action flows. But this time the User suggestion arrived through APIs directly from the flow. After the approval we put a Web Request action in the flow able to automatically update the KB with the just approved user suggestion using the Knowledge base REST APIs.

After uploading the content will be processed by the information retrieval engine. The main advantage of having the Integrated Knowledge base is that you can maintain all the users’ suggestions directly from the provided UI. Effectively with found out our suggestion in the corresponding KB designed to host our suggestions, as you can see in the following picture:

Tiledesk Knowledge base engine is based on the RAG paradigm, or Retrieval-Augmented Generation. RAG is a sophisticated process that enriches the inputs to a Large Language Model (LLM) like ChatGPT with additional information, typically by accessing a knowledge base. This approach allows RAG chatbots to use the advanced linguistic understanding of models like ChatGPT while extending their knowledge infinitely. Essentially, RAG chatbots act as a bridge between retrieval-based models, which search databases for the most relevant answers, and generative models, which dynamically create responses. This blend offers three main advantages: the use of advanced language understanding without needing to train an LLM from scratch, the expansion of the chatbot’s knowledge base, and making content searches interactive and intuitive​​.

Requirement 2: search for a product feature using natural language

For this task we will use our Information retrieval engine, the Tiledesk Knowledge base engine.

During the approval task we submitted the approved suggestion to a special engine that indexed the contents through the RAG indexing engine.

Now that our contents are indexed – without engaging in any coding skill – we can simply drag and drop on the stage a Ask the Knowledge Base action. It’s a special action able to query previously indexed contents using our Vector data store and OpenAI, mixing the two to find the content and generating an appropriate human-like reply for the end user:

A lot of logic is involved in this task, but thanks to a Visual Designer this automation is really accessible to anyone with no coding skill with a single drag & drop action. Let’s look at this in action!

Wow. As we can see the RAG chatbot is able to correctly understand the human query replying in a human-like way. The total Time-To-Market (TTM) of this application was about 2 hours. Zero “coding” was involved.

Conclusions

A visual approach to AI-application composition boosted the application development together with the choice to develop a conversational application rather than a traditional UI-based application.

In the next future, Tiledesk plans to extend its capabilities beyond customer service applications to more general business use cases, leveraging LLMs technologies to automate repetitive tasks and streamline AI-powered business processes. The goal is to create conversational apps that can perform complex tasks, like data analysis, reporting, image and document processing, through simple dialogues and without the need for traditional coding or app development processes.

Andrea
Andrea
Tiledesk founder. Coding chatbots as hobby. Working with my team to create the best Conversational Apps Development Platform - aka Tiledesk

Leave a Reply

Discover more from Tiledesk

Subscribe now to keep reading and get access to the full archive.

Continue reading