Better Together: .NET Aspire and Semantic Kernel

Better Together: .NET Aspire and Semantic Kernel

Brief Summary

This video explores how .NET Aspire and Semantic Kernel can be used together to add AI features to applications, using an e-commerce customer support system as an example. It covers practical applications like semantic search, automated ticket summarization, and AI-powered Q&A chatbots. The video also introduces Semantic Kernel's new agent framework for managing complex AI interactions and multi-agent systems.

  • AI can significantly enhance productivity in conventional business applications.
  • Aspire and Semantic Kernel simplify the integration of AI features into .NET applications.
  • Evaluation systems are crucial for measuring and improving the quality of AI-driven functionalities.

Introduction: AI in Business Applications

The video begins by addressing the relevance of AI in typical business applications, particularly in enhancing productivity and user experience. It uses the example of an e-commerce site with a customer support system to illustrate various AI applications. These include upgrading search functionality to semantic search, automatically generating ticket titles, classifying ticket types, and estimating customer satisfaction. Additionally, AI can be used to summarize conversations, provide Q&A chat assistance, and suggest phrases for responses.

Practical Implementation with Aspire and Semantic Kernel

The presenter demonstrates how Aspire and Semantic Kernel can be used to implement AI features in a .NET application. The demonstration includes an Aspire application with a backend and web UIs for both customers and staff. The focus is on generating summaries for support tickets using Semantic Kernel's IChatCompletionService. This service abstracts different AI service implementations, allowing developers to switch between language models like OpenAI and local models without changing code. The presenter shows how to configure the language model in the apphost and demonstrates the Telemetry features that track the calls to chat completion service.

Q&A Chatbot and Classification

The video transitions to a more advanced feature: a Q&A chatbot that searches through business data to answer customer queries. Semantic Kernel simplifies this with its plugin API, allowing developers to attach custom logic for data retrieval. The presenter explains how to create a plugin that enables the language model to search product manuals using a vector database and semantic search. The video also covers classification, demonstrating how to determine if a message is suitable for sending to a customer. It shows two methods: using a language model and using a Python-based classifier for faster performance.

Evaluation and Testing

The importance of evaluating the quality of AI assistance is emphasized. The presenter explains that having an evaluation system from the start helps to check whether changes are improving or worsening the system over time. The video details how to quantify the quality of the AI assistant by using a set of evaluation data consisting of inputs and desired outputs. The presenter uses a data generator project to create sample data, including questions and answers, and then tests the backend system against these questions. The quality of the answers is scored using a language model, and the average score is calculated over time.

Semantic Kernel Agents Framework

Matthew from the Semantic Kernel team introduces the new agent framework for Semantic Kernel, designed to simplify interactions with chat completion services. The framework wraps the chat completion service in an additional abstraction, making code easier to manage and providing a more predictable way of working with AI. The demonstration includes creating a chat completion agent, giving it instructions, and starting a chat history. The video also covers the Azure OpenAI assistance API, which manages the chat thread on behalf of the developer.

Multi-Agent Systems and Future Directions

The video explores the concept of multi-agent systems, where multiple agents collaborate on a single task. The presenter demonstrates creating two agents—an art director and a writer—and having them work together to create marketing copy. The agents use the same interface to communicate, with an agent reviewer determining when the chat is over. The video concludes by discussing future directions for Semantic Kernel, including making multi-agent patterns more predictable and deterministic, and incorporating human input into the loop.

Share

Summarize Anything ! Download Summ App

Download on the Apple Store
Get it on Google Play
© 2024 Summ