My Account Log in

1 option

Building AI Applications with Microsoft Semantic Kernel : Easily Integrate Generative AI Capabilities and Copilot Experiences into Your Applications.

Ebook Central Academic Complete Available online

View online
Format:
Book
Author/Creator:
Meyer, Lucas A.
Language:
English
Subjects (All):
Artificial intelligence.
Open source software.
Physical Description:
1 online resource (252 pages)
Edition:
1st ed.
Place of Publication:
Birmingham : Packt Publishing, Limited, 2024.
Biography/History:
Meyer Lucas A. : Lucas A. Meyer is a Computer Scientist and Financial Economist with over two decades of experience in technology. Lucas joined Microsoft in 2002 to work with databases in Finance, joined Amazon in 2020 to work with fraud detection and prevention, and returned to Microsoft in 2022 as a Principal Research Scientist in the Microsoft's AI for Good Lab, where he works with Large Language Models (LLMs) and the Microsoft Semantic Kernel daily. Lucas' first NLP project, released in 2016, was a chatbot that streamlined several corporate finance operations and won the Adam Smith Award from London's Treasury Today. Lucas has an MBA and an M. Sc. in Finance from the University of Washington in Seattle.
Summary:
Unlock the power of GenAI by effortlessly linking your C# and Python apps with cutting-edge models, orchestrating diverse AI services with finesse, and crafting bespoke applications through immersive, real-world examplesKey FeaturesLink your C# and Python applications with the latest AI models from OpenAICombine and orchestrate different AI services such as text and image generatorsCreate your own AI apps with real-world use case examples that show you how to use basic generative AI, create images, process documents, use a vector databasePurchase of the print or Kindle book includes a free PDF eBookBook DescriptionIn the fast-paced world of AI, developers are constantly seeking efficient ways to integrate AI capabilities into their apps. Microsoft Semantic Kernel simplifies this process by using the GenAI features from Microsoft and OpenAI. Written by Lucas A. Meyer, a Principal Research Scientist in Microsoft’s AI for Good Lab, this book helps you get hands on with Semantic Kernel. It begins by introducing you to different generative AI services such as GPT-3.5 and GPT-4, demonstrating their integration with Semantic Kernel. You’ll then learn to craft prompt templates for reuse across various AI services and variables. Next, you’ll learn how to add functionality to Semantic Kernel by creating your own plugins. The second part of the book shows you how to combine multiple plugins to execute complex actions, and how to let Semantic Kernel use its own AI to solve complex problems by calling plugins, including the ones made by you. The book concludes by teaching you how to use vector databases to expand the memory of your AI services and how to help AI remember the context of earlier requests. You’ll also be guided through several real-world examples of applications, such as RAG and custom GPT agents. By the end of this book, you'll have gained the knowledge you need to start using Semantic Kernel to add AI capabilities to your applications.What you will learnWrite reusable AI prompts and connect to different AI providersCreate new plugins that extend the capabilities of AI servicesUnderstand how to combine multiple plugins to execute complex actionsOrchestrate multiple AI services to accomplish a taskLeverage the powerful planner to automatically create appropriate AI callsUse vector databases as additional memory for your AI tasksDeploy your application to ChatGPT, making it available to hundreds of millions of usersWho this book is forThis book is for beginner-level to experienced .NET or Python software developers who want to quickly incorporate the latest AI technologies into their applications, without having to learn the details of every new AI service. Product managers with some development experience will find this book helpful while creating proof-of-concept applications. This book requires working knowledge of programming basics.
Contents:
Cover
Title Page
Copyright and Credits
Contributors
Table of Contents
Preface
Part 1: Introduction to Generative AI and Microsoft Semantic Kernel
Chapter 1: Introducing Microsoft Semantic Kernel
Technical requirements
Obtaining an OpenAI API key
Obtaining an Azure OpenAI API key
Generative AI and how to use it
Text generation models
Understanding the difference between applications and models
Generating text using consumer applications
Generating images
Microsoft Semantic Kernel
Installing the Microsoft Semantic Kernel package
Using Semantic Kernel to connect to AI services
Connecting to OpenAI Services using Python
Connecting to OpenAI services using C#
Running a simple prompt
Running a simple prompt in Python
Running a simple prompt in C#
Using generative AI to solve simple problems
Creating semantic functions
Creating native functions
Plugins
The config.json file for the knock-knock joke function
The skprompt.txt file for the knock-knock joke function
The config.json file for the semantic function that explains jokes
The skprompt.txt file for the explain joke function
Loading the plugin from a directory into the kernel
Using a planner to run a multistep task
Calling the Function Calling Stepwise planner with Python
Summary
References
Chapter 2: Creating Better Prompts
A simple plugin template
The skprompt.txt file
The config.json file
Calling the plugin from Python
Calling the plugin from C#
Results
Improving the prompt to get better results
Revising the skprompt.txt file
The result
Prompts with multiple variables
Requesting a complex itinerary with Python
Requesting a complex itinerary with C#
The result of the complex itinerary
Issues when answering math problems.
Multistage prompts
CoT - "Let's think step by step"
Implementing CoT with Python
Implementing CoT with C#
Results for CoT
An ensemble of answers
Part 2: Creating AI Applications with Semantic Kernel
Chapter 3: Extending Semantic Kernel
Getting to know the core plugins
An example - Using the TimePlugin
Introducing the application - Validating grants
Directory structure of our application
Developing native plugins
The directory structure of our plugins
Checking the structure of our Excel spreadsheet
Adding additional checks
Evaluating the Word document
Developing semantic plugins
Evaluating the grant proposal with a semantic plugin
Chapter 4: Performing Complex Actions by Chaining Functions
Creating a native plugin that generates images
Writing a DALL-E 3 wrapper in Python
Writing a DALL-E 3 wrapper in C#
Using multiple steps to solve a problem
Generating an image from a clue
Chaining semantic and native functions with C#
Chaining semantic and native functions with Python
Dealing with larger, more complex chains
Preparing our directory structure
Understanding the flow of our process
Creating the native function to process a folder
Modifying the Excel native plugin
Modifying the Word native plugin
Modifying the semantic functions
Creating and calling the pipeline
Chapter 5: Programming with Planners
What is a planner?
When to use a planner
Instantiating a planner
Creating and running a plan
An example of how a planner can help
How do planners work?
Controlling home automation with the planner
Creating the native functions
Adding a semantic function to suggest movies.
Invoking the planner
Chapter 6: Adding Memories to Your AI Application
Defining memory and embeddings
How does semantic memory work?
Embeddings in action
Using memory within chats and LLMs
Using memory with Microsoft Semantic Kernel
Using memory in chats
Reducing history size with summarization
Part 3: Real-World Use Cases
Chapter 7: Real-World Use Case - Retrieval-Augmented Generation
Why would you need to customize GPT models?
Retrieval-augmented generation
Creating an index
Uploading documents to the index
Using the index to find academic articles
Using RAG to create a summary of several articles on a topic
Chapter 8: Real-World Use Case - Making Your Application Available on ChatGPT
Custom GPT agents
Creating a custom GPT
Creating a custom GPT that supports actions
Creating a web API wrapper for the native function
Deploying your application to an Azure Web App
Connecting the custom GPT with your custom GPT action
Index
Other Books You May Enjoy.
Notes:
Description based on publisher supplied metadata and other sources.
Other Format:
Print version: Meyer, Lucas A. Building AI Applications with Microsoft Semantic Kernel
ISBN:
9781835469590
OCLC:
1439005024

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account