Back to blog
Articles
May 22, 2023
·
4 MIN READ

The Anatomy Of Large Language Model (LLM) Powered Conversational Applications

May 22, 2023
|
4 MIN READ

Latest content

Customer Stories
4 min read

How Infobip Generated 220+ Knowledge Articles with Gen AI For Smarter Self-Service and Better NPS

Partnering with HumanFirst, Infobip generated over 220 knowledge articles, unlocked 30% of their agents' time, and improved containment by a projected 15%.
September 16, 2024
Articles
7 min read

Non-Technical AI Adoption: The Value of & Path Towards Workforce-Wide AI

Reviewing the state of employee experimentation and organizational adoption, and exploring the shifts in thinking, tooling, and training required for workforce-wide AI.
September 12, 2024
Articles
6 min read

AI for CIOs: From One-Off Use to Company-Wide Value

A maturity model for three stages of AI adoption, including strategies for company leaders to progress to the next stage.
September 12, 2024
Tutorials
4 min read

Building Prompts for Generators in Dialogflow CX

How to get started with generative features.
August 15, 2024
Announcements
3 min read

HumanFirst and Infobip Announce a Partnership to Equip Enterprise Teams with Data + Generative AI

With a one-click integration to Conversations, Infobip’s contact center solution, HumanFirst helps enterprise teams leverage LLMs to analyze 100% of their customer data.
August 8, 2024
Tutorials
4 min read

Two Field-Tested Prompts for CX Teams

Get deeper insights from unstructured customer data with generative AI.
August 7, 2024
Tutorials
5 min read

Optimizing RAG with Knowledge Base Maintenance

How to find gaps between knowledge base content and real user questions.
April 23, 2024
Tutorials
4 min read

Scaling Quality Assurance with HumanFirst and Google Cloud

How to use HumanFirst with Vertex AI to test, improve, and trust agent performance.
March 14, 2024
Customer Stories
4 min read

How Infobip Generated 220+ Knowledge Articles with Gen AI For Smarter Self-Service and Better NPS

Partnering with HumanFirst, Infobip generated over 220 knowledge articles, unlocked 30% of their agents' time, and improved containment by a projected 15%.
September 16, 2024
Articles
7 min read

Non-Technical AI Adoption: The Value of & Path Towards Workforce-Wide AI

Reviewing the state of employee experimentation and organizational adoption, and exploring the shifts in thinking, tooling, and training required for workforce-wide AI.
September 12, 2024
Articles
6 min read

AI for CIOs: From One-Off Use to Company-Wide Value

A maturity model for three stages of AI adoption, including strategies for company leaders to progress to the next stage.
September 12, 2024

Let your data drive.

The Anatomy Of Large Language Model (LLM) Powered Conversational Applications

COBUS GREYLING
May 22, 2023
.
4 MIN READ

In order to ensure the successful deployment of any application built on LLM API calls, it is essential to generate true business value from it.

For successful scaling of applications powered by LLM, two key aspects should be considered (though more can be included).

Firstly, an effective collaborative development framework is needed.

Existing chatbot frameworks have successfully facilitated the collaboration of conversation designers and developers, allowing for a straightforward shift from design to development without any loss in translation.

The second important consideration is user experience (UX). It is essential that users receive a stellar experience; they are not interested in the underlying technology and merely want an enjoyable experience.

Thus, any investment made to access LLM's functionality must be translated into a outstanding UX.

Development Frameworks

Even though Large Language Models (LLMs) are deep learning systems based on internet-scale datasets, they have recently reached mainstream notoriety, thanks to their no-code natural language input method (prompt engineering).

With these generative systems forming the bedrock of an ever-increasing number of applications, the predictive capabilities of LLMs appear to be overlooked.

Possible reasons include that, in most cases, predictive requires more data and involves extensive preparation of the training data.

Additionally, the predictive process incorporates a pro-code portion.

For commercial NLU related applications, conventional NLU systems prove to be highly efficient and cost-effective in terms of their predictive capabilities on specifically trained data.

Having considered LangChain and Dust, there is a growing trend to leverage LLMs in the development of applications. Functionalities can be chained together to create augmented and “intelligent” API calls to access LLMs.  Agents allow for the creating of chains on the fly in an autonomous fashion.

A large language model app is a chain of one or multiple prompted calls to models or external services (such as APIs or data sources) in order to achieve a particular task. ~ Dust

Considering the image below, are the six components to creating a LLM application.

This routine can be encapsulated as a whole into LLM-based Agents.

Some Considerations:

  • With the emergence of LLM Applications and APIs, conversational interfaces using multiple applications/LLM-based APIs are being widely adopted.
  • These LLM Applications allow multiple calls to be linked/chained together in order to provide orchestration of a certain level.
  • Chaining blocks/prompts to create LLM Apps will not be sufficient to facilitate longer multi-turn conversations in an enterprise setting; for now.
  • These LLM Apps are more suitable for achieving a particular purpose or functioning as small chat utility tools.
  • For bigger implementations, a more thorough and extensive architecture is required. Nevertheless, LLM Apps can be seen as a good sign of how LLM interactions can be mechanised and how they can be used to add complexity to generative tasks.

Templating

The utilization of templates for prompt engineering has always been inevitable and necessary.

Templating generative prompts gives the capability to program prompts, store, and reuse them.

The Dust framework takes advantage of Tera templates, which is essentially represented as a text file.

However, these text files also have placeholders for variables and expressions that can be replaced with user-defined values at run-time.

To illustrate, we can observe the below example of a wedding thank you template created for one of the Dust example applications:

Blocks

Within Dust, blocks can be executed in sequence, or parallel, in the image below you see the basic functionality which is encapsulated within a block.

When adding a Block within the Dust workspace, a list of eight block types are surfaced to choose from.

Below you can see the different model providers for an app in Dust, and services available.

End User Applications

The image below illustrates the typical technology stack utilized for a LLM-based end user application.

The two crucial elements are the user experience, which is the graphic interface which allows the user to interface with the application and experience it intuitively, and the proprietary software which encapsulates the company's distinctive competitive advantage - what we can call the “secret sauce”

Examples of End User Applications include Filechat, which allows you to upload a document and then explore its contents using word embeddings in a conversational format.

Additionally, PromptLayer is the first platform built exclusively for prompt engineers.

Lastly, Humanloop, Promptable, and other companies provide similar services.

In Closing

Prompt Engineering based applications are growing (literally) by the day…but what interests me in specific are frameworks like LangChain & Dust (in an upcoming article I will dive into more detail on this) that is the first emergence of LLM based conversational development frameworks.

The basic principles these frameworks implement fascinate me and it will serve as the origins of the Conversational AI frameworks of the future.

I’m currently the Chief Evangelist @ HumanFirst. I explore & write about all things at the intersection of AI and language. Including NLU design, evaluation & optimisation. Data-centric prompt tuning & LLM observability, evaluation & fine-tuning.

Subscribe to HumanFirst Blog

Get the latest posts delivered right to your inbox