Creating and calling the pipeline
Calling the pipeline requires creating a kernel, loading it with the functions we want, and then calling them in sequence. Since we’re going to use semantic functions, we also need to add an AI service to the kernel. Evaluating text against requirements can be a complex task, and therefore we will use GPT-4 to execute it. GPT 3.5 can work if the documents are simple, but some of our documents have more than one page, and that can be too much for GPT 3.5 to handle well.
C#
In the following code block, we load all the native and semantic plugins into our kernel:
using Microsoft.SemanticKernel; using Plugins.ProposalChecker; using System; using System.IO; var (apiKey, orgId) = Settings.LoadFromFile(); var builder = Kernel.CreateBuilder(); builder.AddOpenAIChatCompletion("gpt-4", apiKey, orgId); builder.Plugins.AddFromPromptDirectory("../../../plugins/ProposalCheckerV2"); builder.Plugins.AddFromType<Helpers>()...