Prompts
Prompts are templates sent to the LLM (AI) provider when generating examination questions and answers. Each prompt is tied to a question type and can include input variables (e.g., topic, difficulty) and an output schema so the AI returns structured questions and answers.
Where to Find It
- Admin Panel → Prompts: List, create, edit, delete prompts
Overview
- List: View all prompts; search by name or description; filter by question type and status
- Create: Add a new prompt (name, content, description, question type, input variables, output schema, status)
- Edit: Update any field
- Delete: Remove the prompt (only active prompts are available for “Generate with AI”)
List Prompts
The list shows name, description, question type, and status. Use search and filters (question type, status) to find prompts.
Create Prompt
- Go to Prompts → Create
- Name *: Unique name (e.g., "Math single choice", "Grammar fill-in")
- Content *: The prompt text sent to the AI. Use variables in the form
{{variable_name}}(e.g.,{{topic}},{{difficulty}}). The system will replace these with values when generating. - Description: Optional short description
- Question type *: One of:
- single_choice: One correct answer
- multiple_choice: One or more correct answers
- true_false: True/False (two options, one correct)
- fill_blank: Fill in the blank (one correct answer)
- Input variables: Optional JSON array of variable names used in the prompt (e.g.,
["topic", "difficulty"]). Used to know which values to collect from the user when generating. - Output schema *: Text describing the required JSON structure for the AI response (e.g., how questions and answers must be formatted). The app uses this to parse and validate the AI output.
- Status: Active or inactive (only active prompts appear for “Generate with AI”)
- Save
Edit / Delete Prompt
- Edit: Change name, content, description, question type, input variables, output schema, or status
- Delete: Removes the prompt; it will no longer be available for AI generation
How Prompts Are Used
- In the admin, you open an examination and go to its questions section.
- You choose Generate with AI (or equivalent).
- You select:
- Question type (single choice, multiple choice, true/false, fill in the blank)
- Prompt (only prompts for that question type and with status active are available)
- LLM Provider (or the default provider is used)
- If the prompt uses input variables (e.g.,
{{topic}}), you fill those in (e.g., topic, difficulty). - The app builds the full prompt by replacing
{{variable_name}}with your values, sends it to the LLM with the output schema, and then parses the response into questions and answers that you can save to the examination.
Important Notes
- Question type: Must match one of the four types above; the output schema should match the format expected by BrainScore for that type.
- Variables: Use
{{variable_name}}in the content; list variable names in Input variables (JSON array) so the UI can ask for them. - Output schema: Must describe the exact structure the AI should return (e.g., array of objects with
questionandanswers) so parsing and validation succeed. - LLM Provider: You need at least one active LLM Provider with a valid API key for generation to work.
- Active: Only active prompts are offered in the “Generate with AI” flow.