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

Show how to render prompts #718

Merged
merged 2 commits into from Apr 28, 2023
Merged

Show how to render prompts #718

merged 2 commits into from Apr 28, 2023

Conversation

dluc
Copy link
Collaborator

@dluc dluc commented Apr 28, 2023

Motivation and Context

New code example showing how to render prompts, e.g. in cases where one wants to leverage semantic functions but execute them with a custom flow, e.g. passing prompts to GPT Turbo 3.5.

The example shows the basics of how one could add a chat UI into an app, selecting some piece of content, and asking AI to extract data. In this case, instead of calling a semantic function, the code calls a Chat model directly, to leverage chat model protections against prompt injection.

Description

  • New syntax example, explaining how to use PromptTemplateEngine
  • Make one chat service param optional, to simplify the code

@dluc dluc requested a review from craigomatic April 28, 2023 05:13
@github-actions github-actions bot added .NET Issue or Pull requests regarding .NET code kernel.core labels Apr 28, 2023
@dluc dluc added the PR: ready for review All feedback addressed, ready for reviews label Apr 28, 2023
@dluc dluc force-pushed the dluc127prompts branch 3 times, most recently from 20309f4 to b0b4f00 Compare April 28, 2023 07:47
@github-actions github-actions bot added the kernel Issues or pull requests impacting the core kernel label Apr 28, 2023
@dluc dluc enabled auto-merge (squash) April 28, 2023 17:37
@dluc dluc merged commit ba70843 into microsoft:main Apr 28, 2023
11 checks passed
@dluc dluc deleted the dluc127prompts branch April 29, 2023 00:19
dluc added a commit that referenced this pull request Apr 29, 2023
### Motivation and Context

New code example showing how to render prompts, e.g. in cases where one
wants to leverage semantic functions but execute them with a custom
flow, e.g. passing prompts to GPT Turbo 3.5.

The example shows the basics of how one could add a chat UI into an app,
selecting some piece of content, and asking AI to extract data. In this
case, instead of calling a semantic function, the code calls a Chat
model directly, to leverage chat model protections against prompt
injection.

### Description

* New syntax example, explaining how to use `PromptTemplateEngine`
* Make one chat service param optional, to simplify the code
dehoward pushed a commit to lemillermicrosoft/semantic-kernel that referenced this pull request Jun 1, 2023
### Motivation and Context

New code example showing how to render prompts, e.g. in cases where one
wants to leverage semantic functions but execute them with a custom
flow, e.g. passing prompts to GPT Turbo 3.5.

The example shows the basics of how one could add a chat UI into an app,
selecting some piece of content, and asking AI to extract data. In this
case, instead of calling a semantic function, the code calls a Chat
model directly, to leverage chat model protections against prompt
injection.

### Description

* New syntax example, explaining how to use `PromptTemplateEngine`
* Make one chat service param optional, to simplify the code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code PR: ready for review All feedback addressed, ready for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants