transcribe

How to Use Agentic AI: LLMs, AI Agents & Prompt Engineering in Action

IBM Technology · 6m · transcribed Jul 2026
More from IBM Technology Business
𝕏 Share ▶ YouTube 📥 PDF 🤖 .md

Section Insights

# 0:00

Introduction to Agentic Workflows

What should you do if a large LLM fails to solve a problem?

If the largest LLM available doesn't work for your problem, consider using an agentic workflow instead of relying on a single prompt.

  • Start with smaller LLMs and escalate if necessary.
  • An agentic workflow can help when a single prompt fails.
  • Real-world problems may require breaking down tasks into smaller steps.
# 1:15

Understanding the Problem

What was the specific task involving grocery order explanations?

The task involved ensuring that items not included in a grocery order had valid explanations provided by an employee.

  • Two key pieces of information were needed: missing items and employee notes.
  • Valid explanations are crucial for understanding why items were not included.
  • Edge cases can complicate the validation of explanations.
# 2:31

Implementing the Agentic Workflow

How can an agentic workflow be structured to solve the problem?

The agentic workflow consists of multiple prompts: extracting items, validating reasons, comparing outputs, and generating final text.

  • Breaking down the problem into specific tasks can lead to better results.
  • Different prompts serve different functions: extraction, classification, comparison, and generation.
  • Complex tasks may confuse a single LLM if not properly segmented.
# 3:47

Functionality of Each Prompt

What are the distinct functions of the prompts in the agentic workflow?

Each prompt in the workflow has a unique function: extraction, validation of reasons, comparison, and final output generation.

  • Understanding the purpose of each prompt helps in structuring effective workflows.
  • Different types of functions can be handled more efficiently when separated.
  • An agentic workflow can simplify complex tasks that a single prompt cannot handle.
# 5:03

Finalizing the Output

What does the final output of the agentic workflow look like?

The final output presents items without valid explanations in a clear format, highlighting which items need attention.

  • The final output should clearly indicate items lacking valid explanations.
  • Using multiple prompts can lead to a more accurate and organized result.
  • Agentic workflows are essential for tackling complex problems effectively.

Transcript

0:00 So, normally when I build a prompt using and using LLM, I usually start with a, a smaller LLM. And if I can't get that to work, I move to a slightly larger one. I can't get that to work, I move to a bigger one and a bigger one and a bigger one. But what happens if you've got, if you're using the biggest LLM you have available and you still can't get it to work? One option is to use an agentic workflow instead of a single prompt to a single LLM. This actually happened to me recently. I was working on a problem, and I was using the biggest, baddest LLM I had available to me, and I could not solve the problem with a single prompt. So what will, what we're going to do in this video is we're going to walk through that problem, and I'll show you how I shifted from a single LLM to an agentic workflow. So the problem was it seemed pretty straightforward at the beginning. I was given two pieces of information. The first piece of information was a list of items that were not included in the order.

1:04 So imagine you've submitted a grocery request to a grocery store, and an employee goes through and kind of does your shopping for you. So the first piece of items was, the first piece of information were the items that were not included in the order. The second piece of information were notes from the employee, and the employee, if he's not able to find an item, he's supposed to mention that in the notes.

1:42 So the request that was made of me was to look at the items in column B, the items that were not included in the order, and make sure that there was an explanation in column A. And if there was not an explanation, put that into a file like a text file that would look something like this. Cheese- No explanation. So I was able to get it to work for the most part, but I had, I had issues with edge cases. You know, for example, let's say that the explanation here for cheese is meh. Okay, that's really not a good reason not to get the cheese.

2:28 And because the reasons had to be valid in this column, sometimes I had trouble telling which reads, I could identify the reasons, but I couldn't really tell if they were valid or not. So again, because I wasn't able to solve this problem with a single prompt to the largest LLM, I moved to an agentic workflow. Here's what my agentic workflow basically looked like.

3:00 So I had the first prompt. I had one prompt that extracted items from B with an explanation. The second prompt took the information from the first prompt and determined whether or not those reasons were valid. The third prompt, and it probably didn't have to be a prompt, but you could use a prompt or an LLM to do it, is compare.

3:41 P2 output to B, to column B. And then, the fourth would be just to output the text. So again, maybe you do this in three prompts. Maybe maybe do it in four. Maybe these actually aren't prompts in an LLM. There's some other function, text function. that's really not the point here. The point is that I tried to do this with a single prompt, and I couldn't get it to work. This worked. And if you look at these prompts kind of individually, they're really doing different things. Like this first one, I would say it's more of an extraction function. It's extracting information from the text. This one is doing some, it's more of a classification. It's looking at the reasons and trying to determine whether or not that reason is valid or not. the third one, you're just doing a comparison. So I guess that's kind of a classification. And then the output of text, that's more of a generation. So we were trying to do. It didn't seem that way at first, but because we were trying to do all these different types of prompts or these types of functions inside the prompt, I think the, the original LLM trying to do this in one big bite was getting confused. So let's take this and go back to our original example to see how it would work in the, in the, in the workflow. So P1 here, you know would look at this information right here and extract something like this. Ham: Old Cheese: May.

5:24 The second prompt would look at this information right here and determine that, you know, meh is not a really a good reason not to fill an order. So it would be something like this. The third prompt would compare this to this, and we would end up with something that looked like this. Because again, cheese is the item in here without a valid explanation for not being filled. And then the fourth would basically be output this into the final format. So again, sometimes, the biggest baddest LLM is not going to do everything. And sometimes, you have to break the problem into several steps and use multiple LLMcalls, multiple prompts, or multiple functions to get to where you need to be. And doing that is called an agentic workflow.

Summary

The video discusses the use of an agentic workflow when a single large language model (LLM) fails to solve a complex problem. The speaker illustrates this approach through a grocery order example, where multiple prompts were necessary to extract, validate, and format information effectively.

- Start with smaller LLMs and scale up if necessary, but sometimes even the largest LLMs can't handle complex tasks.
- An agentic workflow involves breaking down a problem into smaller, manageable prompts or functions.
- The example involves two pieces of information: items not included in an order and employee notes.
- The initial prompt extracts items from the list, while subsequent prompts validate the reasons and compare them to the original list.
- Each prompt serves a distinct function: extraction, classification, comparison, and output generation.
- The complexity of the task can confuse a single LLM, necessitating a multi-step approach.
- This method allows for more precise handling of edge cases and ensures valid explanations for missing items.

Questions Answered

What should you do if a large LLM fails to solve a problem?

If the largest LLM available doesn't work for your problem, consider using an agentic workflow instead of relying on a single prompt.

What was the specific task involving grocery order explanations?

The task involved ensuring that items not included in a grocery order had valid explanations provided by an employee.

How can an agentic workflow be structured to solve the problem?

The agentic workflow consists of multiple prompts: extracting items, validating reasons, comparing outputs, and generating final text.

What are the distinct functions of the prompts in the agentic workflow?

Each prompt in the workflow has a unique function: extraction, validation of reasons, comparison, and final output generation.

What does the final output of the agentic workflow look like?

The final output presents items without valid explanations in a clear format, highlighting which items need attention.

© transcribe · For agents Built with care and craft by Gokul Rajaram