Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: Sample Demo Code Showcasing Usage of Reasoning Models #10558

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

joslat
Copy link
Contributor

@joslat joslat commented Feb 16, 2025

Motivation and Context

  1. Required: showing usage of reasoning effort.
  2. Problem: Controlling reasoning effort - no sample
  3. Scenario: Using reasoning effort to benefit from the new amazing models :)

Description

This pull request adds sample demo code that demonstrates how to leverage reasoning models by using a AgentBase class that implements this support nicely.
The new implementation allows agents to specify a reasoning effort level (Low, Medium, High) that is applied to the OpenAIPromptExecutionSettings when invoking Semantic Kernel.

The PR includes three demo agents:

  • SmartBlogPostAgent (Low Reasoning): Generates an analytical blog post on Semantic Kernel.
  • PoemAgent (Medium Reasoning): Composes a creative poem about Semantic Kernel.
  • CodeExampleAgent (High Reasoning): Provides a sample C# code snippet demonstrating Semantic Kernel integration.

Additionally, a comprehensive README.md has been added with configuration instructions (using User Secrets or environment variables), guidance on setting the project as the default startup, and how to run the demo.

This implementation not only enhances our agentic AI capabilities but also complements the phenomenal code from Roger Barreto (@RogerBarreto), further strengthening Semantic Kernel overall solution.

Contribution Checklist

@joslat joslat requested a review from a team as a code owner February 16, 2025 19:48
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code documentation labels Feb 16, 2025
@github-actions github-actions bot changed the title Sample Demo Code Showcasing Usage of Reasoning Models .Net: Sample Demo Code Showcasing Usage of Reasoning Models Feb 16, 2025
@joslat
Copy link
Contributor Author

joslat commented Feb 16, 2025

@RogerBarreto I saw there was no sample, so "giving back" a bit ;)
Also, what do you think of the example use cases? Would you change/adjust them to properly use the "reasoning effort"?

@RogerBarreto
Copy link
Member

Thanks for the sample and contribution @joslat.
I'm tagging @crickman as one of our Agent expert to have a look in the demo and comment. As we are approaching GA on the agents would be interesting to have your optinion and changes that bring a good Agent with latest reasoning capabilities to our Demo collections.

@joslat
Copy link
Contributor Author

joslat commented Feb 19, 2025

@RogerBarreto & @crickman any feedback? :)
If not, I think it fits the quality gate so we could approve, after all it's an example on "how to use the new reasoning effort parameter", that's all ;)

@crickman crickman added samples ai connector Anything related to AI connectors labels Feb 19, 2025
@crickman
Copy link
Contributor

Thanks for the sample and contribution @joslat. I'm tagging @crickman as one of our Agent expert to have a look in the demo and comment. As we are approaching GA on the agents would be interesting to have your optinion and changes that bring a good Agent with latest reasoning capabilities to our Demo collections.

@RogerBarreto - The core of the demo isn't really agent specific. I've recommended to @joslat that it be refactored as a focused sample.

@joslat joslat requested a review from crickman February 20, 2025 18:48
@joslat
Copy link
Contributor Author

joslat commented Feb 20, 2025

@crickman I think this is it, simplest implementation possible as a concept sample, ChatCompletion only.
Unsure about the configuration stuff, there I need guidance-support though. The rest is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai connector Anything related to AI connectors documentation .NET Issue or Pull requests regarding .NET code samples
Projects
Status: Sprint: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants