4 Empowering agents with actions

 

This chapter covers

  • How an agent acts outside itself using actions
  • How to define and use OpenAI functions
  • The Semantic Kernel and how to use semantic functions
  • How to synergize semantic and native functions
  • How to instantiate a GPT Interface with Semantic Kernel

In the last chapter, we explored how to use Prompt Flow to evaluate and ground agent personas and profiles. This chapter examines Agent actions to see what they are, why they are needed, and how to use them. We will start by looking at OpenAI function calling and then quickly move on to another project from Microsoft called Semantic Kernel (SK), where we will use it to build and manage skills and functions for agents or as agents.

We will finish the chapter using Semantic Kernel to host our first agent system. This will be a whole chapter with plenty of annotated code examples. In the next section, we introduce agent actions and identify and define them.

4.1 Defining agent actions

ChatGPT plugins were first introduced to provide a session with abilities, skills, or tools. You can search the web or create spreadsheets or graphs with a plugin. Plugins provide ChatGPT with the means to extend the platform.

4.2 Executing OpenAI functions

 
 
 

4.2.1 Adding functions to LLM API calls

 
 
 
 

4.2.2 Actioning function calls

 
 
 

4.3 Introducing Semantic Kernel

 
 
 
 

4.3.1 Getting started with Semantic Kernel semantic functions

 

4.3.2 Semantic functions and context variables

 
 
 

4.4 Synergizing semantic and native functions

 

4.4.1 Creating and registering a semantic skill/plugin

 
 
 
 

4.4.2 Applying native functions

 
 
 
 

4.4.3 Embedding native functions within semantic functions

 
 
 

4.5 Semantic Kernel as an interactive service agent

 
 
 

4.5.1 Building a semantic GPT interface

 
 
 
 

4.5.2 Testing semantic services

 
 
 
 

4.5.3 Interactive chat with Semantic Service Layer

 
 
 
 

4.6 Thinking semantically when writing semantic services

 
 
 

4.7 Exercises

 
 
 

4.8 Summary

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest