{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# self_study_prompts.ipynb\n", "> A listing of all prompts for self-study\n", "\n", "This notebook contains all prompts used for self-study as a central place that can be monitored and evaluated for appropriate functionality. Note that these perform the requests part of the prompts.\n", "\n", ":::{.callout-caution}\n", "These notebooks are development notebooks, meaning that they are meant to be run locally or somewhere that supports navigating a full repository (in other words, not Google Colab unless you clone the entire repository to drive and then mount the Drive-Repository.) However, it is expected if you're able to do all of those steps, you're likely also able to figure out the required pip installs for development there.\n", ":::" ] }, { "cell_type": "raw", "metadata": {}, "source": [ "---\n", "skip_exec: true\n", "---" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#| default_exp SelfStudyPrompts" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Self-study texts\n", "We'll now define the text for our self-study questions. Note that these will align with `assessment_request` in the `PromptInteractionBase` module." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#| export\n", "# used for pretty display\n", "import pandas as pd" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#| export\n", "MC_QUIZ_DEFAULT = \"Please design a 5 question multiple choice quiz about the provided text.\"\n", "\n", "SHORT_ANSWER_DEFAULT = (\"Please design a 5 question short answer quiz about the provided text. \"\n", " \"The question types should be short answer. Expect the correct answers to be a few sentences long.\")\n", "\n", "FILL_BLANK_DEFAULT = \"\"\"Create a 5 question fill in the blank quiz referencing parts of the provided text.\n", "The \"blank\" part of the question should appear as \"________\". The answers should reflect what word(s) should go in the blank an accurate statement.\n", "An example is as follows: \"The author of the book is ______.\" The question should be a statement.\n", "\"\"\"\n", "\n", "SEQUENCING_DEFAULT = \"\"\"Create a 5 question questionnaire that will ask me to recall the steps or sequence of events\n", "in the provided text.\"\"\"\n", "\n", "RELATIONSHIP_DEFAULT = (\"Create a 5 question quiz for the student that asks the student to identify relationships between\"\n", " \"topics or concepts that are important to understanding this text.\")\n", "\n", "CONCEPTS_DEFAULT = \"\"\" Design a 5 question quiz that asks me about definitions or concepts of importance in the provided text.\"\"\"\n", "\n", "REAL_WORLD_EXAMPLE_DEFAULT = \"\"\"Demonstrate how the provided context can be applied to solve a real world problem.\n", "Ask me questions about how the demonstration you provided relates to solving a real world problem.\"\"\"\n", "\n", "RANDOMIZED_QUESTIONS_DEFAULT = \"\"\"Generate a high-quality assessment consisting of 5 varied questions,\n", "each of different types (open-ended, multiple choice, short answer, analogies, etc.)\"\"\"\n", "\n", "SELF_STUDY_PROMPT_NAMES = ['MC_QUIZ_DEFAULT',\n", "'SHORT_ANSWER_DEFAULT',\n", "'FILL_BLANK_DEFAULT',\n", "'SEQUENCING_DEFAULT',\n", "'RELATIONSHIP_DEFAULT',\n", "'CONCEPTS_DEFAULT',\n", "'REAL_WORLD_EXAMPLE_DEFAULT',\n", "'RANDOMIZED_QUESTIONS_DEFAULT']" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Create functions to assist with creating prompts\n", "Now, we'll use this section in order to create some functions which will allow the user to display all available prompts." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#| export\n", "# Define self study dictionary for lookup\n", "SELF_STUDY_DEFAULTS = {'mc': MC_QUIZ_DEFAULT,\n", "'short_answer': SHORT_ANSWER_DEFAULT,\n", "'fill_blank': FILL_BLANK_DEFAULT,\n", "'sequencing': SEQUENCING_DEFAULT,\n", "'relationships': RELATIONSHIP_DEFAULT,\n", "'concepts': CONCEPTS_DEFAULT,\n", "'real_world_example': REAL_WORLD_EXAMPLE_DEFAULT,\n", "'randomized_questions': RANDOMIZED_QUESTIONS_DEFAULT\n", "} \n", "\n", "# Return list of all self study prompts\n", "def list_all_self_study_prompt_keys():\n", " return list(SELF_STUDY_DEFAULTS.keys())\n", "\n", "def list_all_self_study_prompts():\n", " return list(SELF_STUDY_DEFAULTS.values())\n", " \n", "# Return list of all self study variable names\n", "def list_default_self_prompt_varnames():\n", " return SELF_STUDY_PROMPT_NAMES\n", "\n", "# Print as a table\n", "def print_all_self_study_prompts():\n", " with pd.option_context('max_colwidth', None):\n", " display(pd.DataFrame({'SELF_STUDY_DEFAULTS key': list(SELF_STUDY_DEFAULTS.keys()),\n", " 'Prompt': list(SELF_STUDY_DEFAULTS.values())}))\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now, we'll have quick unit test just to make sure this is working correctly." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['mc',\n", " 'short_answers',\n", " 'fill_blanks',\n", " 'sequencing',\n", " 'relationships',\n", " 'concepts',\n", " 'real_world_example',\n", " 'randomized_questions']" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "list_all_self_study_prompt_keys()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['Please design a 5 question quiz about the provided text.',\n", " 'Please design a 5 question short answer quiz about the provided text. The question types should be short answer. Expect the correct answers to be a few sentences long.',\n", " 'Create a 5 question fill in the blank quiz referencing parts of the provided text.\\nThe \"blank\" part of the question should appear as \"________\". The answers should reflect what word(s) should go in the blank an accurate statement.\\nAn example is as follows: \"The author of the book is ______.\" The question should be a statement.\\n',\n", " 'Create a 5 question questionnaire that will ask me to recall the steps or sequence of events\\nin the provided text.',\n", " 'Please design a 5 question quiz that asks me to draw or explain relationships\\nbetween important concepts or topics in the provided text.',\n", " ' Design a 5 question quiz that asks me about definitions or concepts of importance in the provided text.',\n", " 'Demonstrate how the provided context can be applied to solve a real world problem.\\nAsk me questions about how the demonstration you provided relates to solving a real world problem.',\n", " 'Generate a high-quality assessment consisting of 5 varied questions,\\neach of different types (open-ended, multiple choice, short answer, analogies, etc.)']" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "list_all_self_study_prompts()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['MC_QUIZ_DEFAULT',\n", " 'SHORT_ANSWER_DEFAULT',\n", " 'FILL_BLANK_DEFAULT',\n", " 'SEQUENCING_DEFAULT',\n", " 'RELATIONSHIP_DEFAULT',\n", " 'CONCEPTS_DEFAULT',\n", " 'REAL_WORLD_EXAMPLE_DEFAULT',\n", " 'RANDOMIZED_QUESTIONS_DEFAULT']" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "list_default_self_prompt_varnames()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Variable NamePrompt
0mcPlease design a 5 question quiz about the provided text.
1short_answersPlease design a 5 question short answer quiz about the provided text. The question types should be short answer. Expect the correct answers to be a few sentences long.
2fill_blanksCreate a 5 question fill in the blank quiz referencing parts of the provided text.\\nThe \"blank\" part of the question should appear as \"________\". The answers should reflect what word(s) should go in the blank an accurate statement.\\nAn example is as follows: \"The author of the book is ______.\" The question should be a statement.\\n
3sequencingCreate a 5 question questionnaire that will ask me to recall the steps or sequence of events\\nin the provided text.
4relationshipsPlease design a 5 question quiz that asks me to draw or explain relationships\\nbetween important concepts or topics in the provided text.
5conceptsDesign a 5 question quiz that asks me about definitions or concepts of importance in the provided text.
6real_world_exampleDemonstrate how the provided context can be applied to solve a real world problem.\\nAsk me questions about how the demonstration you provided relates to solving a real world problem.
7randomized_questionsGenerate a high-quality assessment consisting of 5 varied questions,\\neach of different types (open-ended, multiple choice, short answer, analogies, etc.)
\n", "
" ], "text/plain": [ " Variable Name \\\n", "0 mc \n", "1 short_answers \n", "2 fill_blanks \n", "3 sequencing \n", "4 relationships \n", "5 concepts \n", "6 real_world_example \n", "7 randomized_questions \n", "\n", " Prompt \n", "0 Please design a 5 question quiz about the provided text. \n", "1 Please design a 5 question short answer quiz about the provided text. The question types should be short answer. Expect the correct answers to be a few sentences long. \n", "2 Create a 5 question fill in the blank quiz referencing parts of the provided text.\\nThe \"blank\" part of the question should appear as \"________\". The answers should reflect what word(s) should go in the blank an accurate statement.\\nAn example is as follows: \"The author of the book is ______.\" The question should be a statement.\\n \n", "3 Create a 5 question questionnaire that will ask me to recall the steps or sequence of events\\nin the provided text. \n", "4 Please design a 5 question quiz that asks me to draw or explain relationships\\nbetween important concepts or topics in the provided text. \n", "5 Design a 5 question quiz that asks me about definitions or concepts of importance in the provided text. \n", "6 Demonstrate how the provided context can be applied to solve a real world problem.\\nAsk me questions about how the demonstration you provided relates to solving a real world problem. \n", "7 Generate a high-quality assessment consisting of 5 varied questions,\\neach of different types (open-ended, multiple choice, short answer, analogies, etc.) " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "print_all_self_study_prompts()" ] } ], "metadata": { "kernelspec": { "display_name": "python3", "language": "python", "name": "python3" } }, "nbformat": 4, "nbformat_minor": 2 }