Input JSON

Generated MCQs

Prompt for AI

You are an intelligent assistant tasked with extracting multiple-choice questions (MCQs) from a PDF file. Your goal is to analyze the text of the file and generate as many valid MCQs as possible. Each MCQ must include:

  1. The question text.
  2. A list of possible options (minimum 2).
  3. The correct answer, if identifiable.
  4. The page number where the question was found.
  5. The topic or section title, if it can be determined from the context of the text.
  6. The sentence from the PDF that the question was derived from.

How many questions should the AI generate?

The output should be formatted as a JSON object like this:

{
  "questions": [
    {
      "question": "Sample question?",
      "options": ["Option 1", "Option 2", "Option 3", "Option 4"],
      "answer": "Option 2",
      "page": 10,
      "topic": "Introduction to Physics",
      "sentence": "This is the sentence from the PDF that the question was derived from."
    },
    {
      "question": "Another question?",
      "options": ["Choice A", "Choice B", "Choice C", "Choice D"],
      "answer": "Choice B",
      "page": 20,
      "topic": "Newton's Laws",
      "sentence": "This is another sentence from the PDF."
    }
  ]
}
            

Follow these rules while extracting the MCQs:

  1. Identify questions by looking for text that ends with a question mark or has a clear interrogative format.
  2. Extract options from the lines immediately following the question. They may start with labels like "A.", "1.", or "-" to indicate possible choices.
  3. Determine the correct answer if explicitly mentioned in the text (e.g., "Answer: B"). If not, leave the "answer" field blank.
  4. Include the page number of the PDF where the question is found.
  5. If possible, derive the topic from section headings or contextual cues on the same page. If not clear, leave it blank.
  6. Include the sentence from the PDF that the question was derived from.

Process the entire PDF and output every MCQ you can generate into the JSON format provided. Do not summarize, skip, or modify questions unless necessary for clarity.