Report AI.pdf
Document Details
Uploaded by FrugalNewOrleans2291
Tags
Full Transcript
Report: AI-Powered Quiz Generation for Policy Management Module Objective: Integrate an AI-powered solution into the Policy Management module to automatically generate multiple-choice quizzes based on customer-created policies. These quizzes will act as a learning tool for employees, providing cust...
Report: AI-Powered Quiz Generation for Policy Management Module Objective: Integrate an AI-powered solution into the Policy Management module to automatically generate multiple-choice quizzes based on customer-created policies. These quizzes will act as a learning tool for employees, providing customization options for users to tailor the quizzes to their needs. AI/NLP Technology Research: AI Tools: Explore OpenAI (ChatGPT), Google Cloud NLP, and Quizgecko for analyzing policies and generating relevant quiz questions. Capabilities: o Extract key concepts, rules, and statements from policy documents. o Generate quizzes with varied difficulty levels and multiple-choice formats (single-answer, multi-answer, true/false). o Adapt to domain-specific language (e.g., cybersecurity policies). Tools Evaluated: o OpenAI ChatGPT: Ideal for complex natural language understanding and content generation. o Google Cloud NLP: Effective for text classification and extracting key phrases. o Quizgecko: Specializes in quiz generation with predefined APIs. Integration with Policy Management (OutSystems): Data Retrieval: Policy content can be passed to AI tools via APIs for quiz generation. OutSystems will handle the connection through API connectors. Quiz Customization: Users will have access to tools for: o Editing Questions: Modify the question text and answers through a simple form interface. Each question will have fields to update question wording, answer choices, and correct answers. o Choosing Question Formats: Users can switch between multiple-choice formats (e.g., single-answer, multiple-answer, true/false) using dropdown menus or radio buttons. o Adjusting Difficulty: A difficulty level slider or dropdown allows users to select how challenging each question should be. o Adding or Removing Questions: Include buttons for adding new questions (either manually or AI-generated) and deleting irrelevant or redundant ones. o Reordering Questions: Drag-and-drop functionality can help users rearrange the order of questions for better flow. Quiz Customization & Editing Features: Edit Questions: Provide a detailed question editor where users can: o Adjust the question wording. o Change or add answer options. o Define the correct answer(s). o Attach explanations for feedback after the quiz. Select Formats: Enable users to switch between: o Single-answer questions. o Multiple-answer questions. o True/false statements. Preview Quiz: Offer a preview mode for users to simulate taking the quiz before deploying it. Quiz Results & Data Storage: Storing Results: Quiz results, such as correct/incorrect answers, scores, and completion times, will be stored in a secure database (OutSystems entities) associated with each employee and quiz session. Reporting and Analytics: o Quiz Results: Results will be displayed in summary reports showing individual performance, score distributions, and completion statistics. o Interaction Data: Track interaction data, such as the time spent on each question, answers chosen, and quiz completion rates. o Detailed Reports: Generate detailed reports showing employee progress, including attempts, scores, and learning improvement over time. o Data Export: Provide an option to export quiz results in formats like CSV or Excel for further analysis. Risks & Limitations: Data Privacy: Ensure that sensitive policy data sent to AI services is handled securely and in compliance with regulations. AI Accuracy: AI may misinterpret complex or domain-specific language, generating irrelevant or low-quality questions. API Constraints: Token limits, query limits, and costs could restrict large-scale real- time quiz generation. Complexity: AI might struggle with highly technical or nuanced policy language, producing irrelevant or confusing questions. Costs: Pricing (GPT-4): GPT-4 (8k context): $0.03 per 1,000 tokens (input), $0.06 per 1,000 tokens (output). GPT-4 (32k context): $0.06 per 1,000 tokens (input), $0.12 per 1,000 tokens (output). Token Definition: 1,000 tokens is roughly 750 words of input/output combined. Pricing for Others Google Cloud NLP: $1–$5 per 1,000 text records. Quizgecko: $29–$99 per month for quiz generation. How can we interact with API for customization of quiz? To interact with an API for customizing quizzes, you will need to follow these steps, ensuring the generated quiz can be customized via an intuitive interface in your OutSystems app: 1. API Setup and Integration Select the AI API: Use APIs like OpenAI (ChatGPT), Quizgecko, or similar to generate quiz questions based on policy data. API Endpoints: Identify the appropriate endpoints for quiz generation and customization features in the chosen API. o Example endpoints: /generate-quiz, /edit-quiz, /fetch-quiz-details. In OutSystems: API Integration: Use OutSystems' REST API Integration component to connect to these API endpoints. Data Mapping: Map the request and response data between your OutSystems app and the API. For example, pass the policy content and get back the generated quiz questions in JSON format. 2. Quiz Customization Interface (Frontend) Once the API response is received (e.g., a generated quiz in JSON), you can provide a frontend interface where users can customize the quiz. Features for Customization: Editing Questions: Provide editable fields for users to change: o Question text: Textbox to edit the question. o Answer choices: Editable list of answers where users can modify, add, or remove answers. o Correct answer(s): Checkbox or radio buttons for selecting the correct answer(s). o Explanations: Add text fields for feedback explanations tied to each answer. API Interaction: If the quiz is edited, send a request to the /edit-quiz API endpoint with updated quiz data, including the new question text, answers, and explanations. Selecting Question Format: o Dropdown or radio button options to switch between question formats like: Single-answer multiple-choice. Multiple-answer. True/false. API Interaction: Send updated format information to the /edit-quiz endpoint, where the API can process format changes. Adjusting Difficulty: o A slider or dropdown for selecting difficulty levels. API Interaction: If users adjust the difficulty, pass this setting to the API in the request body, allowing the API to modify the question complexity. Adding or Removing Questions: o Provide an "Add Question" button to generate new questions. o Allow deleting unwanted questions. API Interaction: Use /generate-quiz or /edit-quiz to add or remove questions based on user input. 3. Real-Time Interaction and Preview Live Preview: After each customization, update the quiz preview in real time, displaying how the final quiz will look. o Use OutSystems' screen update features like event-based actions to immediately reflect changes without requiring page refreshes. 4. API Payload Examples Quiz Generation Request (Sent to API): json Copy code { "policyText": "Your policy document content here.", "difficultyLevel": "medium", "questionFormat": "multipleChoice", "numQuestions": 10 } Quiz Customization Request (After user edits): json Copy code { "quizId": "12345", "questions": [ { "questionId": "q1", "questionText": "Updated question?", "answers": ["Answer 1", "Answer 2", "Answer 3"], "correctAnswer": "Answer 2", "explanation": "This is why Answer 2 is correct." }, { "questionId": "q2", "questionText": "New question format?", "questionType": "trueFalse", "correctAnswer": "true" } ] } 5. Storing and Reporting Results Store quiz customization and results in OutSystems' entities for: o Storing custom questions and answers. o Storing quiz results and employee performance. o Generating reports on quiz attempts, scores, and completion. By building these customizable features on the frontend while interacting with the backend API, you can create a flexible and intuitive quiz generation and editing experience within OutSystems.