1. Learn
  2. /
  3. Courses
  4. /
  5. Working with the OpenAI API

Connected

Exercise

Adding guardrails

One of the most popular uses of system messages is to add guardrails, which places restrictions on model outputs.

In this exercise, you'll place a restriction on model outputs preventing learning plans not related to languages, as your system is beginning to find its niche in that space. You'll design a custom message for users requesting these type of learning plans so they understand this change.

Instructions

100 XP
  • Complete the chat request, providing the system message in sys_msg and test a user message containing a non-language-related skill, such as rollerskating.