Use AI To Create Mock Exam

Introduction:

 
Whether you’re on your path to earning a university degree, pursuing a professional certification, or simply aiming to excel in general purpose exams, the significance of mock exams cannot be overstated. These simulated mock exams play a crucial role in building the confidence required to face the real exam with ease. At kno2gether.com, we have leveraged the power of advanced artificial intelligence to produce a dynamic mock exam that revolutionizes exam preparation. In this article, we will delve into the technical aspects involved in crafting this groundbreaking solution, focusing specifically on how our innovative use of AI technology and data-driven approaches culminated in the creation of our very first AI based mock exam system for the infamously challenging “Life in the UK” test.

 

                                                            Try out our FREE AI-Generated Mock Test.
 

Training AI Model With Custom Knowledge:

 

To create an outstanding mock exam experience, we’ve integrated the cutting-edge AI training platform developed by berry.ai. Our goal was to make the training process simple and effective, using the comprehensive life in the UK study guide. By harnessing the power of this platform, we’ve empowered our AI model to fully grasp and understand crucial concepts, enabling it to generate relevant questions and accurate answers seamlessly. This remarkable achievement was made possible thanks to berry.ai’s generosity in providing us with 10,000 complimentary messages, spread over a span of 90 days. This ensured that our model received effective training and fine-tuning. 

If you’re interested in trying it out, simply visit https://play.berry.ai/ and register yourself. You can upload your document using the file upload button and within a few minutes, your custom GPT chatbot system will be ready, tailored specifically to the size of your document. Additionally, berry.ai also offers an API for anyone looking to utilize it for their own projects.

 

Generating Random Questions:

 
Utilizing the cutting-edge technology of berry.ai’s API, we revolutionized our system by harnessing the power of artificial intelligence. By seamlessly integrating this API, we effortlessly tapped into an incredible AI model capable of generating a wide array of thought-provoking questions. These mock exam questions were designed to encompass multiple-choice options and provide correct answers. With this innovative approach, we are now able to create a diverse range of questions that cover various sections of our comprehensive study guide.

 

Snippet of our python script which pulls the questions and answers are as below.

import requests
import json
import re

 

url = “https://api.berri.ai/query”

 

querystring = {
“user_email”: [email protected],
“instance_id”: “**************”,
“query”: “Ask me 10 questions with 4 choice and 1 answer from different
sections in this book with answers in the end”,
“model”: “gpt-3.5-turbo”,
“top_k”: “10”
}

 

json_data = requests.get(url, params=querystring)

 

# # Parse the JSON data
data = json.loads(json_data.text)

 

# Access the “response” element
response = data[“response”]

 

print(response)
 
 e

Click here to check our Youtube Transcript Tool

Storing Questions and Answers:

 

To manage the generated question-answer pairs effectively, we developed a robust database. This allowed us to store and organize the questions and answers systematically, ensuring quick and reliable access. The database became the backbone of our mock exam, enabling users to access a vast pool of questions.

Below is snippet of our python script which continuously updates the database with questions and answers:

# Extract questions, options, and answers from the response
questions = re.findall(question_regex, response)
options = re.findall(options_regex, response)
answers = re.findall(answer_regex, response)
# SQL queries to insert questions and answers
insert_question_query = “INSERT INTO questions (question_text) VALUES (%s);”
# insert_answer_query
#= “INSERT INTO answers (question_id, answer_text, is_correct) VALUES (%s, %s, %s);”
# Execute the SQL queries for each question

 

option_start = 0
for i in range(len(questions)):
    question_text = questions[i]
    option_indices = range(i * 5, (i * 5) + 4)
    question_options = [options[idx] for idx in option_indices if idx < len(options)]
    question_answer = answers[i]

 

    # Insert the question into the database
    question_values = (question_text,)
    # Execute the insert query for the question
    print(“Executing Question query:”, insert_question_query, question_values)
   
    # Get the question ID
    question_id = i + 1

 

    for option in question_options:
        is_correct = option.strip().startswith(question_answer)
       
        option_query = f“INSERT INTO answers (question_id, answer_text, is_correct)
VALUES ({question_id}, ‘{option}‘, {is_correct});”
        print(“Executing Options query:”, option_query)

 

User-Friendly WordPress Widget:

 

To enhance the user experience, next we designed a user-friendly WordPress widget that integrates seamlessly with our website. The widget dynamically loads random questions from the database, providing users with an engaging and interactive practice experience. With each interaction, users receive a unique set of questions, making their preparation more comprehensive.

 We used ChatGPT to create the widget.

Here’s the prompt we used to create the widget:

Prompt 1:

 

I have a wordpress website. I want to create a new widget in a page where users can take mock test on topic. The widget should query database and picks up question randomly and show in the page. Once user selects an answer, it should immediately show if it's correct or not.
Help me select best database and help me create the widget.

Response 1:
<Initially Chat GPT Responds with Steps >
Prompt 2:
Help me create each steps with appropriate code

This has helped us create entire Widget. There were subsequent prompts after it based on ChatGPT response. If you need the entire prompt. Please put your comments and I’ll share it in the github page.

 

Up-to-dated questions:

 

Making sure the accuracy and relevance of the mock test, we implemented a Python script that regularly queries the Berry.ai knowledge base. By running this script in the background, our system stays updated with any changes or additions made to the study guide. This continuous learning approach ensures that the questions generated by the AI model remain aligned with the latest information.

Limitations and Notes:

 

It is important to acknowledge that as the questions and answers are generated by AI, there may be occasional incorrect answers or outdated information. We used the Life in the UK Study Guide version 3 for training, which may not include certain recent developments, such as the unforeseen death of the Queen. However, based on our recent exam experience, no questions on that specific topic have been observed. We are committed to retraining our AI system as soon as a new study guide becomes available to ensure the highest level of accuracy and relevance.

You can use this guide to create your own Mock exam for any test you’re preparing for. Alternatively, you can contact us to make us create the test for you. Just submit your query using this form and with enough public interest we’ll create it for free. 

 

Thank you for joining us on this technical adventure, and we hope our AI-powered Life in the UK Mock Test contributes to your success in the actual exam.

 

You can help me maintain the website and continue develop such tools for everyone’s benefit.  Help me with your valuable feedback.

Top
Grab Your Daily Cyber Bites!
Get the latest Cyber news, breaches, hacks & research insights with access to
Free Security Tools & 300+ Power Prompts For Free
icon
Grab Your Daily AI Bites!
Get the latest AI news, tools & research insights with access to
200+ Power Prompts For Free
icon
0
Would love your thoughts, please comment.x
()
x