Skip to content

Commit 1fda2b3

Browse files
authored
Prompt management and redid the webhooks page (#445)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added a comprehensive Prompt Management guide with templates, examples, UI access, and integration snippets. * Improved Webhooks docs: typo fixes, clarified behavior, step‑by‑step setup, endpoint validation, and updated imagery. * Added guidance for downloading Course Activity Data. * Reorganized Organization settings: split SSO and LLM setup into separate pages, reworded Overview/Billing/Dashboard/Integrations, and surfaced Prompt Management and related items. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 0436d29 commit 1fda2b3

5 files changed

Lines changed: 147 additions & 24 deletions

File tree

149 KB
Loading
150 KB
Loading

source/instructors/admin/organization/organisation.rst

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Organization settings
2929
llms
3030
webhook
3131
course-action-data
32+
prompt-management
3233

3334

3435

@@ -53,9 +54,11 @@ The person who creates the organization in Codio is the owner and is given the a
5354
- :ref:`Set Organization Contact URL <org-contact-url>`
5455
- :ref:`Enable/Disable Release Grade Automatically <auto-release-grades>`
5556
- :ref:`Hide A/V calls <hideav>`
56-
- :ref:`SSO Integration <sso-integration>`
57-
- :ref:`LLMs <org_llm>`
58-
57+
- :ref:`Set up SSO Integration <sso-integration>`
58+
- :ref:`Provide your own LLM keys <org_llm>`
59+
- :ref:`Create a webhook to receive Codio events <webhooks>`
60+
- :ref:`Download Course Activity Data <course-action-data>`
61+
- :ref:`Manage Prompts for your Organization <prompt-management>`
5962

6063

6164
To access the **Organizations** page, follow these steps:
@@ -71,15 +74,17 @@ Organization owners can add other owners to an organization and view all members
7174

7275
The following Codio features are only accessible to Organization owners:
7376

74-
- **Overview** - Update organization profile, enable or disable the ability to create public objects, enable or disable Codio support access, obtain invitation token, manage education settings, and delete the organization.
75-
- **Members** - View, add, and remove users in your organization and invite teachers to the organization.
76-
- **Billing** - View your Codio plan information.
77-
- **Rubrics** - Create and manage your grading templates.
78-
- **Dashboard** - Specify the Student Dashboard default page (My Projects or Courses), and specify whether to hide/show Courses.
79-
- **IP Consent** - Enable or disable IP Consent and manage the versions.
80-
- **Custom Scripts** - Manage custom scripts used to integrate third-party systems to help and track students.
81-
- **Extensions** - Add and enable custom extensions for the organization.
82-
- **LTI Integrations** - Specify and manage LTI integration settings.
83-
- **Integrations** - Specify API key for Sense.Network integration, and add other API integrations.
84-
- **Assessment Libraries** - Create and manage assessment libraries for your organization.
85-
- **LLMs** - Specify API keys for LLM models or add a custom LLM provider.
77+
- **Overview** - Update organization profile, manage the ability to create public objects, manage Codio support access, manage education settings, and delete the organization.
78+
- **Members** - View, add, and remove users in your organization and invite teachers to the organization.
79+
- **Billing** - View your Codio subscription information.
80+
- **Rubrics** - Create and manage your grading templates.
81+
- **Dashboard** - Specify Dashboard configurations for students, teachers and read-only teachers.
82+
- **IP Consent** - Enable or disable IP Consent and manage the versions.
83+
- **Custom Scripts** - Manage custom scripts used to integrate third-party systems to help and track students.
84+
- **Extensions** - Add and enable custom extensions for the organization.
85+
- **LTI Integrations** - View and manage LTI integration settings.
86+
- **Integrations** - Specify API integrations, Webhooks and SSO Integration.
87+
- **Assessment Libraries** - Create and manage assessment libraries for your organization.
88+
- **LLMs** - Specify API keys for LLM models or add a custom LLM provider.
89+
- **Course Action Data** - Download a report of all course management activities for the entire organization.
90+
- **Prompt Management** - Manage prompts, used in custom extensions, for the entire organization.
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
.. meta::
2+
:description: Prompt management for an organization.
3+
4+
.. _prompt-management:
5+
6+
7+
Prompt Management
8+
=================
9+
10+
This feature allows instructors to store prompts at an organization level. These prompts have unique **Prompt IDs** that can be used in custom assistants.
11+
12+
1. Click your username in the top-right corner, then select **Organization** from the menu.
13+
14+
2. In the **Organizations** tab, click the name of your organization.
15+
16+
3. Click the **Prompt Management** tab and then click **Add Prompt**.
17+
18+
.. image:: /img/manage_organization/addprompt.png
19+
:alt: Add a prompt
20+
21+
Creating the Prompt
22+
~~~~~~~~~~~~~~~~~~~
23+
24+
Enter your prompt text and specify the data you want to include as context.
25+
26+
- Each Prompt must have a unique **Prompt ID**. Prompt IDs can only contain uppercase letters, numbers, and underscores.
27+
- In the **Text Area**, enter your prompt text (user prompt or system prompt).
28+
- Use the buttons to create templates to specify the data you want to add to your prompt as context:
29+
- **Add Variable**: Pass dynamic variables as context to your prompt (e.g., open guide page, open file, error message, etc.).
30+
- **Add Instructor View**: Pass a file from the ``.guides`` folder (hidden from students) or a file from the student workspace with solution file templating. For example, ``{{"type": "INSTRUCTOR_VIEW", "filepath": "<path/to/file>"}}`` will pull the contents of the specified file.
31+
- **Add Starter Code**: Pass a file from the student workspace provided by the instructor with no student edits (starter code/boilerplate).
32+
- You can use this feature to access solutions in the ``.guides/secure`` folder. See the example below.
33+
- Click **Create** once you have entered all the information.
34+
35+
.. note::
36+
Files are retrieved dynamically on the server when the assistant is used. If a referenced file is deleted or doesn’t exist after the prompt is created, an empty string is sent as context.
37+
38+
.. image:: /img/manage_organization/promptmanagement.png
39+
:alt: The prompt management dialog
40+
41+
Example Prompts
42+
~~~~~~~~~~~~~~~
43+
44+
**Prompt Example 1: Secure Folder File**
45+
46+
.. code:: none
47+
48+
Here is the question the student is working on:
49+
<assignment>
50+
{{"type": "VARIABLE", "name": "GUIDE_CONTENT"}}
51+
</assignment>
52+
53+
Here's the sample solution for the question:
54+
<solution>
55+
{{"type": "INSTRUCTOR_VIEW", "filepath": ".guides/secure/exercise-solutions/solution1.py"}}
56+
</solution>
57+
58+
Answer any questions the student has about this assignment without providing the solution directly.
59+
Respond only with suggestions to help them make progress by themselves.
60+
61+
62+
**Prompt Example 2: Starter Code and Solution File**
63+
64+
.. code:: none
65+
66+
Here is the question the student is working on:
67+
<assignment>
68+
{{"type": "VARIABLE", "name": "GUIDE_CONTENT"}}
69+
</assignment>
70+
71+
Here is the solution file:
72+
<solution>
73+
{{"type": "INSTRUCTOR_VIEW", "filepath": "code/exercise1.py"}}
74+
</solution>
75+
76+
Here's the starter code provided to the student:
77+
<starter_code>
78+
{{"type": "STARTER_CODE", "filepath": "code/exercise1.py"}}
79+
</starter_code>
80+
81+
Here's the student current code file:
82+
<student_code>
83+
{{"type": "VARIABLE", "name": "STUDENT_FILE_CONTENT"}}
84+
</student_code>
85+
86+
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.
87+
88+
89+
Using the Prompt in a Custom Extension
90+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91+
92+
.. code:: javascript
93+
94+
(async function(codioIDE, window) {
95+
96+
97+
const systemPrompt = "System Prompt for the LLM goes here"
98+
codioIDE.coachBot.register("iNeedHelpButton", "I have a question", onButtonPress)
99+
100+
101+
async function onButtonPress() {
102+
const context = await codioIDE.coachBot.getContext()
103+
const userPrompt = "{% prompt 'TEST_PROMPT_1' %}"
104+
const result = await codioIDE.coachBot.ask({
105+
systemPrompt: systemPrompt,
106+
userPrompt: userPrompt,
107+
vars: {
108+
"GUIDE_CONTENT": context.guidesPage.content,
109+
}
110+
})
111+
}
112+
})(window.codioIDE, window)
113+
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
11
.. meta::
2-
:description: Allow webhoooks to support passing of student data to extenal servers
2+
:description: Allow webhooks to support passing of student data to external servers
33

44
.. _webhooks:
55

66
Webhooks
77
========
8-
Webbhooks allow receiving Codio events by calling your endpoint.
98

10-
The system won’t retry webhook calls for any missed events you can query the API event object using loadEvents function.
9+
Webhooks provide a way to receive Codio events at an endpoint you specify.
1110

12-
You can add your own Webhooks to your Codio organization from the **Organization > Integrations** page in Codio.
11+
The system does not retry webhook calls for missed events. You can query the API event object using the ``loadEvents`` function.
1312

14-
Go to the **Webhooks** area and **Add Webhook**
13+
You can add Webhooks for your Codio organization from the **Organization > Integrations** page.
1514

16-
To add a webhook enter the URL of your server and press create, the system will send a test request to check endpoint validity.
15+
1. Click your username in the top-right corner, then select **Organization** from the menu.
1716

18-
.. image:: /img/createwebhook.png
17+
2. In the **Organizations** tab, click the name of your organization.
18+
19+
.. image:: /img/class_administration/createanorganization/organizations.png
1920
:alt: My Organizations
2021

21-
All requests contain a JWT signature you can verify using codio keys https://apollo.codio.com/lti/oidc/certs (or https://apollo.codio.co.uk/lti/oidc/certs if working on codio.co.uk)
22+
3. Click the **Integrations** tab and go to the **Webhooks** area and click **Add Webhook**.
23+
24+
4. Enter the URL of your server and click **Create**. The system will send a test request to validate endpoint connectivity.
25+
2226

27+
All requests contain a JWT signature you can verify using Codio keys https://apollo.codio.com/lti/oidc/certs (or https://apollo.codio.co.uk/lti/oidc/certs if you are working on codio.co.uk).
2328

24-
Example app to receive webhooks into a Codio project can be found here: https://github.com/iyashtykov/webhook-server
29+
View an example here: https://github.com/iyashtykov/webhook-server
2530

0 commit comments

Comments
 (0)