microsoft / semantic-kernel

Integrate cutting-edge LLM technology quickly and easily into your apps
https://aka.ms/semantic-kernel
MIT License
21.97k stars 3.27k forks source link

AI Agent Demo #2181

Closed samleegithub closed 1 year ago

samleegithub commented 1 year ago

Inspired by this video: https://www.youtube.com/watch?v=ogQUlS7CkYA

https://github.com/JayZeeDesign/researcher-gpt

They create an AI Agent that is able to do research automatically using LangChain.

Would it be possible to create a similar demo using Semantic Kernel instead of LangChain?

I imagine it would be a combination of Stepwise Planner, Azure Cognitive Search (vector search) and a web-scraper plugin.

matthewbolanos commented 1 year ago

This sounds like an interesting idea. I'll go ahead and add this to our backlog of samples that we should create.

evchaki commented 1 year ago

@samleegithub - this is interesting, thanks for bringing this up. Can you create a PR that creates a Plugin to do this.

samleegithub commented 1 year ago

@evchaki - I was thinking the demo might be a sample dotnet notebook that uses stepwise planner, bing search skill, web-scraper plugin and potentially azure cognitive search for memory.

Were you thinking that all of this would be wrapped up inside a researcher plugin?

craigomatic commented 1 year ago

I started an implementation of this last week.

While there isn't much on the repo yet, the researcher code is pretty much what @samleegithub mentions above:

image

The webscraper plugin is currently giving me some headaches deploying to Azure, it's working locally right now: https://github.com/craigomatic/webscraper-aiplugin/

There might be 1 or 2 more plugins that we create to pull data from less general places than a Bing search, although I'm not sure what those would be just yet (maybe searching relevant arvix papers?)

@samleegithub let me know if you'd like to join forces,

samleegithub commented 1 year ago

@craigomatic Awesome! I'm not an expert C# coder but I can build and run the code to test.

I tried to install the webscraper plugin on my local machine, but I'm getting this error:

dotnet run
Unhandled exception. System.InvalidOperationException: The gRPC channel URI 'http://:7071' could not be parsed.
   at Microsoft.Azure.Functions.Worker.Grpc.GrpcWorkerClientFactory.GrpcWorkerClient.CreateClient() in D:\a\_work\1\s\src\DotNetWorker.Grpc\GrpcWorkerClientFactory.cs:line 110
   at Microsoft.Azure.Functions.Worker.Grpc.GrpcWorkerClientFactory.GrpcWorkerClient..ctor(GrpcHostChannel outputChannel, GrpcWorkerStartupOptions startupOptions, IMessageProcessor processor) in D:\a\_work\1\s\src\DotNetWorker.Grpc\GrpcWorkerClientFactory.cs:line 52
   at Microsoft.Azure.Functions.Worker.Grpc.GrpcWorkerClientFactory.CreateClient(IMessageProcessor messageProcessor) in D:\a\_work\1\s\src\DotNetWorker.Grpc\GrpcWorkerClientFactory.cs:line 33
   at Microsoft.Azure.Functions.Worker.GrpcWorker.StartAsync(CancellationToken token) in D:\a\_work\1\s\src\DotNetWorker.Grpc\GrpcWorker.cs:line 57
   at Microsoft.Azure.Functions.Worker.WorkerHostedService.StartAsync(CancellationToken cancellationToken) in D:\a\_work\1\s\src\DotNetWorker.Core\WorkerHostedService.cs:line 25
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
   at Program.<Main>$(String[] args) in C:\Users\samulee\Documents\Microsoft Projects\ITF\webscraper-aiplugin\Program.cs:line 52

Browsing through the code, it looks like I'm missing a local.settings.json file.

craigomatic commented 1 year ago

Good catch, readme updated and empty local.settings.json was added to the repo.

samleegithub commented 1 year ago

@craigomatic I updated to the latest code and filled in the config values.

But I'm still getting the same error saying https://:7071 could not be parsed. I can't figure out how to fix this.

craigomatic commented 1 year ago

You might be missing the Azure Function tools: https://learn.microsoft.com/en-us/azure/azure-functions/functions-develop-local#local-development-environments

samleegithub commented 1 year ago

I figured out what I was doing wrong. I was using "dotnet build" and "dotnet run". I should have been using "func run" instead.

It seems to be working now. I'm testing with Chat Copilot now.

Thanks!

matthewbolanos commented 1 year ago

Closing this issue since there hasn't been activity in awhile. @samleegithub, feel free to reopen this ticket if you end up submitting a PR for a notebook example.