Back to blog
Articles
Articles
August 21, 2023
·
3 min read

Iterative Prompting Pre-Trained Large Language Models

August 21, 2023
|
3 min read

Latest content

Customer Stories
4min read

Lightspeed Uses HumanFirst for In-House AI Enablement

Meet Caroline, an analyst-turned-AI-expert who replaced manual QA, saved countless managerial hours, and built new solutions for customer support.
December 10, 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
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
Customer Stories
4min read

Lightspeed Uses HumanFirst for In-House AI Enablement

Meet Caroline, an analyst-turned-AI-expert who replaced manual QA, saved countless managerial hours, and built new solutions for customer support.
December 10, 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

Let your data drive.

Articles

Iterative Prompting Pre-Trained Large Language Models

COBUS GREYLING
August 21, 2023
.
3 min read

As opposed to model fine-tuning, prompt engineering is a lightweight approach to fine-tuning by ensuring the prompt holds contextual information via an iterative process.

As I always say, the complexity of any implementation needs to be accommodated somewhere.

In the case of LLMs, the model can be fine-tuned, or advanced prompting can be used in an autonomous agent or via prompt-chaining.

In the last two examples mentioned, the complexity is absorbed in prompt engineering and not via LLM fine-tuning.

The objective of contextual iterative prompting is to absorb the complexity demanded by a specific implementation; and not offload any model fine-tuning to the LLM.

Contextual iterative prompting is not a new approach, what this paper considers is the creation and automation of an iterative Context-Aware Prompter.

At each step (each dialog turn) the Prompter learns to process the query and previously gathered evidence, and composes a prompt which steers the LLM to recall the next piece of knowledge.

This process reminds of soft prompts and prompt tuning.

The paper claims that their proposed Context-Aware Prompter Designoutperforms existing prompting methods by notable margins.

The approach shepherds the LLM to recall a series of stored knowledge (e.g., C1 and C2) that is required for the multi-step inference (e.g., answering Q), analogous to how humans develop a “chain of thought” for complex decision making.

Source

The automated process establishes a contextual chain-of-thought and negates the generation of irrelevant facts and hallucination with dynamically synthesised prompts based on the current step context.

The paper does confirm the now accepted approach to prompting which include:

  1. Prompts need to be contextual, including previous conversation context and dialog turns.
  2. Some kind of automation will have to be implemented to collate, and in some instances summarise previous dialog turns to be included in the prompt.
  3. Supplementary data, acting as a contextual reference for the LLM, needs to be selected, curated and truncated to an efficient length for each prompt at inference.
  4. The prompt needs to be formed in such a way, not to increase inference time.

I’m currently the Chief Evangelist @ HumanFirst. I explore & write about all things at the intersection of AI & language; ranging from LLMs, Chatbots, Voicebots, Development Frameworks, Data-Centric latent spaces & more.

Subscribe to HumanFirst Blog

Get the latest posts delivered right to your inbox