-
Notifications
You must be signed in to change notification settings - Fork 1
Prompt management and redid the webhooks page #445
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
Merged
+147
−24
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
156fa74
Prompt management and redid the webhooks page
shajason e10e2a3
A few of CR's complaints - more editing once it has a validity review
shajason 4edb191
Incorporated Mohit's feedback
shajason 49b6a0c
more CR edits
shajason d4d8ec7
incorporated feedback
shajason File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
source/instructors/admin/organization/prompt-management.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| .. meta:: | ||
| :description: Prompt management for an organization. | ||
|
|
||
| .. _prompt-management: | ||
|
|
||
|
|
||
| Prompt Management | ||
| ================= | ||
|
|
||
| This feature allows instructors to store prompts at an organization level. These prompts have unique **Prompt IDs** that can be used in custom assistants. | ||
|
|
||
| 1. Click your username in the top-right corner, then select **Organization** from the menu. | ||
|
|
||
| 2. In the **Organizations** tab, click the name of your organization. | ||
|
|
||
| 3. Click the **Prompt Management** tab and then click **Add Prompt**. | ||
|
|
||
| .. image:: /img/manage_organization/addprompt.png | ||
| :alt: Add a prompt | ||
|
|
||
| Creating the Prompt | ||
| ~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Enter the information you want to provide with your prompt along with the text of the prompt. | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - Each Prompt must have a unique **Prompt ID**. | ||
| - Use the buttons to create templates to specify the data you want to send. For example, **Add Instructor View** will add the tag: ``{{"type": "INSTRUCTOR_VIEW", "filepath": ""}}`` which will pull the contents of the specified file. | ||
| - You can use this feature to access solutions in the ``.guides\secure`` folder. See the example below. | ||
shajason marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| .. image:: /img/manage_organization/promptmanagement.png | ||
shajason marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| :alt: The prompt management dialog | ||
|
|
||
| Example Prompts | ||
| ~~~~~~~~~~~~~~~ | ||
|
|
||
| **Prompt example 1: Secure folder file** | ||
shajason marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| .. code:: none | ||
| Here is the question the student is working on: | ||
| <assignment> | ||
| {{"type": "VARIABLE", "name": "GUIDE_CONTENT"}} | ||
| </assignment> | ||
| Here's the sample solution for the question: | ||
| <solution> | ||
| {{"type": "INSTRUCTOR_VIEW", "filepath": ".guides/secure/exercise-solutions/solution1.py"}} | ||
| </solution> | ||
| Answer any questions the student has about this assignment without providing the solution directly. | ||
| Respond only with suggestions to help them make progress by themselves. | ||
| **Prompt example 2: Starter Code and solution file** | ||
shajason marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| .. code:: none | ||
| Here is the question the student is working on: | ||
| <assignment> | ||
| {{"type": "VARIABLE", "name": "GUIDE_CONTENT"}} | ||
| </assignment> | ||
| Here is the solution file: | ||
| <solution> | ||
| {{"type": "INSTRUCTOR_VIEW", "filepath": "code/exercise1.py"}} | ||
| </solution> | ||
| Here's the starter code provided to the student: | ||
| <starter_code> | ||
| {{"type": "STARTER_CODE", "filepath": "code/exercise1.py"}} | ||
| </starter_code> | ||
| Here's the student current code file: | ||
| <student_code> | ||
| {{"type": "VARIABLE", "name": "STUDENT_FILE_CONTENT"}} | ||
| </student_code> | ||
| Provide 1-2 hints as suggestions to help them make progress. Do not give away the solution. Do not include code snippets in your hints. | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Using the Prompt in a Custom Extension | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. code:: javascript | ||
| (async function(codioIDE, window) { | ||
| const systemPrompt = "System Prompt for the LLM goes here" | ||
| codioIDE.coachBot.register("iNeedHelpButton", "I have a question", onButtonPress) | ||
| async function onButtonPress() { | ||
| const context = await codioIDE.coachBot.getContext() | ||
| const userPrompt = "{% prompt 'TEST_PROMPT_1' %}" | ||
| const result = await codioIDE.coachBot.ask({ | ||
| systemPrompt: systemPrompt, | ||
| userPrompt: userPrompt, | ||
| vars: { | ||
| "GUIDE_CONTENT": context.guidesPage.content, | ||
| } | ||
| }) | ||
| } | ||
| })(window.codioIDE, window) | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.