From 2e6d69d00c272cc696d23afb8e7d64e9892374cb Mon Sep 17 00:00:00 2001 From: Mukesh A <132742860+MukeshAofficial@users.noreply.github.com> Date: Mon, 10 Mar 2025 18:23:46 +0530 Subject: [PATCH 1/9] Update __init__.py --- educhain/models/__init__.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/educhain/models/__init__.py b/educhain/models/__init__.py index 431642d..997a86f 100644 --- a/educhain/models/__init__.py +++ b/educhain/models/__init__.py @@ -1,6 +1,7 @@ from .base_models import BaseQuestion, QuestionList -from .qna_models import (MultipleChoiceQuestion, ShortAnswerQuestion, - TrueFalseQuestion, FillInBlankQuestion, MCQList, - ShortAnswerQuestionList, TrueFalseQuestionList, - FillInBlankQuestionList, Option, MCQMath, MCQListMath) -from .content_models import ContentElement, SubTopic, MainTopic, LessonPlan,Flashcard, FlashcardSet +from .qna_models import ( + MultipleChoiceQuestion, ShortAnswerQuestion, TrueFalseQuestion, FillInBlankQuestion, + MCQList, ShortAnswerQuestionList, TrueFalseQuestionList, FillInBlankQuestionList, + Option, MCQMath, MCQListMath, SanityCheckResult, SanityCheckSummary +) +from .content_models import ContentElement, SubTopic, MainTopic, LessonPlan, Flashcard, FlashcardSet From 978d8ebcbe350d06305cf179999aec7a203751c8 Mon Sep 17 00:00:00 2001 From: Mukesh A <132742860+MukeshAofficial@users.noreply.github.com> Date: Mon, 10 Mar 2025 18:32:49 +0530 Subject: [PATCH 2/9] Update qna_models.py --- educhain/models/qna_models.py | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/educhain/models/qna_models.py b/educhain/models/qna_models.py index 760942e..2198de3 100644 --- a/educhain/models/qna_models.py +++ b/educhain/models/qna_models.py @@ -150,3 +150,41 @@ class SpeechInstructions(BaseModel): num_questions: Optional[int] = 5 custom_instructions: Optional[str] = None detected_language: Optional[str] = "english" + + +class SanityCheckResult(BaseModel): + question: str = Field(..., description="The question being evaluated") + answer: str = Field(..., description="The correct answer") + options: Optional[List[str]] = Field(None, description="Options if MCQ, else None") + keywords: Optional[List[str]] = Field(None, description="Keywords if Short Answer, else None") + answer_correctness: str = Field(..., description="Correct or Incorrect") + question_clarity: str = Field(..., description="Clear and Correct or Needs Improvement") + distractor_plausibility: str = Field(..., description="Plausible Distractors, Implausible Distractors, or N/A") + passed: bool = Field(..., description="Whether the question passed the sanity check") + +class SanityCheckSummary(BaseModel): + results: List[SanityCheckResult] = Field(..., description="List of individual sanity check results") + total_questions: int = Field(..., description="Total number of questions checked") + passed_questions: int = Field(..., description="Number of questions that passed") + failed_questions: int = Field(..., description="Number of questions that failed") + + def show(self): + print("=" * 80) + print(f"Sanity Check Summary") + print(f"Total Questions: {self.total_questions}") + print(f"Passed: {self.passed_questions} | Failed: {self.failed_questions}") + print("=" * 80) + for i, result in enumerate(self.results, 1): + print(f"\nQuestion {i}: {result.question}") + print(f"Answer: {result.answer}") + if result.options: + print("Options:") + for j, opt in enumerate(result.options): + print(f" {chr(65+j)}. {opt}") + if result.keywords: + print(f"Keywords: {', '.join(result.keywords)}") + print(f"Answer Correctness: {result.answer_correctness}") + print(f"Question Clarity: {result.question_clarity}") + print(f"Distractor Plausibility: {result.distractor_plausibility}") + print(f"Result: {'Passed' if result.passed else 'Failed'}") + print("=" * 80) From 4ee820ac1015413c66d6c8f852972dce08620afe Mon Sep 17 00:00:00 2001 From: Mukesh A <132742860+MukeshAofficial@users.noreply.github.com> Date: Mon, 10 Mar 2025 19:13:18 +0530 Subject: [PATCH 3/9] Update qna_engine.py --- educhain/engines/qna_engine.py | 464 ++++++++++++++++++++++++++++++--- 1 file changed, 430 insertions(+), 34 deletions(-) diff --git a/educhain/engines/qna_engine.py b/educhain/engines/qna_engine.py index b6de944..45f882f 100644 --- a/educhain/engines/qna_engine.py +++ b/educhain/engines/qna_engine.py @@ -1,15 +1,13 @@ -# educhain/engines/qna_engine.py - from typing import Optional, Type, Any, List, Literal, Union, Tuple, Dict from pydantic import BaseModel, Field, ValidationError from langchain_openai import ChatOpenAI, OpenAIEmbeddings from datetime import datetime + import concurrent.futures import json from pathlib import Path from tqdm import tqdm from tenacity import retry, stop_after_attempt, wait_exponential -from langchain_openai import ChatOpenAI, OpenAIEmbeddings from langchain.prompts import PromptTemplate from langchain.chains import LLMChain, RetrievalQA, LLMMathChain from langchain.output_parsers import PydanticOutputParser @@ -25,7 +23,9 @@ from educhain.models.qna_models import ( MCQList, ShortAnswerQuestionList, TrueFalseQuestionList, FillInBlankQuestionList, MCQListMath, Option ,SolvedDoubt, SpeechInstructions, - VisualMCQList, VisualMCQ, BulkMCQ, BulkMCQList + VisualMCQList, VisualMCQ, BulkMCQ, BulkMCQList, + SanityCheckSummary, SanityCheckResult, + MultipleChoiceQuestion, ShortAnswerQuestion, TrueFalseQuestion, FillInBlankQuestion ) from educhain.utils.loaders import PdfFileLoader, UrlLoader from educhain.utils.output_formatter import OutputFormatter @@ -38,10 +38,13 @@ import pandas as pd import dataframe_image as dfi from IPython.display import display, HTML +import time +import csv import random + QuestionType = Literal["Multiple Choice", "Short Answer", "True/False", "Fill in the Blank"] OutputFormatType = Literal["pdf", "csv"] @@ -117,7 +120,24 @@ def _initialize_llm(self, llm_config: LLMConfig): base_url=llm_config.base_url, default_headers=llm_config.default_headers ) - + def _get_response_model(self, question_type: QuestionType): + models = { + "Multiple Choice": MCQList, + "Short Answer": ShortAnswerQuestionList, + "True/False": TrueFalseQuestionList, + "Fill in the Blank": FillInBlankQuestionList + } + return models.get(question_type, MCQList) + + def _get_single_response_model(self, question_type: QuestionType): + models = { + "Multiple Choice": MultipleChoiceQuestion, + "Short Answer": ShortAnswerQuestion, + "True/False": TrueFalseQuestion, + "Fill in the Blank": FillInBlankQuestion + } + return models.get(question_type, MultipleChoiceQuestion) + def _get_parser_and_model(self, question_type: QuestionType, response_model: Optional[Type[Any]] = None): if response_model: return PydanticOutputParser(pydantic_object=response_model), response_model @@ -351,42 +371,59 @@ def generate_questions( prompt_template: Optional[str] = None, custom_instructions: Optional[str] = None, response_model: Optional[Type[Any]] = None, - output_format: Optional[OutputFormatType] = None, + batch_size: int = 5, + max_retries_per_batch: int = 3, **kwargs ) -> Any: - parser, model = self._get_parser_and_model(question_type, response_model) - format_instructions = parser.get_format_instructions() - template = self._get_prompt_template(question_type, prompt_template) - - if custom_instructions: - template += f"\n\nAdditional Instructions:\n{custom_instructions}" - - template += "\n\nThe response should be in JSON format.\n{format_instructions}" - - question_prompt = PromptTemplate( - input_variables=["num", "topic"], - template=template, - partial_variables={"format_instructions": format_instructions} - ) + """ + Generate the requested number of questions in batches with automated retries. + """ + response_model = response_model or self._get_response_model(question_type) + accumulated_questions = [] - question_chain = question_prompt | self.llm - results = question_chain.invoke( - {"num": num, "topic": topic, **kwargs}, - ) - results = results.content + while len(accumulated_questions) < num: + remaining = num - len(accumulated_questions) + current_batch_size = min(batch_size, remaining) - try: - structured_output = parser.parse(results) + batch_success = False + for attempt in range(max_retries_per_batch): + try: + batch_result = self._generate_batch( + topic=topic, + num=current_batch_size, + question_type=question_type, + prompt_template=prompt_template, + custom_instructions=custom_instructions, + response_model=response_model, + **kwargs + ) + if batch_result and hasattr(batch_result, 'questions') and batch_result.questions: + accumulated_questions.extend(batch_result.questions) + print(f"Batch attempt {attempt + 1}: Generated {len(batch_result.questions)} questions") + batch_success = True + break + else: + raise ValueError("Batch generated no questions") + except Exception as e: + print(f"Batch attempt {attempt + 1} failed: {e}") + if attempt < max_retries_per_batch - 1: + print(f"Retrying batch... ({attempt + 2}/{max_retries_per_batch})") + time.sleep(1) # Backoff + else: + print(f"Max retries ({max_retries_per_batch}) reached for this batch.") - if output_format: - self._handle_output_format(structured_output, output_format) + if not batch_success and current_batch_size > 1: + print(f"Reducing batch size from {current_batch_size} to {current_batch_size - 1}") + batch_size = max(1, current_batch_size - 1) + elif not batch_success: + print("Even batch size of 1 failed. Continuing with partial results.") + break + if len(accumulated_questions) > num: + accumulated_questions = accumulated_questions[:num] - return structured_output - except Exception as e: - print(f"Error parsing output in generate_questions: {e}") - print("Raw output:") - return model() + print(f"Total generated: {len(accumulated_questions)} out of {num} requested") + return response_model(questions=accumulated_questions) def generate_questions_from_data( @@ -1167,3 +1204,362 @@ def solve_doubt( ) + def _generate_batch( + self, + topic: str, + num: int, + question_type: QuestionType, + prompt_template: Optional[str], + custom_instructions: Optional[str], + response_model: Type[Any], + **kwargs + ) -> Any: + """Generate a single batch of questions.""" + parser = PydanticOutputParser(pydantic_object=response_model) + format_instructions = parser.get_format_instructions() + + if prompt_template is None: + prompt_template = """ + Generate {num} {question_type} question(s) based on the given topic. + Topic: {topic} + + For each question, provide: + 1. The question + 2. The correct answer + 3. An explanation (optional) + {additional_fields} + + Ensure the questions are clear, educational, and relevant to the topic. + """ + additional_fields = { + "Multiple Choice": "4. A list of options (including the correct answer)", + "Short Answer": "4. A list of relevant keywords", + "True/False": "4. The correct answer as a boolean (true/false)", + "Fill in the Blank": "4. The word or phrase to be filled in the blank" + }.get(question_type, "") + prompt_template = prompt_template.replace("{additional_fields}", additional_fields) + + if custom_instructions: + prompt_template += f"\n\nAdditional Instructions:\n{custom_instructions}" + + prompt_template += "\n\nThe response should be in JSON format.\n{format_instructions}" + + question_prompt = PromptTemplate( + input_variables=["num", "topic", "question_type"], + template=prompt_template, + partial_variables={"format_instructions": format_instructions} + ) + + question_chain = question_prompt | self.llm + results = question_chain.invoke({"num": num, "topic": topic, "question_type": question_type, **kwargs}) + results = results.content + + try: + structured_output = parser.parse(results) + return structured_output + except Exception as e: + print(f"Error parsing batch output: {e}") + print("Raw output:", results) + raise + + # Load Custom Questions from CSV + def load_questions_from_csv( + self, + csv_path: str, + question_type: QuestionType = "Multiple Choice", + question_col: str = "Question Text", + answer_col: str = "Correct Answer", + options_cols: Optional[list] = None, + explanation_col: Optional[str] = "Explanation" + ) -> Any: + """ + Load questions from a CSV file and convert them into a compatible question list format. + """ + response_model = self._get_response_model(question_type) + single_response_model = self._get_single_response_model(question_type) + questions = [] + + with open(csv_path, 'r', encoding='utf-8') as csvfile: + reader = csv.DictReader(csvfile) + for row in reader: + try: + if question_type == "Multiple Choice": + options = [row[col] for col in options_cols] if options_cols else [] + question = single_response_model( + question=row[question_col], + answer=row[answer_col], + options=options, + explanation=row.get(explanation_col) + ) + elif question_type == "Short Answer": + question = single_response_model( + question=row[question_col], + answer=row[answer_col], + keywords=row.get(explanation_col, "").split(", ") if explanation_col else [], + explanation=row.get(explanation_col) + ) + elif question_type == "True/False": + question = single_response_model( + question=row[question_col], + answer=row[answer_col].lower() in ["true", "t", "1"], + explanation=row.get(explanation_col) + ) + elif question_type == "Fill in the Blank": + question = single_response_model( + question=row[question_col], + answer=row[answer_col], + blank_word=row[answer_col], + explanation=row.get(explanation_col) + ) + questions.append(question) + except KeyError as e: + print(f"Skipping row due to missing column {e}: {row}") + except Exception as e: + print(f"Error processing row: {e} - {row}") + + return response_model(questions=questions) + + # Correct Failed Questions + def _correct_question( + self, + failed_result: SanityCheckResult, + question_type: QuestionType, + topic: str, + llm: Optional[Any] = None + ) -> Any: + """Correct a failed question with retries.""" + llm_to_use = llm if llm is not None else self.llm + response_model = self._get_single_response_model(question_type) + parser = PydanticOutputParser(pydantic_object=response_model) + format_instructions = parser.get_format_instructions() + + prompt_template = """ + The following {question_type} question failed a sanity check. Please revise it based on the feedback provided. + + Original Question: + Question: {question} + Answer: {answer} + {additional_fields} + + Sanity Check Feedback: + - Answer Correctness: {answer_correctness} + - Question Clarity: {question_clarity} + - Distractor Plausibility: {distractor_plausibility} + + Topic: {topic} + + Revise the question to: + 1. Ensure the answer is correct + 2. Make the question clear and grammatically correct + 3. {revision_guidance} + 4. Provide an explanation if not already present + + Output the revised question in JSON format: + {format_instructions} + """ + + additional_fields = "" + if failed_result.options: + additional_fields = f"Options:\n" + "\n".join(failed_result.options) + elif failed_result.keywords: + additional_fields = f"Keywords: {', '.join(failed_result.keywords)}" + + revision_guidance = { + "Multiple Choice": "Ensure distractors are plausible but clearly wrong", + "Short Answer": "Ensure keywords are relevant and comprehensive", + "True/False": "Ensure the statement is unambiguous", + "Fill in the Blank": "Ensure the blank fits naturally and has a unique correct answer" + }.get(question_type, "") + + prompt = PromptTemplate( + input_variables=["question", "answer", "additional_fields", "answer_correctness", + "question_clarity", "distractor_plausibility", "topic", "question_type"], + template=prompt_template, + partial_variables={"format_instructions": format_instructions, "revision_guidance": revision_guidance} + ) + + max_retries = 3 + for attempt in range(max_retries): + try: + correction_chain = prompt | llm_to_use + results = correction_chain.invoke({ + "question": failed_result.question, + "answer": failed_result.answer, + "additional_fields": additional_fields, + "answer_correctness": failed_result.answer_correctness, + "question_clarity": failed_result.question_clarity, + "distractor_plausibility": failed_result.distractor_plausibility, + "topic": topic, + "question_type": question_type + }) + results = results.content + corrected_question = parser.parse(results) + return corrected_question + except Exception as e: + print(f"Correction attempt {attempt + 1} failed: {e}") + if attempt < max_retries - 1: + print(f"Retrying correction... ({attempt + 2}/{max_retries})") + time.sleep(1) + else: + print("Max retries reached for correction. Returning None.") + return None + + # Sanity Check with Retries (for both Educhain-generated and custom questions) + def sanity_check( + self, + question_list: Any, + topic: str = "Unknown Topic", + custom_instructions: Optional[str] = None, + auto_correct: bool = True, + llm: Optional[Any] = None, + batch_size: int = 10, + max_retries_per_batch: int = 3 + ) -> SanityCheckSummary: + """ + Perform a sanity check on a list of questions with retries and optional auto-correction. + Updates question_list in-place if auto_correct is True. + """ + if not hasattr(question_list, 'questions') or not question_list.questions: + raise ValueError("Input must be a valid question list with at least one question") + + llm_to_use = llm if llm is not None else self.llm + parser = PydanticOutputParser(pydantic_object=SanityCheckSummary) + format_instructions = parser.get_format_instructions() + + question_type = type(question_list.questions[0]).__name__.replace("Question", "") + response_model = self._get_response_model(question_type) + + questions_data = [] + for q in question_list.questions: + options = getattr(q, 'options', None) + keywords = getattr(q, 'keywords', None) + answer = str(q.answer) if question_type == "TrueFalse" else q.answer + questions_data.append({ + "type": question_type, + "question_text": q.question, + "answer_text": answer, + "options": options, + "keywords": keywords, + "original_question": q + }) + + all_results = [] + for i in range(0, len(questions_data), batch_size): + batch_questions = questions_data[i:i + batch_size] + print(f"Processing sanity check batch {i // batch_size + 1} ({len(batch_questions)} questions)") + + prompt_template = """ + Perform a sanity check on the following questions about {topic}. + For each question: + 1. Answer Correctness: Verify if the provided answer is mathematically correct. Respond with 'Correct' or 'Incorrect'. + 2. Question Clarity: Is the question clear and grammatically correct? Respond with 'Clear and Correct' or 'Needs Improvement'. + 3. Distractor Plausibility (if applicable): For Multiple Choice, are distractors plausible but clearly wrong? Respond with 'Plausible Distractors' or 'Implausible Distractors'. For other types, respond with 'N/A'. + + When checking arithmetic (e.g., fractions): + - For addition/subtraction, ensure common denominators are used correctly. + - For multiplication, multiply numerators and denominators directly. + - For division, multiply by the reciprocal. + - Simplify fractions and compare with the provided answer. + + Input questions: + {questions_input} + + {custom_instructions} + + Output the response in JSON format with a list of results: + {format_instructions} + """ + + if custom_instructions: + prompt_template = prompt_template.replace("{custom_instructions}", f"Additional Instructions:\n{custom_instructions}") + else: + prompt_template = prompt_template.replace("{custom_instructions}", "") + + questions_input = "" + for j, q in enumerate(batch_questions, i + 1): + questions_input += f"\nQuestion {j} ({q['type']}):\n" + questions_input += f"Question: {q['question_text']}\n" + questions_input += f"Answer: {q['answer_text']}\n" + if q['options']: + options_str = "\n".join(q['options']) + questions_input += f"Options:\n{options_str}\n" + if q['keywords']: + keywords_str = ", ".join(q['keywords']) + questions_input += f"Keywords: {keywords_str}\n" + + prompt = PromptTemplate( + input_variables=["questions_input"], + template=prompt_template, + partial_variables={"format_instructions": format_instructions, "topic": topic} + ) + + batch_success = False + for attempt in range(max_retries_per_batch): + try: + sanity_chain = prompt | llm_to_use + results = sanity_chain.invoke({"questions_input": questions_input}) + results = results.content + batch_output = parser.parse(results) + all_results.extend(batch_output.results) + batch_success = True + break + except Exception as e: + print(f"Sanity check attempt {attempt + 1} failed for batch {i // batch_size + 1}: {e}") + if attempt < max_retries_per_batch - 1: + print(f"Retrying batch... ({attempt + 2}/{max_retries_per_batch})") + time.sleep(1) + else: + print(f"Max retries ({max_retries_per_batch}) reached for this batch.") + batch_results = [ + SanityCheckResult( + question=q["question_text"], + answer=q["answer_text"], + options=q["options"], + keywords=q["keywords"], + answer_correctness="Unknown", + question_clarity="Unknown", + distractor_plausibility="Unknown", + passed=False + ) for q in batch_questions + ] + all_results.extend(batch_results) + + if not batch_success: + print("Batch failed after retries. Continuing with partial results.") + + structured_output = SanityCheckSummary( + results=all_results, + total_questions=len(all_results), + passed_questions=0, + failed_questions=0 + ) + + for result, original_q in zip(structured_output.results, questions_data): + result.options = original_q["options"] + result.keywords = original_q["keywords"] + result.passed = ( + result.answer_correctness == "Correct" and + result.question_clarity == "Clear and Correct" and + (result.distractor_plausibility in ["Plausible Distractors", "N/A"]) + ) + + if auto_correct: + corrected_questions = [] + for i, (result, original_q) in enumerate(zip(structured_output.results, questions_data)): + if not result.passed: + print(f"Correcting failed question {i + 1}: {result.question}") + corrected_q = self._correct_question(result, question_type, topic, llm_to_use) + if corrected_q: + corrected_questions.append(corrected_q) + else: + corrected_questions.append(original_q["original_question"]) + else: + corrected_questions.append(original_q["original_question"]) + + question_list.questions = corrected_questions + print("Re-running sanity check on corrected questions...") + return self.sanity_check(question_list, topic, custom_instructions, auto_correct=False, llm=llm_to_use) + + structured_output.total_questions = len(structured_output.results) + structured_output.passed_questions = sum(1 for r in structured_output.results if r.passed) + structured_output.failed_questions = structured_output.total_questions - structured_output.passed_questions From 4f995d04b67b0cec3cc22ba82af3bd1af5242d4a Mon Sep 17 00:00:00 2001 From: Mukesh A <132742860+MukeshAofficial@users.noreply.github.com> Date: Tue, 11 Mar 2025 19:10:01 +0530 Subject: [PATCH 4/9] Update qna_engine.py --- educhain/engines/qna_engine.py | 45 +++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/educhain/engines/qna_engine.py b/educhain/engines/qna_engine.py index 45f882f..5ccc94a 100644 --- a/educhain/engines/qna_engine.py +++ b/educhain/engines/qna_engine.py @@ -425,7 +425,6 @@ def generate_questions( print(f"Total generated: {len(accumulated_questions)} out of {num} requested") return response_model(questions=accumulated_questions) - def generate_questions_from_data( self, source: str, @@ -1563,3 +1562,47 @@ def sanity_check( structured_output.total_questions = len(structured_output.results) structured_output.passed_questions = sum(1 for r in structured_output.results if r.passed) structured_output.failed_questions = structured_output.total_questions - structured_output.passed_questions + + return structured_output + +# Extending SanityCheckSummary to include a show() method +from typing import List +from pydantic import BaseModel + +class SanityCheckResult(BaseModel): + question: str + answer: str + options: Optional[List[str]] = None + keywords: Optional[List[str]] = None + answer_correctness: str + question_clarity: str + distractor_plausibility: str + passed: bool + +class SanityCheckSummary(BaseModel): + results: List[SanityCheckResult] + total_questions: int + passed_questions: int + failed_questions: int + + def show(self): + """Displays the sanitized questions with their options and sanity check results.""" + print("\nSanity Check Summary:") + print(f"Total Questions: {self.total_questions}") + print(f"Passed Questions: {self.passed_questions}") + print(f"Failed Questions: {self.failed_questions}\n") + + for i, result in enumerate(self.results): + print(f"Question {i + 1}:") + print(f" Question Text: {result.question}") + print(f" Answer: {result.answer}") + + if result.options: + print(" Options:") + for option in result.options: + print(f" - {option}") + + print(f" Answer Correctness: {result.answer_correctness}") + print(f" Question Clarity: {result.question_clarity}") + print(f" Distractor Plausibility: {result.distractor_plausibility}") + print(f" Passed: {result.passed}\n") From e73a406720dcde54e72343e25321c65afd1bb0b0 Mon Sep 17 00:00:00 2001 From: Shubhwithai Date: Thu, 17 Apr 2025 15:15:16 +0530 Subject: [PATCH 5/9] updating rag feature --- educhain/engines/qna_engine.py | 55 +++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/educhain/engines/qna_engine.py b/educhain/engines/qna_engine.py index 2314da2..4ac8f50 100644 --- a/educhain/engines/qna_engine.py +++ b/educhain/engines/qna_engine.py @@ -477,23 +477,25 @@ def generate_questions_with_rag( template = self._get_prompt_template(question_type, prompt_template) + # Create a base template with format instructions + final_template = template + "\n\nThe response should be in JSON format.\n{format_instructions}\n" - prompt_template += """ - Learning Objective: {learning_objective} - Difficulty Level: {difficulty_level} - - Ensure that the questions are relevant to the learning objective and match the specified difficulty level. - - The response should be in JSON format. - {format_instructions} - """ + # Only add learning objective and difficulty level if they are provided + if learning_objective: + final_template += f"\nLearning Objective: {{learning_objective}}\n" + + if difficulty_level: + final_template += f"Difficulty Level: {{difficulty_level}}\n" + + if learning_objective or difficulty_level: + final_template += "\nEnsure that the questions are relevant to the learning objective and match the specified difficulty level.\n" if custom_instructions: - prompt_template += f"\n\nAdditional Instructions:\n{custom_instructions}" + final_template += f"\nAdditional Instructions:\n{{custom_instructions}}\n" question_prompt = PromptTemplate( - input_variables=["num", "topic", "learning_objective", "difficulty_level"], - template=prompt_template, + input_variables=["num", "topic", "learning_objective", "difficulty_level", "custom_instructions"], + template=final_template, partial_variables={"format_instructions": format_instructions} ) @@ -502,6 +504,7 @@ def generate_questions_with_rag( topic=content[:1000], learning_objective=learning_objective, difficulty_level=difficulty_level, + custom_instructions=custom_instructions or "", **kwargs ) @@ -893,7 +896,7 @@ def _write_questions_to_csv(self, questions, csv_filepath, question_model, appen existing_questions = set() if check_duplicates and append: existing_questions = self._read_questions_from_csv(csv_filepath) - + # Dynamically determine fieldnames from the model model_fields = list(question_model.__annotations__.keys()) @@ -911,19 +914,38 @@ def _write_questions_to_csv(self, questions, csv_filepath, question_model, appen for question in questions: q_dict = question.dict() if hasattr(question, 'dict') else question - # Check for duplicates if needed + # Check for duplicates duplicate = False - if check_duplicates: + if existing_questions: # Try different common field names for question text question_fields = ['question', 'question_text', 'stem', 'prompt'] for field in question_fields: if field in q_dict and q_dict[field] and q_dict[field].strip() in existing_questions: duplicate = True break - + if duplicate: continue + # Add metadata if missing + if 'metadata' not in q_dict and hasattr(question_model, '__fields__') and 'metadata' in question_model.__fields__: + q_dict['metadata'] = { + "topic": combo["topic"], + "subtopic": combo["subtopic"], + "learning_objective": combo["learning_objective"] + } + + validated_question = self._validate_individual_question(q_dict, question_model=question_model) + if validated_question: + batch_validated_questions.append(validated_question) + + # Add to existing questions to prevent duplicates in future batches + if csv_output_file: + for field in ['question', 'question_text', 'stem', 'prompt']: + if field in q_dict and q_dict[field]: + existing_questions.add(q_dict[field].strip()) + break + # Process complex fields to convert to JSON strings row_data = {} @@ -1692,4 +1714,3 @@ def bulk_generate_questions( print(f"Questions continuously saved to: {csv_output_file}") return question_list_model(questions=all_questions), output_file, total_generated, failed_batches_count - From 977155ae197a5ce582d048ea983ae20d6b9ac3b0 Mon Sep 17 00:00:00 2001 From: Shubhwithai Date: Thu, 17 Apr 2025 15:41:37 +0530 Subject: [PATCH 6/9] updating rag feature --- educhain/engines/qna_engine.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/educhain/engines/qna_engine.py b/educhain/engines/qna_engine.py index 4ac8f50..36a3946 100644 --- a/educhain/engines/qna_engine.py +++ b/educhain/engines/qna_engine.py @@ -459,8 +459,8 @@ def generate_questions_with_rag( prompt_template: Optional[str] = None, custom_instructions: Optional[str] = None, response_model: Optional[Type[Any]] = None, - learning_objective: str = "", - difficulty_level: str = "", + learning_objective: Optional[str] = None, + difficulty_level: Optional[str] = None, output_format: Optional[OutputFormatType] = None, **kwargs ) -> Any: @@ -502,8 +502,8 @@ def generate_questions_with_rag( query = question_prompt.format( num=num, topic=content[:1000], - learning_objective=learning_objective, - difficulty_level=difficulty_level, + learning_objective=learning_objective or "", + difficulty_level=difficulty_level or "", custom_instructions=custom_instructions or "", **kwargs ) @@ -787,7 +787,7 @@ def solve_doubt( custom_instructions: Additional instructions for analysis detail_level: Level of detail in explanation focus_areas: Specific aspects to focus on - **kwargs: Additional parameters for the model + **kwargs: Additional parameters to pass to the model Returns: SolvedDoubt: Object containing explanation, steps, and additional notes From c87885700f37a00251b163cab1e75aad92896d9e Mon Sep 17 00:00:00 2001 From: Shubhwithai Date: Thu, 17 Apr 2025 17:16:24 +0530 Subject: [PATCH 7/9] correct rag feature --- educhain/engines/qna_engine.py | 35 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/educhain/engines/qna_engine.py b/educhain/engines/qna_engine.py index 36a3946..7edb57c 100644 --- a/educhain/engines/qna_engine.py +++ b/educhain/engines/qna_engine.py @@ -477,34 +477,34 @@ def generate_questions_with_rag( template = self._get_prompt_template(question_type, prompt_template) - # Create a base template with format instructions - final_template = template + "\n\nThe response should be in JSON format.\n{format_instructions}\n" - - # Only add learning objective and difficulty level if they are provided - if learning_objective: - final_template += f"\nLearning Objective: {{learning_objective}}\n" - - if difficulty_level: - final_template += f"Difficulty Level: {{difficulty_level}}\n" - + # Add learning objective and difficulty level if provided if learning_objective or difficulty_level: - final_template += "\nEnsure that the questions are relevant to the learning objective and match the specified difficulty level.\n" + template += """ + Learning Objective: {learning_objective} + Difficulty Level: {difficulty_level} + + Ensure that the questions are relevant to the learning objective and match the specified difficulty level. + """ + + template += """ + The response should be in JSON format. + {format_instructions} + """ if custom_instructions: - final_template += f"\nAdditional Instructions:\n{{custom_instructions}}\n" + template += f"\n\nAdditional Instructions:\n{custom_instructions}" question_prompt = PromptTemplate( - input_variables=["num", "topic", "learning_objective", "difficulty_level", "custom_instructions"], - template=final_template, + input_variables=["num", "topic", "learning_objective", "difficulty_level"], + template=template, partial_variables={"format_instructions": format_instructions} ) query = question_prompt.format( num=num, topic=content[:1000], - learning_objective=learning_objective or "", - difficulty_level=difficulty_level or "", - custom_instructions=custom_instructions or "", + learning_objective=learning_objective, + difficulty_level=difficulty_level, **kwargs ) @@ -516,7 +516,6 @@ def generate_questions_with_rag( if output_format: self._handle_output_format(structured_output, output_format) - return structured_output except Exception as e: print(f"Error parsing output in generate_questions_with_rag: {e}") From 6bdc2d9734489da380f953e3d28d68e8ec766ea7 Mon Sep 17 00:00:00 2001 From: Shubhwithai Date: Thu, 17 Apr 2025 17:30:47 +0530 Subject: [PATCH 8/9] correct rag feature --- educhain/engines/qna_engine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/educhain/engines/qna_engine.py b/educhain/engines/qna_engine.py index 7edb57c..2c78b1b 100644 --- a/educhain/engines/qna_engine.py +++ b/educhain/engines/qna_engine.py @@ -204,7 +204,7 @@ def _create_vector_store(self, content: str) -> Chroma: if self.embeddings is None: self.embeddings = OpenAIEmbeddings() - text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=0) + text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200) texts = text_splitter.split_text(content) vectorstore = Chroma.from_texts(texts, self.embeddings) From 84c4e6bd471d3cf3ec756cc69a19658d9e3cf21d Mon Sep 17 00:00:00 2001 From: Shubhwithai Date: Thu, 17 Apr 2025 18:55:25 +0530 Subject: [PATCH 9/9] updated starter Guide --- README.md | 2 +- .../Starter_guide_question_generation.ipynb | 513 ---- .../starters/educhain_Starter_guide_v3.ipynb | 2241 ++++++++++------- 3 files changed, 1388 insertions(+), 1368 deletions(-) delete mode 100644 cookbook/starters/Starter_guide_question_generation.ipynb diff --git a/README.md b/README.md index 759c6b1..de5fa38 100644 --- a/README.md +++ b/README.md @@ -263,7 +263,7 @@ pip install educhain ## Starter Guide -[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1JNjQz20SRnyRyAN9YtgCzYq4gj8iBTRH?usp=chrome_ntp#scrollTo=UtLn9rOF-gPm) +[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1JNjQz20SRnyRyAN9YtgCzYq4gj8iBTRH?usp=chrome_ntp#scrollTo=VY_TU5FdgQ1e) ### Quick Start diff --git a/cookbook/starters/Starter_guide_question_generation.ipynb b/cookbook/starters/Starter_guide_question_generation.ipynb deleted file mode 100644 index fc36f05..0000000 --- a/cookbook/starters/Starter_guide_question_generation.ipynb +++ /dev/null @@ -1,513 +0,0 @@ -{ - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [] - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "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MuNTE5IDM2MC45NyAyMTEgMzYwWiIgZmlsbD0iIzFDQTRGMSIgc3Ryb2tlPSIjMUNBNEYxIi8+Cjwvc3ZnPgo=)" - ], - "metadata": { - "id": "_PwffyTst_yl" - } - }, - { - "cell_type": "markdown", - "source": [ - "# educhain [![PyPI version](https://badge.fury.io/py/educhain.svg)](https://badge.fury.io/py/educhain)[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)[![Python Versions](https://img.shields.io/pypi/pyversions/educhain.svg)](https://pypi.org/project/educhain/)[![Downloads](https://pepy.tech/badge/educhain)](https://pepy.tech/project/educhain)\n", - "Educhain is a powerful Python package that leverages Generative AI to create engaging and personalized educational content. From generating multiple-choice questions to crafting comprehensive lesson plans, Educhain makes it easy to apply AI in various educational scenarios." - ], - "metadata": { - "id": "gMRnS-TnpcMM" - } - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "wY8k-7NkpTnj", - "outputId": "78c661ad-44f7-407b-b192-dc2874a92aec" - }, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m987.6/987.6 kB\u001b[0m \u001b[31m5.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.2/2.2 MB\u001b[0m \u001b[31m22.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m46.1/46.1 kB\u001b[0m \u001b[31m3.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m328.5/328.5 kB\u001b[0m \u001b[31m20.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.9/1.9 MB\u001b[0m \u001b[31m17.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m232.6/232.6 kB\u001b[0m \u001b[31m15.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m366.5/366.5 kB\u001b[0m \u001b[31m11.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m129.4/129.4 kB\u001b[0m \u001b[31m11.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.1/1.1 MB\u001b[0m \u001b[31m49.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.6/75.6 kB\u001b[0m \u001b[31m7.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.2/49.2 kB\u001b[0m \u001b[31m4.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m77.9/77.9 kB\u001b[0m \u001b[31m6.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m6.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m141.1/141.1 kB\u001b[0m \u001b[31m3.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25h" - ] - } - ], - "source": [ - "!pip install -qU educhain --quiet" - ] - }, - { - "cell_type": "markdown", - "source": [ - "## Set up your API Key\n", - "Default is set to [OPENAI](https://openai.com/)" - ], - "metadata": { - "id": "RE8uyqfrp18f" - } - }, - { - "cell_type": "code", - "source": [ - "import os\n", - "from google.colab import userdata\n", - "\n", - "os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY')" - ], - "metadata": { - "id": "5mv32TwupyUD" - }, - "execution_count": 3, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "Other API KEY Sample Usage" - ], - "metadata": { - "id": "oPgjvGQMqNXl" - } - }, - { - "cell_type": "code", - "source": [ - "from langchain_openai import ChatOpenAI\n", - "from google.colab import userdata\n", - "\n", - "llama3_groq = ChatOpenAI(\n", - " model = \"llama3-70b-8192\",\n", - " openai_api_base = \"https://api.groq.com/openai/v1\",\n", - " openai_api_key = userdata.get(\"GROQ_API_KEY\")\n", - ")" - ], - "metadata": { - "id": "7L4CbYF4qTPv" - }, - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "# Quickstart" - ], - "metadata": { - "id": "gzKZtf-9qbRa" - } - }, - { - "cell_type": "code", - "source": [ - "from educhain import qna_engine\n", - "\n", - "questions = qna_engine.generate_mcq(\n", - " topic=\"Indian History\",\n", - " level=\"Beginner\",\n", - " num=2\n", - ")\n", - "questions.show()\n" - ], - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "RItKCiK1qcdI", - "outputId": "7f515d5e-a3de-469c-f1a9-445d278a22c1" - }, - "execution_count": 6, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Question 1:\n", - "Question: Who was the first Prime Minister of India?\n", - "Options:\n", - " A. Mahatma Gandhi\n", - " B. Indira Gandhi\n", - " C. Jawaharlal Nehru\n", - " D. Sardar Vallabhbhai Patel\n", - "\n", - "Correct Answer: Jawaharlal Nehru\n", - "Explanation: Jawaharlal Nehru served as the first Prime Minister of India from 1947 to 1964.\n", - "\n", - "Question 2:\n", - "Question: When did India gain independence from British rule?\n", - "Options:\n", - " A. 1918\n", - " B. 1947\n", - " C. 1956\n", - " D. 1962\n", - "\n", - "Correct Answer: 1947\n", - "Explanation: India gained independence from British rule on August 15, 1947.\n", - "\n" - ] - } - ] - }, - { - "cell_type": "markdown", - "source": [ - "## Using Custom Prompt Templates 🖊" - ], - "metadata": { - "id": "VlgOUjIqqtFZ" - } - }, - { - "cell_type": "code", - "source": [ - "from educhain import qna_engine\n", - "\n", - "custom_template = \"\"\"\n", - "Generate {num} multiple-choice question (MCQ) based on the given topic and level.\n", - "Provide the question, four answer options, and the correct answer.\n", - "Topic: {topic}\n", - "Learning Objective: {learning_objective}\n", - "Difficulty Level: {difficulty_level}\n", - "\"\"\"\n", - "\n", - "result = qna_engine.generate_mcq(\n", - " topic=\"Python Programming\",\n", - " num=2,\n", - " learning_objective=\"Usage of Python classes\",\n", - " difficulty_level=\"Hard\",\n", - " prompt_template=custom_template,\n", - ")\n", - "\n", - "result.show()" - ], - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "4ucAlYinqgaQ", - "outputId": "2a1178df-3f54-4025-8f12-92b702ea525e" - }, - "execution_count": 8, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Question 1:\n", - "Question: What is the purpose of 'self' in Python classes?\n", - "Options:\n", - " A. To create a new instance of the class\n", - " B. To access global variables\n", - " C. To delete an instance of the class\n", - " D. To refer to the parent class\n", - "\n", - "Correct Answer: To refer to the instance of the class\n", - "Explanation: The 'self' parameter is used to access variables that belong to the class. It is a reference to the instance of the class.\n", - "\n", - "Question 2:\n", - "Question: What is method overloading in Python classes?\n", - "Options:\n", - " A. Creating multiple methods with the same name and same parameters\n", - " B. Creating a method with a different name than the class\n", - " C. Creating a method that does not return any value\n", - " D. Creating a method that is private to the class\n", - "\n", - "Correct Answer: Creating multiple methods with the same name but different parameters\n", - "Explanation: Method overloading allows different methods to have the same name but different parameters or different types of parameters.\n", - "\n" - ] - } - ] - }, - { - "cell_type": "markdown", - "source": [ - "## Generate questions from data sources 📚" - ], - "metadata": { - "id": "XfcagWyUq8fN" - } - }, - { - "cell_type": "code", - "source": [ - "from educhain import qna_engine\n", - "\n", - "questions = qna_engine.generate_mcqs_from_data(\n", - " source=\"https://www.buildfastwithai.com/\", #Supported sources = \"url\",\"pdf\",\"text\"\n", - " source_type=\"url\", #Supported types = \"url\",\"pdf\",\"text\"\n", - " num=2,\n", - " learning_objective=\"Understand key concepts\",\n", - " difficulty_level=\"Intermediate\"\n", - ")\n", - "questions.show()" - ], - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "9lowSSKGq0lA", - "outputId": "c8178cba-e3ab-4b30-bed3-0a026735415e" - }, - "execution_count": 9, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Question 1:\n", - "Question: What is the focus of the Claude 3.5 Sonnet event?\n", - "Options:\n", - " A. Learn about web scraping with AI\n", - " B. Discover the power of LLMs for function calling\n", - " C. Understand the Claude family of models and explore the Artifacts feature\n", - " D. Explore the Gen AI course content\n", - "\n", - "Correct Answer: Gain insights into the Claude family of models and explore the Artifacts feature.\n", - "Explanation: The focus of the Claude 3.5 Sonnet event is to provide insights into the Claude family of models and explore the Artifacts feature for integrating Sonnet into projects using APIs.\n", - "\n", - "Question 2:\n", - "Question: What is the main topic covered in the 'Web Scraping with AI' course?\n", - "Options:\n", - " A. Building real-world projects with AI\n", - " B. Exploring web scraping enhanced by Generative AI\n", - " C. Learning about function calling with LLMs\n", - " D. Understanding the legal aspects of AI development\n", - "\n", - "Correct Answer: Exploring web scraping enhanced by Generative AI\n", - "Explanation: The main topic covered in the 'Web Scraping with AI' course is exploring the evolving field of web scraping enhanced by the power of Generative AI to revolutionize data extraction.\n", - "\n" - ] - } - ] - }, - { - "cell_type": "markdown", - "source": [ - "PDF Support" - ], - "metadata": { - "id": "cfSGSsuPr34e" - } - }, - { - "cell_type": "code", - "source": [ - "from educhain import qna_engine\n", - "\n", - "questions = qna_engine.generate_mcqs_from_data(\n", - " source=\"your/file.pdf\", #Supported sources = \"url\",\"pdf\",\"text\"\n", - " source_type=\"pdf\", #Supported types = \"url\",\"pdf\",\"text\"\n", - " num=2,\n", - " learning_objective=\"Understand key concepts\",\n", - " difficulty_level=\"Intermediate\"\n", - ")\n", - "questions.show()" - ], - "metadata": { - "id": "bGiQmqwvrIC1" - }, - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "Text Support" - ], - "metadata": { - "id": "zkrp2Ogmr2Ft" - } - }, - { - "cell_type": "code", - "source": [ - "from educhain import qna_engine\n", - "text = \"\"\"\n", - " replace with your text\n", - " \"\"\"\n", - "questions = qna_engine.generate_mcqs_from_data(\n", - " source=\"text\", #Supported sources = \"url\",\"pdf\",\"text\"\n", - " source_type=\"text\", #Supported types = \"url\",\"pdf\",\"text\"\n", - " num=2,\n", - " learning_objective=\"Understand key concepts\",\n", - " difficulty_level=\"Intermediate\"\n", - ")\n", - "questions.show()" - ], - "metadata": { - "id": "q074VxkjrsmZ" - }, - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "## Generate Questions with question types ⁉\n", - "\n", - "✅ Multiple Choice\n", - "\n", - "✅`Fill in the blanks\n", - "\n", - "✅ Short Answer\n", - "\n", - "✅ True/False Questions" - ], - "metadata": { - "id": "sbJt9v5isIDm" - } - }, - { - "cell_type": "markdown", - "source": [ - "##QuestionTypes =[\"Multiple Choice\", \"Short Answer\", \"True/False\", \"Fill in the Blank\"] 🤯🤯" - ], - "metadata": { - "id": "q-seOFhstFVl" - } - }, - { - "cell_type": "code", - "source": [ - "from educhain import qna_engine\n", - "\n", - "questions = qna_engine.generate_questions(\n", - " topic=\"Machine Learning\",\n", - " num=3,\n", - " type=\"Short Answer\") # #supported types : \"Multiple Choice\", \"Short Answer\", \"True/False\", \"Fill in the Blank\"\n", - "\n", - "questions.show()\n" - ], - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "oiFdq_3LsHpE", - "outputId": "c0abd35d-2c2b-423c-db3b-c6da3df3b42c" - }, - "execution_count": 10, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Question 1:\n", - "Question: What is supervised learning in machine learning?\n", - "Answer: Supervised learning is a type of machine learning where the model is trained on labeled data, meaning the input data has corresponding output labels.\n", - "Explanation: In supervised learning, the algorithm learns to map input data to the correct output during training by using labeled examples. The goal is to make accurate predictions when given new, unseen data.\n", - "\n", - "Keywords: supervised learning, labeled data, training, predictions\n", - "\n", - "Question 2:\n", - "Question: What is the difference between classification and regression in machine learning?\n", - "Answer: Classification is used when the output variable is a category, while regression is used when the output variable is a continuous value.\n", - "Explanation: In classification, the goal is to predict the class or category that an input data point belongs to. In regression, the goal is to predict a continuous numerical value based on the input data.\n", - "\n", - "Keywords: classification, regression, output variable, category, continuous value\n", - "\n", - "Question 3:\n", - "Question: What is overfitting in machine learning?\n", - "Answer: Overfitting occurs when a machine learning model performs well on the training data but fails to generalize to new, unseen data.\n", - "Explanation: Overfitting happens when the model learns the noise and details in the training data to the extent that it negatively impacts its performance on new data. Regularization techniques can help prevent overfitting.\n", - "\n", - "Keywords: overfitting, training data, generalize, unseen data, regularization\n", - "\n" - ] - } - ] - }, - { - "cell_type": "code", - "source": [ - "from educhain import qna_engine\n", - "\n", - "questions = qna_engine.generate_questions(\n", - " topic=\"Machine Learning\",\n", - " num=3,\n", - " type=\"Fill in the Blank\") #supported types : \"Multiple Choice\", \"Short Answer\", \"True/False\", \"Fill in the Blank\"\n", - "\n", - "questions.show()\n" - ], - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "Ptwp1DT7s21M", - "outputId": "eea6016f-2769-44de-d837-ef9d7360b612" - }, - "execution_count": 14, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Question 1:\n", - "Question: Machine learning is a branch of artificial intelligence that focuses on the development of algorithms that allow a computer to __________ patterns within data.\n", - "Answer: learn\n", - "Explanation: Machine learning algorithms are designed to learn from data and make predictions or decisions based on that data.\n", - "\n", - "Word to fill: learn\n", - "\n", - "Question 2:\n", - "Question: In supervised learning, the algorithm is trained on a dataset that includes both input data and the corresponding ____________.\n", - "Answer: output\n", - "Explanation: Supervised learning involves teaching the algorithm by providing labeled examples where the correct output is known.\n", - "\n", - "Word to fill: output\n", - "\n", - "Question 3:\n", - "Question: Cross-validation is a technique used in machine learning to assess the performance of a model by splitting the data into multiple subsets or folds to ensure that each data point is used for both training and ____________.\n", - "Answer: testing\n", - "Explanation: Cross-validation helps evaluate how well a model generalizes to new, unseen data by testing it on different subsets of the dataset.\n", - "\n", - "Word to fill: testing\n", - "\n" - ] - } - ] - }, - { - "cell_type": "code", - "source": [], - "metadata": { - "id": "TGKxCNtms0Oa" - }, - "execution_count": null, - "outputs": [] - } - ] -} diff --git a/cookbook/starters/educhain_Starter_guide_v3.ipynb b/cookbook/starters/educhain_Starter_guide_v3.ipynb index a70c17f..b7f8ed6 100644 --- a/cookbook/starters/educhain_Starter_guide_v3.ipynb +++ b/cookbook/starters/educhain_Starter_guide_v3.ipynb @@ -17,7 +17,7 @@ { "cell_type": "markdown", "source": [ - "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1JNjQz20SRnyRyAN9YtgCzYq4gj8iBTRH?usp=chrome_ntp#scrollTo=UtLn9rOF-gPm)" + "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1JNjQz20SRnyRyAN9YtgCzYq4gj8iBTRH?usp=sharing)" ], "metadata": { "id": "kQPjHGQRQPu6" @@ -48,10 +48,62 @@ "!pip install -qU educhain" ], "metadata": { - "id": "-noJRjtX2WBy" + "id": "-noJRjtX2WBy", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "6471d806-4e1e-4fa7-be80-e143e70d8f01" }, "execution_count": null, - "outputs": [] + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/67.3 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.3/67.3 kB\u001b[0m \u001b[31m3.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", + " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", + " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m294.6/294.6 kB\u001b[0m \u001b[31m9.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m18.0/18.0 MB\u001b[0m \u001b[31m79.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.4/2.4 MB\u001b[0m \u001b[31m68.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m94.9/94.9 kB\u001b[0m \u001b[31m6.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.7/6.7 MB\u001b[0m \u001b[31m72.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.5/2.5 MB\u001b[0m \u001b[31m50.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m42.0/42.0 kB\u001b[0m \u001b[31m2.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m61.3/61.3 kB\u001b[0m \u001b[31m3.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m232.6/232.6 kB\u001b[0m \u001b[31m14.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.9/1.9 MB\u001b[0m \u001b[31m41.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.2/2.2 MB\u001b[0m \u001b[31m49.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m284.2/284.2 kB\u001b[0m \u001b[31m16.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.4/1.4 MB\u001b[0m \u001b[31m44.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.6/1.6 MB\u001b[0m \u001b[31m49.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.0/2.0 MB\u001b[0m \u001b[31m53.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m101.6/101.6 kB\u001b[0m \u001b[31m6.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m16.0/16.0 MB\u001b[0m \u001b[31m60.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m52.5/52.5 kB\u001b[0m \u001b[31m3.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m149.7/149.7 kB\u001b[0m \u001b[31m10.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m64.0/64.0 kB\u001b[0m \u001b[31m4.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m110.5/110.5 kB\u001b[0m \u001b[31m7.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m85.0/85.0 kB\u001b[0m \u001b[31m6.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.2/1.2 MB\u001b[0m \u001b[31m44.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.3/62.3 kB\u001b[0m \u001b[31m4.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m385.7/385.7 kB\u001b[0m \u001b[31m13.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m45.2/45.2 MB\u001b[0m \u001b[31m11.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m459.8/459.8 kB\u001b[0m \u001b[31m27.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.9/50.9 kB\u001b[0m \u001b[31m3.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m71.5/71.5 kB\u001b[0m \u001b[31m4.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m4.0/4.0 MB\u001b[0m \u001b[31m84.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m452.6/452.6 kB\u001b[0m \u001b[31m29.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m46.0/46.0 kB\u001b[0m \u001b[31m3.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m86.8/86.8 kB\u001b[0m \u001b[31m6.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Building wheel for pypika (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", + "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", + "google-generativeai 0.8.4 requires google-ai-generativelanguage==0.6.15, but you have google-ai-generativelanguage 0.6.17 which is incompatible.\u001b[0m\u001b[31m\n", + "\u001b[0m" + ] + } + ] }, { "cell_type": "markdown", @@ -75,7 +127,8 @@ "from google.colab import userdata\n", "\n", "os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY')\n", - "os.environ[\"ANTHROPIC_API_KEY\"] = userdata.get(\"ANTHROPIC_API_KEY\")" + "os.environ[\"ANTHROPIC_API_KEY\"] = userdata.get(\"ANTHROPIC_API_KEY\")\n", + "os.environ[\"GOOGLE_API_KEY\"] = userdata.get(\"GOOGLE_API_KEY\")" ] }, { @@ -104,10 +157,10 @@ "metadata": { "colab": { "base_uri": "https://localhost:8080/", - "height": 591 + "height": 216 }, "id": "z7WSAw0m45JH", - "outputId": "9fc6fbe0-c20e-4215-898a-d3c03c9bb145" + "outputId": "685305e7-a416-423f-9eb4-93996f0072d3" }, "execution_count": null, "outputs": [ @@ -115,14 +168,22 @@ "output_type": "stream", "name": "stdout", "text": [ - "questions=[MultipleChoiceQuestion(question=\"What does Newton's First Law of Motion state?\", answer='An object at rest stays at rest and an object in motion stays in motion unless acted on by a net external force.', explanation='This law defines the concept of inertia, indicating that objects will not change their state of motion unless an external force is applied.', options=['An object at rest stays at rest and an object in motion stays in motion unless acted on by a net external force.', 'The force acting on an object is equal to the mass of the object multiplied by its acceleration.', 'For every action, there is an equal and opposite reaction.', 'The velocity of an object will always increase over time.']), MultipleChoiceQuestion(question=\"According to Newton's Second Law of Motion, what is the relationship between force, mass, and acceleration?\", answer='Force equals mass times acceleration (F = ma).', explanation='This law quantifies the effect of force on the motion of an object, establishing a direct relationship between force, mass, and acceleration.', options=['Force equals mass times acceleration (F = ma).', 'An object at rest stays at rest and an object in motion stays in motion unless acted on by a net external force.', 'For every action, there is an equal and opposite reaction.', 'Gravity is the only force that affects motion.']), MultipleChoiceQuestion(question=\"What does Newton's Third Law of Motion state?\", answer='For every action, there is an equal and opposite reaction.', explanation='This law explains that forces always occur in pairs, where one force is the action and the other is the reaction.', options=['An object at rest stays at rest and an object in motion stays in motion unless acted on by a net external force.', 'The force acting on an object is equal to the mass of the object multiplied by its acceleration.', 'For every action, there is an equal and opposite reaction.', 'Objects in motion will eventually stop without an external force.']), MultipleChoiceQuestion(question=\"Which of the following is an example of Newton's First Law of Motion?\", answer='A glass of water remains stationary on a table until someone pushes it.', explanation='This illustrates inertia, as the glass will not move unless a force is applied.', options=['A glass of water remains stationary on a table until someone pushes it.', 'A car accelerates faster when the driver presses the gas pedal.', 'A rocket launches into space by expelling gas downwards.', 'A ball rolls down a hill due to gravity.']), MultipleChoiceQuestion(question=\"How does mass affect acceleration according to Newton's Second Law?\", answer='As mass increases, acceleration decreases if the same force is applied.', explanation='This demonstrates that heavier objects require more force to achieve the same acceleration as lighter ones.', options=['As mass increases, acceleration decreases if the same force is applied.', 'Mass has no effect on acceleration.', 'As mass increases, acceleration increases.', 'Acceleration is independent of mass and only depends on force.'])]\n" + "questions=[MultipleChoiceQuestion(question=\"What does Newton's First Law of Motion state?\", answer='An object at rest stays at rest and an object in motion stays in motion unless acted upon by a net external force.', explanation='This law, also known as the law of inertia, emphasizes that objects will not change their state of motion unless a force causes them to do so.', options=['An object at rest stays at rest and an object in motion stays in motion unless acted upon by a net external force.', 'Force equals mass times acceleration.', 'For every action, there is an equal and opposite reaction.', 'Energy cannot be created or destroyed.']), MultipleChoiceQuestion(question=\"According to Newton's Second Law of Motion, what is the relationship between force, mass, and acceleration?\", answer='Force equals mass times acceleration.', explanation='This law mathematically quantifies how the velocity of an object changes when it is subjected to an external force.', options=['For every action, there is an equal and opposite reaction.', 'An object at rest stays at rest and an object in motion stays in motion unless acted upon by a net external force.', 'Energy cannot be created or destroyed.', 'Force equals mass times acceleration.']), MultipleChoiceQuestion(question=\"What is the principle behind Newton's Third Law of Motion?\", answer='For every action, there is an equal and opposite reaction.', explanation='This law explains that forces always occur in pairs; when one object exerts a force on another, the second object exerts a force of equal size in the opposite direction back on the first object.', options=['An object at rest stays at rest and an object in motion stays in motion unless acted upon by a net external force.', 'For every action, there is an equal and opposite reaction.', 'Force equals mass times acceleration.', 'Objects in motion will stay in motion.']), MultipleChoiceQuestion(question=\"Which of the following is an example of Newton's First Law of Motion?\", answer='A hockey puck sliding on ice eventually comes to a stop due to friction.', explanation='The puck would continue to slide indefinitely if no external force (like friction) acted on it.', options=['A hockey puck sliding on ice eventually comes to a stop due to friction.', 'A person pushing a car finds it accelerates with increased force.', 'A rocket launches into space due to the thrust produced by its engines.', 'A ball dropped from a height accelerates downward.']), MultipleChoiceQuestion(question=\"In which situation can Newton's laws of motion be applied?\", answer='In situations involving forces acting on objects, regardless of their speed.', explanation=\"Newton's laws apply to both static and dynamic situations, provided the forces are clearly defined.\", options=['In situations involving forces acting on objects, regardless of their speed.', 'Only in the presence of friction.', 'Only when objects are at rest.', 'Only for objects moving at constant speed.'])]\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":8: PydanticDeprecatedSince20: The `json` method is deprecated; use `model_dump_json` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.10/migration/\n", + " ques.json() #you can Generate Dictionaries with this ques.dict()\n" ] }, { "output_type": "execute_result", "data": { "text/plain": [ - "'{\"questions\":[{\"question\":\"What does Newton\\'s First Law of Motion state?\",\"answer\":\"An object at rest stays at rest and an object in motion stays in motion unless acted on by a net external force.\",\"explanation\":\"This law defines the concept of inertia, indicating that objects will not change their state of motion unless an external force is applied.\",\"options\":[\"An object at rest stays at rest and an object in motion stays in motion unless acted on by a net external force.\",\"The force acting on an object is equal to the mass of the object multiplied by its acceleration.\",\"For every action, there is an equal and opposite reaction.\",\"The velocity of an object will always increase over time.\"]},{\"question\":\"According to Newton\\'s Second Law of Motion, what is the relationship between force, mass, and acceleration?\",\"answer\":\"Force equals mass times acceleration (F = ma).\",\"explanation\":\"This law quantifies the effect of force on the motion of an object, establishing a direct relationship between force, mass, and acceleration.\",\"options\":[\"Force equals mass times acceleration (F = ma).\",\"An object at rest stays at rest and an object in motion stays in motion unless acted on by a net external force.\",\"For every action, there is an equal and opposite reaction.\",\"Gravity is the only force that affects motion.\"]},{\"question\":\"What does Newton\\'s Third Law of Motion state?\",\"answer\":\"For every action, there is an equal and opposite reaction.\",\"explanation\":\"This law explains that forces always occur in pairs, where one force is the action and the other is the reaction.\",\"options\":[\"An object at rest stays at rest and an object in motion stays in motion unless acted on by a net external force.\",\"The force acting on an object is equal to the mass of the object multiplied by its acceleration.\",\"For every action, there is an equal and opposite reaction.\",\"Objects in motion will eventually stop without an external force.\"]},{\"question\":\"Which of the following is an example of Newton\\'s First Law of Motion?\",\"answer\":\"A glass of water remains stationary on a table until someone pushes it.\",\"explanation\":\"This illustrates inertia, as the glass will not move unless a force is applied.\",\"options\":[\"A glass of water remains stationary on a table until someone pushes it.\",\"A car accelerates faster when the driver presses the gas pedal.\",\"A rocket launches into space by expelling gas downwards.\",\"A ball rolls down a hill due to gravity.\"]},{\"question\":\"How does mass affect acceleration according to Newton\\'s Second Law?\",\"answer\":\"As mass increases, acceleration decreases if the same force is applied.\",\"explanation\":\"This demonstrates that heavier objects require more force to achieve the same acceleration as lighter ones.\",\"options\":[\"As mass increases, acceleration decreases if the same force is applied.\",\"Mass has no effect on acceleration.\",\"As mass increases, acceleration increases.\",\"Acceleration is independent of mass and only depends on force.\"]}]}'" + "'{\"questions\":[{\"question\":\"What does Newton\\'s First Law of Motion state?\",\"answer\":\"An object at rest stays at rest and an object in motion stays in motion unless acted upon by a net external force.\",\"explanation\":\"This law, also known as the law of inertia, emphasizes that objects will not change their state of motion unless a force causes them to do so.\",\"options\":[\"An object at rest stays at rest and an object in motion stays in motion unless acted upon by a net external force.\",\"Force equals mass times acceleration.\",\"For every action, there is an equal and opposite reaction.\",\"Energy cannot be created or destroyed.\"]},{\"question\":\"According to Newton\\'s Second Law of Motion, what is the relationship between force, mass, and acceleration?\",\"answer\":\"Force equals mass times acceleration.\",\"explanation\":\"This law mathematically quantifies how the velocity of an object changes when it is subjected to an external force.\",\"options\":[\"For every action, there is an equal and opposite reaction.\",\"An object at rest stays at rest and an object in motion stays in motion unless acted upon by a net external force.\",\"Energy cannot be created or destroyed.\",\"Force equals mass times acceleration.\"]},{\"question\":\"What is the principle behind Newton\\'s Third Law of Motion?\",\"answer\":\"For every action, there is an equal and opposite reaction.\",\"explanation\":\"This law explains that forces always occur in pairs; when one object exerts a force on another, the second object exerts a force of equal size in the opposite direction back on the first object.\",\"options\":[\"An object at rest stays at rest and an object in motion stays in motion unless acted upon by a net external force.\",\"For every action, there is an equal and opposite reaction.\",\"Force equals mass times acceleration.\",\"Objects in motion will stay in motion.\"]},{\"question\":\"Which of the following is an example of Newton\\'s First Law of Motion?\",\"answer\":\"A hockey puck sliding on ice eventually comes to a stop due to friction.\",\"explanation\":\"The puck would continue to slide indefinitely if no external force (like friction) acted on it.\",\"options\":[\"A hockey puck sliding on ice eventually comes to a stop due to friction.\",\"A person pushing a car finds it accelerates with increased force.\",\"A rocket launches into space due to the thrust produced by its engines.\",\"A ball dropped from a height accelerates downward.\"]},{\"question\":\"In which situation can Newton\\'s laws of motion be applied?\",\"answer\":\"In situations involving forces acting on objects, regardless of their speed.\",\"explanation\":\"Newton\\'s laws apply to both static and dynamic situations, provided the forces are clearly defined.\",\"options\":[\"In situations involving forces acting on objects, regardless of their speed.\",\"Only in the presence of friction.\",\"Only when objects are at rest.\",\"Only for objects moving at constant speed.\"]}]}'" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "string" @@ -161,18 +222,26 @@ "metadata": { "colab": { "base_uri": "https://localhost:8080/", - "height": 196 + "height": 198 }, "id": "EwPH6mpd2oi-", - "outputId": "28d6b819-c4d6-4c96-897d-14a9b726b75d" + "outputId": "89ad5aba-d56b-439e-b681-c855bcfaf478" }, "execution_count": null, "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":12: PydanticDeprecatedSince20: The `json` method is deprecated; use `model_dump_json` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.10/migration/\n", + " result.json()\n" + ] + }, { "output_type": "execute_result", "data": { "text/plain": [ - "'{\"questions\":[{\"question\":\"Which movement is associated with Mahatma Gandhi\\'s philosophy of non-violent resistance?\",\"answer\":\"The Civil Disobedience Movement\",\"explanation\":\"The Civil Disobedience Movement, initiated in 1930, was a key part of the Indian independence struggle where Gandhi encouraged Indians to refuse to comply with British laws in a non-violent manner.\",\"options\":[\"The Quit India Movement\",\"The Civil Disobedience Movement\",\"The Non-Cooperation Movement\",\"The Khilafat Movement\"]},{\"question\":\"What was the main objective of the Quit India Movement launched in 1942?\",\"answer\":\"To demand an end to British rule in India\",\"explanation\":\"The Quit India Movement was a significant campaign that aimed to secure an end to British rule in India. It was launched by the Indian National Congress during World War II, highlighting the urgency for independence.\",\"options\":[\"To demand greater autonomy\",\"To demand an end to British rule in India\",\"To promote social reforms\",\"To enhance economic policies\"]}]}'" + "'{\"questions\":[{\"question\":\"Which movement aimed at ending British rule in India through nonviolent civil disobedience?\",\"answer\":\"The Quit India Movement\",\"explanation\":\"The Quit India Movement, launched in 1942, was a significant movement led by Mahatma Gandhi, urging the British to leave India immediately. It was characterized by mass protests and calls for civil disobedience.\",\"options\":[\"The Non-Cooperation Movement\",\"The Quit India Movement\",\"The Civil Disobedience Movement\",\"The Swadeshi Movement\"]},{\"question\":\"Who was the prominent leader of the Indian National Congress during the independence movement?\",\"answer\":\"Mahatma Gandhi\",\"explanation\":\"Mahatma Gandhi was a key figure in the Indian independence movement, advocating for nonviolent resistance and leading various campaigns against British rule, including the Salt March and the Quit India Movement.\",\"options\":[\"Jawaharlal Nehru\",\"Mahatma Gandhi\",\"Subhas Chandra Bose\",\"Sardar Vallabhbhai Patel\"]}]}'" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "string" @@ -193,7 +262,7 @@ "base_uri": "https://localhost:8080/" }, "id": "EGJ8LE8d90Sl", - "outputId": "5bfcb30d-77e2-4b88-9361-c589e8462ba0" + "outputId": "25af3ea6-22d1-4bb1-a436-0a427977c5b4" }, "execution_count": null, "outputs": [ @@ -202,26 +271,26 @@ "name": "stdout", "text": [ "Question 1:\n", - "Question: Which movement is associated with Mahatma Gandhi's philosophy of non-violent resistance?\n", + "Question: Which movement aimed at ending British rule in India through nonviolent civil disobedience?\n", "Options:\n", - " A. The Quit India Movement\n", - " B. The Civil Disobedience Movement\n", - " C. The Non-Cooperation Movement\n", - " D. The Khilafat Movement\n", + " A. The Non-Cooperation Movement\n", + " B. The Quit India Movement\n", + " C. The Civil Disobedience Movement\n", + " D. The Swadeshi Movement\n", "\n", - "Correct Answer: The Civil Disobedience Movement\n", - "Explanation: The Civil Disobedience Movement, initiated in 1930, was a key part of the Indian independence struggle where Gandhi encouraged Indians to refuse to comply with British laws in a non-violent manner.\n", + "Correct Answer: The Quit India Movement\n", + "Explanation: The Quit India Movement, launched in 1942, was a significant movement led by Mahatma Gandhi, urging the British to leave India immediately. It was characterized by mass protests and calls for civil disobedience.\n", "\n", "Question 2:\n", - "Question: What was the main objective of the Quit India Movement launched in 1942?\n", + "Question: Who was the prominent leader of the Indian National Congress during the independence movement?\n", "Options:\n", - " A. To demand greater autonomy\n", - " B. To demand an end to British rule in India\n", - " C. To promote social reforms\n", - " D. To enhance economic policies\n", + " A. Jawaharlal Nehru\n", + " B. Mahatma Gandhi\n", + " C. Subhas Chandra Bose\n", + " D. Sardar Vallabhbhai Patel\n", "\n", - "Correct Answer: To demand an end to British rule in India\n", - "Explanation: The Quit India Movement was a significant campaign that aimed to secure an end to British rule in India. It was launched by the Indian National Congress during World War II, highlighting the urgency for independence.\n", + "Correct Answer: Mahatma Gandhi\n", + "Explanation: Mahatma Gandhi was a key figure in the Indian independence movement, advocating for nonviolent resistance and leading various campaigns against British rule, including the Salt March and the Quit India Movement.\n", "\n" ] } @@ -268,7 +337,7 @@ "base_uri": "https://localhost:8080/" }, "id": "TCZFFS418Muq", - "outputId": "2f3a3256-a909-471e-99c4-2fc6d31da7c2" + "outputId": "539c804a-b7e6-438c-f7e4-831f0603d597" }, "execution_count": null, "outputs": [ @@ -276,7 +345,7 @@ "output_type": "stream", "name": "stdout", "text": [ - "questions=[MultipleChoiceQuestion(question='What will be the output of the following code?\\n\\n```python\\nclass A:\\n def __init__(self):\\n self.value = 5\\n def get_value(self):\\n return self.value\\n\\nclass B(A):\\n def __init__(self):\\n super().__init__()\\n self.value = 10\\n\\nobj = B()\\nprint(obj.get_value())\\n```', answer='10', explanation='Class B inherits from class A and overrides the value to 10, so calling get_value() returns 10.', options=['5', '10', 'None', 'Error']), MultipleChoiceQuestion(question='Which of the following statements is true about class methods in Python?', answer='Class methods can modify class state that applies across all instances.', explanation=\"Class methods are defined with the @classmethod decorator and take 'cls' as the first parameter, allowing access to class variables.\", options=['Class methods can access instance variables.', 'Class methods are defined using the @staticmethod decorator.', 'Class methods can modify class state that applies across all instances.', 'Class methods cannot be overridden.']), MultipleChoiceQuestion(question='What does the __str__ method in a Python class do?', answer='It defines the behavior of the class when called with print().', explanation='The __str__ method is called when you use print() on an instance of a class, allowing you to define a string representation.', options=['It returns the class name.', 'It defines the behavior of the class when called with print().', 'It is used to initialize class attributes.', 'It acts as a constructor for the class.']), MultipleChoiceQuestion(question=\"Given the following code, what will be the output?\\n\\n```python\\nclass Parent:\\n def show(self):\\n return 'Parent'\\n\\nclass Child(Parent):\\n def show(self):\\n return 'Child'\\n\\nobj = Child()\\nprint(obj.show())\\n```\", answer='Child', explanation=\"The Child class overrides the show method, so calling obj.show() returns 'Child'.\", options=['Parent', 'Child', 'None', 'Error']), MultipleChoiceQuestion(question='What is the purpose of the __init__ method in a Python class?', answer='To initialize the object’s attributes when an instance of the class is created.', explanation='__init__ is the constructor method in Python classes, used for initializing instance attributes.', options=['To define the class variables.', 'To initialize the object’s attributes when an instance of the class is created.', 'To destroy the object when it is no longer needed.', 'To override the default behavior of a class method.'])]\n" + "questions=[MultipleChoiceQuestion(question='What is the output of the following code? class A: def __init__(self): self.x = 5; class B(A): pass; b = B(); print(b.x)', answer='5', explanation=\"Class B inherits from class A, so it has access to the variable x initialized in class A's constructor.\", options=['5', '0', 'AttributeError', 'None']), MultipleChoiceQuestion(question='Which of the following statements about Python class methods is true?', answer='Class methods are defined using the @classmethod decorator.', explanation='Class methods are defined using the @classmethod decorator and have access to the class itself, not instance variables.', options=['Static methods can modify class state.', 'Class methods can access instance variables.', 'Instance methods can be called without creating an instance.', 'Class methods are defined using the @classmethod decorator.']), MultipleChoiceQuestion(question='Given the following code, what will be the output? class Test: def __init__(self, value): self.value = value; def display(self): return self.value; obj = Test(10); print(obj.display())', answer='10', explanation='The display method returns the value of the instance variable, which is set to 10.', options=['10', 'self.value', 'None', 'Error']), MultipleChoiceQuestion(question='What will happen if you attempt to access a method that is not defined in a class instance?', answer='It raises an AttributeError.', explanation='Python raises an AttributeError when trying to access a method that does not exist on an instance.', options=['It raises an AttributeError.', 'It returns None.', 'It executes a default method.', 'It returns an empty string.']), MultipleChoiceQuestion(question='In Python, how can you prevent a subclass from overriding a method in its superclass?', answer=\"By using '__' to prefix the method name.\", explanation=\"Prefixing a method name with '__' makes it name-mangled, which prevents it from being overridden in subclasses.\", options=[\"By using 'final' keyword.\", \"By using 'private' access specifier.\", \"By using 'protected' access specifier.\", \"By using '__' to prefix the method name.\"])]\n" ] } ] @@ -291,7 +360,7 @@ "base_uri": "https://localhost:8080/" }, "id": "Dgr14AyJ9-ix", - "outputId": "5347c22e-f7f6-4105-f0a9-2c1022a64034" + "outputId": "3727bb78-3397-4757-9d55-bc76420004bb" }, "execution_count": null, "outputs": [ @@ -300,88 +369,59 @@ "name": "stdout", "text": [ "Question 1:\n", - "Question: What will be the output of the following code?\n", - "\n", - "```python\n", - "class A:\n", - " def __init__(self):\n", - " self.value = 5\n", - " def get_value(self):\n", - " return self.value\n", - "\n", - "class B(A):\n", - " def __init__(self):\n", - " super().__init__()\n", - " self.value = 10\n", - "\n", - "obj = B()\n", - "print(obj.get_value())\n", - "```\n", + "Question: What is the output of the following code? class A: def __init__(self): self.x = 5; class B(A): pass; b = B(); print(b.x)\n", "Options:\n", " A. 5\n", - " B. 10\n", - " C. None\n", - " D. Error\n", + " B. 0\n", + " C. AttributeError\n", + " D. None\n", "\n", - "Correct Answer: 10\n", - "Explanation: Class B inherits from class A and overrides the value to 10, so calling get_value() returns 10.\n", + "Correct Answer: 5\n", + "Explanation: Class B inherits from class A, so it has access to the variable x initialized in class A's constructor.\n", "\n", "Question 2:\n", - "Question: Which of the following statements is true about class methods in Python?\n", + "Question: Which of the following statements about Python class methods is true?\n", "Options:\n", - " A. Class methods can access instance variables.\n", - " B. Class methods are defined using the @staticmethod decorator.\n", - " C. Class methods can modify class state that applies across all instances.\n", - " D. Class methods cannot be overridden.\n", + " A. Static methods can modify class state.\n", + " B. Class methods can access instance variables.\n", + " C. Instance methods can be called without creating an instance.\n", + " D. Class methods are defined using the @classmethod decorator.\n", "\n", - "Correct Answer: Class methods can modify class state that applies across all instances.\n", - "Explanation: Class methods are defined with the @classmethod decorator and take 'cls' as the first parameter, allowing access to class variables.\n", + "Correct Answer: Class methods are defined using the @classmethod decorator.\n", + "Explanation: Class methods are defined using the @classmethod decorator and have access to the class itself, not instance variables.\n", "\n", "Question 3:\n", - "Question: What does the __str__ method in a Python class do?\n", + "Question: Given the following code, what will be the output? class Test: def __init__(self, value): self.value = value; def display(self): return self.value; obj = Test(10); print(obj.display())\n", "Options:\n", - " A. It returns the class name.\n", - " B. It defines the behavior of the class when called with print().\n", - " C. It is used to initialize class attributes.\n", - " D. It acts as a constructor for the class.\n", + " A. 10\n", + " B. self.value\n", + " C. None\n", + " D. Error\n", "\n", - "Correct Answer: It defines the behavior of the class when called with print().\n", - "Explanation: The __str__ method is called when you use print() on an instance of a class, allowing you to define a string representation.\n", + "Correct Answer: 10\n", + "Explanation: The display method returns the value of the instance variable, which is set to 10.\n", "\n", "Question 4:\n", - "Question: Given the following code, what will be the output?\n", - "\n", - "```python\n", - "class Parent:\n", - " def show(self):\n", - " return 'Parent'\n", - "\n", - "class Child(Parent):\n", - " def show(self):\n", - " return 'Child'\n", - "\n", - "obj = Child()\n", - "print(obj.show())\n", - "```\n", + "Question: What will happen if you attempt to access a method that is not defined in a class instance?\n", "Options:\n", - " A. Parent\n", - " B. Child\n", - " C. None\n", - " D. Error\n", + " A. It raises an AttributeError.\n", + " B. It returns None.\n", + " C. It executes a default method.\n", + " D. It returns an empty string.\n", "\n", - "Correct Answer: Child\n", - "Explanation: The Child class overrides the show method, so calling obj.show() returns 'Child'.\n", + "Correct Answer: It raises an AttributeError.\n", + "Explanation: Python raises an AttributeError when trying to access a method that does not exist on an instance.\n", "\n", "Question 5:\n", - "Question: What is the purpose of the __init__ method in a Python class?\n", + "Question: In Python, how can you prevent a subclass from overriding a method in its superclass?\n", "Options:\n", - " A. To define the class variables.\n", - " B. To initialize the object’s attributes when an instance of the class is created.\n", - " C. To destroy the object when it is no longer needed.\n", - " D. To override the default behavior of a class method.\n", + " A. By using 'final' keyword.\n", + " B. By using 'private' access specifier.\n", + " C. By using 'protected' access specifier.\n", + " D. By using '__' to prefix the method name.\n", "\n", - "Correct Answer: To initialize the object’s attributes when an instance of the class is created.\n", - "Explanation: __init__ is the constructor method in Python classes, used for initializing instance attributes.\n", + "Correct Answer: By using '__' to prefix the method name.\n", + "Explanation: Prefixing a method name with '__' makes it name-mangled, which prevents it from being overridden in subclasses.\n", "\n" ] } @@ -472,7 +512,7 @@ "base_uri": "https://localhost:8080/" }, "id": "LmDjAnZc-cV2", - "outputId": "7fd6b4d3-f9f4-435c-9bc0-4c5a9bddf23f" + "outputId": "87c250bb-4181-4b19-9970-4b4902d424dd" }, "execution_count": null, "outputs": [ @@ -480,7 +520,7 @@ "output_type": "execute_result", "data": { "text/plain": [ - "MCQListcustom(questions=[MCQcustom(question='What is the southernmost point of the Indian mainland?', options=[Optioncustom(text='Kanyakumari', correct='true'), Optioncustom(text='Cape Comorin', correct='false'), Optioncustom(text='Dhanushkodi', correct='false'), Optioncustom(text='Lakshadweep', correct='false')], explanation='Kanyakumari is the southernmost point of the Indian mainland, located at the confluence of the Arabian Sea, the Bay of Bengal, and the Indian Ocean.', blooms_level='Remembering', difficulty_level='easy', difficulty_rating=1, metadata={'topic': 'Indian Geography', 'subtopic': 'Geographical Landmarks'}), MCQcustom(question=\"Which river is known as the 'Sorrow of Bihar'?\", options=[Optioncustom(text='Ganges', correct='false'), Optioncustom(text='Kosi', correct='true'), Optioncustom(text='Yamuna', correct='false'), Optioncustom(text='Brahmaputra', correct='false')], explanation=\"The Kosi River is often referred to as the 'Sorrow of Bihar' due to its history of causing devastating floods in the region.\", blooms_level='Understanding', difficulty_level='medium', difficulty_rating=2, metadata={'topic': 'Indian Geography', 'subtopic': 'Rivers'}), MCQcustom(question='Which mountain range separates India from its neighboring country to the north?', options=[Optioncustom(text='Western Ghats', correct='false'), Optioncustom(text='Himalayas', correct='true'), Optioncustom(text='Aravalli Range', correct='false'), Optioncustom(text='Vindhya Range', correct='false')], explanation='The Himalayas form a natural barrier between India and its northern neighbors, providing significant geographical and climatic influence.', blooms_level='Applying', difficulty_level='hard', difficulty_rating=3, metadata={'topic': 'Indian Geography', 'subtopic': 'Mountain Ranges'})])" + "MCQListcustom(questions=[MCQcustom(question='What is the longest river in India?', options=[Optioncustom(text='Ganges', correct='true'), Optioncustom(text='Indus', correct='false'), Optioncustom(text='Brahmaputra', correct='false'), Optioncustom(text='Godavari', correct='false')], explanation='The Ganges is the longest river in India, flowing over 2,500 kilometers.', blooms_level='Remember', difficulty_level='easy', difficulty_rating=1, metadata={'topic': 'Indian Geography', 'subtopic': 'Rivers'}), MCQcustom(question='Which mountain range separates India from Tibet?', options=[Optioncustom(text='Western Ghats', correct='false'), Optioncustom(text='Himalayas', correct='true'), Optioncustom(text='Aravalli Range', correct='false'), Optioncustom(text='Vindhya Range', correct='false')], explanation='The Himalayas form the natural barrier between India and Tibet.', blooms_level='Understand', difficulty_level='medium', difficulty_rating=2, metadata={'topic': 'Indian Geography', 'subtopic': 'Mountain Ranges'}), MCQcustom(question='Which is the largest state in India by area?', options=[Optioncustom(text='Madhya Pradesh', correct='true'), Optioncustom(text='Uttar Pradesh', correct='false'), Optioncustom(text='Rajasthan', correct='false'), Optioncustom(text='Maharashtra', correct='false')], explanation='Rajasthan is the largest state in India by area, covering approximately 342,239 square kilometers.', blooms_level='Apply', difficulty_level='medium', difficulty_rating=2, metadata={'topic': 'Indian Geography', 'subtopic': 'States'})])" ] }, "metadata": {}, @@ -498,7 +538,7 @@ "base_uri": "https://localhost:8080/" }, "id": "DvELP4kIAEXy", - "outputId": "58e17862-c80d-4ae9-c30f-e59a03deb1eb" + "outputId": "18c2bcf0-3b52-4c40-f337-67352bb4dcf5" }, "execution_count": null, "outputs": [ @@ -509,46 +549,46 @@ "MCQs:\n", "\n", "Question 1:\n", - "Question: What is the southernmost point of the Indian mainland?\n", - "Options:\n", - " A. Kanyakumari\n", - " B. Cape Comorin\n", - " C. Dhanushkodi\n", - " D. Lakshadweep\n", - "Correct Answer: Kanyakumari\n", - "Explanation: Kanyakumari is the southernmost point of the Indian mainland, located at the confluence of the Arabian Sea, the Bay of Bengal, and the Indian Ocean.\n", - "Bloom's Level: Remembering\n", - "Difficulty Level: easy\n", - "Difficulty Rating: 1\n", - "Metadata: {'topic': 'Indian Geography', 'subtopic': 'Geographical Landmarks'}\n", - "\n", - "Question 2:\n", - "Question: Which river is known as the 'Sorrow of Bihar'?\n", + "Question: What is the longest river in India?\n", "Options:\n", " A. Ganges\n", - " B. Kosi\n", - " C. Yamuna\n", - " D. Brahmaputra\n", - "Correct Answer: Kosi\n", - "Explanation: The Kosi River is often referred to as the 'Sorrow of Bihar' due to its history of causing devastating floods in the region.\n", - "Bloom's Level: Understanding\n", - "Difficulty Level: medium\n", - "Difficulty Rating: 2\n", + " B. Indus\n", + " C. Brahmaputra\n", + " D. Godavari\n", + "Correct Answer: Ganges\n", + "Explanation: The Ganges is the longest river in India, flowing over 2,500 kilometers.\n", + "Bloom's Level: Remember\n", + "Difficulty Level: easy\n", + "Difficulty Rating: 1\n", "Metadata: {'topic': 'Indian Geography', 'subtopic': 'Rivers'}\n", "\n", - "Question 3:\n", - "Question: Which mountain range separates India from its neighboring country to the north?\n", + "Question 2:\n", + "Question: Which mountain range separates India from Tibet?\n", "Options:\n", " A. Western Ghats\n", " B. Himalayas\n", " C. Aravalli Range\n", " D. Vindhya Range\n", "Correct Answer: Himalayas\n", - "Explanation: The Himalayas form a natural barrier between India and its northern neighbors, providing significant geographical and climatic influence.\n", - "Bloom's Level: Applying\n", - "Difficulty Level: hard\n", - "Difficulty Rating: 3\n", + "Explanation: The Himalayas form the natural barrier between India and Tibet.\n", + "Bloom's Level: Understand\n", + "Difficulty Level: medium\n", + "Difficulty Rating: 2\n", "Metadata: {'topic': 'Indian Geography', 'subtopic': 'Mountain Ranges'}\n", + "\n", + "Question 3:\n", + "Question: Which is the largest state in India by area?\n", + "Options:\n", + " A. Madhya Pradesh\n", + " B. Uttar Pradesh\n", + " C. Rajasthan\n", + " D. Maharashtra\n", + "Correct Answer: Madhya Pradesh\n", + "Explanation: Rajasthan is the largest state in India by area, covering approximately 342,239 square kilometers.\n", + "Bloom's Level: Apply\n", + "Difficulty Level: medium\n", + "Difficulty Rating: 2\n", + "Metadata: {'topic': 'Indian Geography', 'subtopic': 'States'}\n", "\n" ] } @@ -595,7 +635,7 @@ "base_uri": "https://localhost:8080/" }, "id": "1X1VsYxf2Yww", - "outputId": "d5f2971b-ecb1-4049-b7ee-5a6b3bac6b07" + "outputId": "eb3fbda3-5e09-48a9-a859-a2a26e2f0bc9" }, "execution_count": null, "outputs": [ @@ -603,7 +643,7 @@ "output_type": "execute_result", "data": { "text/plain": [ - "MCQListcustom(questions=[MCQcustom(question='In Python, which of the following statements correctly defines a class method that modifies the class state?', options=[Optioncustom(text='@classmethod\\ndef set_class_value(cls, value):\\n cls.class_value = value', correct='true'), Optioncustom(text='@staticmethod\\ndef set_class_value(value):\\n class_value = value', correct='false'), Optioncustom(text='def set_class_value(cls, value):\\n cls.class_value = value', correct='false'), Optioncustom(text='@classmethod\\ndef set_class_value(value):\\n cls.class_value = value', correct='false')], explanation=\"A class method needs to use the @classmethod decorator and should take 'cls' as the first parameter to modify class state.\", blooms_level='Applying', difficulty_level='very hard', difficulty_rating=5, metadata={'topic': 'Python Classes', 'subtopic': 'Class Methods'}), MCQcustom(question='What will be the output of the following code?\\n\\nclass Base:\\n def __init__(self):\\n self.value = 1\\n\\nclass Derived(Base):\\n def __init__(self):\\n super().__init__()\\n self.value = 2\\n\\nobj = Derived()\\nprint(obj.value)', options=[Optioncustom(text='1', correct='false'), Optioncustom(text='2', correct='true'), Optioncustom(text='None', correct='false'), Optioncustom(text='Error', correct='false')], explanation=\"The Derived class overrides the __init__ method and calls the parent constructor with 'super()'. Therefore, 'self.value' is set to 2.\", blooms_level='Understanding', difficulty_level='very hard', difficulty_rating=5, metadata={'topic': 'Python Classes', 'subtopic': 'Inheritance'})])" + "MCQListcustom(questions=[MCQcustom(question='What will be the output of the following code?\\n\\n```python\\nclass A:\\n def __init__(self):\\n self.x = 10\\n def add(self, y):\\n return self.x + y\\n\\nclass B(A):\\n def __init__(self):\\n super().__init__()\\n self.x = 20\\n\\nb = B()\\nprint(b.add(5))\\n```', options=[Optioncustom(text='15', correct='false'), Optioncustom(text='20', correct='false'), Optioncustom(text='25', correct='true'), Optioncustom(text='30', correct='false')], explanation='The output is 25 because the `add` method of class A is called, which adds the instance variable `self.x` from class B (which is 20) to the argument passed (5).', blooms_level='Apply', difficulty_level='hard', difficulty_rating=3, metadata={'topic': 'Python Classes', 'subtopic': 'Inheritance'}), MCQcustom(question='Consider the following code snippet:\\n\\n```python\\nclass Base:\\n def __init__(self):\\n self.value = 1\\n def show(self):\\n return self.value\\n\\nclass Derived(Base):\\n def __init__(self):\\n super().__init__()\\n self.value = 2\\n\\nobj = Derived()\\nprint(obj.show())\\n``` \\nWhat will be printed when the code is executed?', options=[Optioncustom(text='1', correct='false'), Optioncustom(text='2', correct='true'), Optioncustom(text='None', correct='false'), Optioncustom(text='Error', correct='false')], explanation=\"The code will print 2 because the `show` method accesses the `value` attribute, which is set to 2 in the `Derived` class's constructor.\", blooms_level='Understand', difficulty_level='hard', difficulty_rating=3, metadata={'topic': 'Python Classes', 'subtopic': 'Constructor Overriding'})])" ] }, "metadata": {}, @@ -621,7 +661,7 @@ "base_uri": "https://localhost:8080/" }, "id": "0sAl4auM3VP6", - "outputId": "72e2e436-e04b-4b63-e806-56ce7d487cbf" + "outputId": "76703ad3-d2bc-4ad4-836a-9735d29f4224" }, "execution_count": null, "outputs": [ @@ -632,34 +672,44 @@ "MCQs:\n", "\n", "Question 1:\n", - "Question: In Python, which of the following statements correctly defines a class method that modifies the class state?\n", - "Options:\n", - " A. @classmethod\n", - "def set_class_value(cls, value):\n", - " cls.class_value = value\n", - " B. @staticmethod\n", - "def set_class_value(value):\n", - " class_value = value\n", - " C. def set_class_value(cls, value):\n", - " cls.class_value = value\n", - " D. @classmethod\n", - "def set_class_value(value):\n", - " cls.class_value = value\n", - "Correct Answer: @classmethod\n", - "def set_class_value(cls, value):\n", - " cls.class_value = value\n", - "Explanation: A class method needs to use the @classmethod decorator and should take 'cls' as the first parameter to modify class state.\n", - "Bloom's Level: Applying\n", - "Difficulty Level: very hard\n", - "Difficulty Rating: 5\n", - "Metadata: {'topic': 'Python Classes', 'subtopic': 'Class Methods'}\n", + "Question: What will be the output of the following code?\n", + "\n", + "```python\n", + "class A:\n", + " def __init__(self):\n", + " self.x = 10\n", + " def add(self, y):\n", + " return self.x + y\n", + "\n", + "class B(A):\n", + " def __init__(self):\n", + " super().__init__()\n", + " self.x = 20\n", + "\n", + "b = B()\n", + "print(b.add(5))\n", + "```\n", + "Options:\n", + " A. 15\n", + " B. 20\n", + " C. 25\n", + " D. 30\n", + "Correct Answer: 25\n", + "Explanation: The output is 25 because the `add` method of class A is called, which adds the instance variable `self.x` from class B (which is 20) to the argument passed (5).\n", + "Bloom's Level: Apply\n", + "Difficulty Level: hard\n", + "Difficulty Rating: 3\n", + "Metadata: {'topic': 'Python Classes', 'subtopic': 'Inheritance'}\n", "\n", "Question 2:\n", - "Question: What will be the output of the following code?\n", + "Question: Consider the following code snippet:\n", "\n", + "```python\n", "class Base:\n", " def __init__(self):\n", " self.value = 1\n", + " def show(self):\n", + " return self.value\n", "\n", "class Derived(Base):\n", " def __init__(self):\n", @@ -667,18 +717,20 @@ " self.value = 2\n", "\n", "obj = Derived()\n", - "print(obj.value)\n", + "print(obj.show())\n", + "``` \n", + "What will be printed when the code is executed?\n", "Options:\n", " A. 1\n", " B. 2\n", " C. None\n", " D. Error\n", "Correct Answer: 2\n", - "Explanation: The Derived class overrides the __init__ method and calls the parent constructor with 'super()'. Therefore, 'self.value' is set to 2.\n", - "Bloom's Level: Understanding\n", - "Difficulty Level: very hard\n", - "Difficulty Rating: 5\n", - "Metadata: {'topic': 'Python Classes', 'subtopic': 'Inheritance'}\n", + "Explanation: The code will print 2 because the `show` method accesses the `value` attribute, which is set to 2 in the `Derived` class's constructor.\n", + "Bloom's Level: Understand\n", + "Difficulty Level: hard\n", + "Difficulty Rating: 3\n", + "Metadata: {'topic': 'Python Classes', 'subtopic': 'Constructor Overriding'}\n", "\n" ] } @@ -705,7 +757,7 @@ "base_uri": "https://localhost:8080/" }, "id": "8jo3EwwOkzBl", - "outputId": "fd35ab5a-5fd0-4de5-e89f-f9c4365d4b7b" + "outputId": "58e25cf0-2837-41c7-878b-aabb7e2414bb" }, "execution_count": null, "outputs": [ @@ -713,8 +765,8 @@ "output_type": "stream", "name": "stdout", "text": [ - "\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/40.4 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m40.4/40.4 kB\u001b[0m \u001b[31m1.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25h\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/946.0 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[90m╺\u001b[0m\u001b[90m━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m481.3/946.0 kB\u001b[0m \u001b[31m16.5 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m946.0/946.0 kB\u001b[0m \u001b[31m16.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/41.8 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m41.8/41.8 kB\u001b[0m \u001b[31m1.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/198.4 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m198.4/198.4 kB\u001b[0m \u001b[31m7.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25h" ] } @@ -779,10 +831,10 @@ "metadata": { "colab": { "base_uri": "https://localhost:8080/", - "height": 196 + "height": 143 }, "id": "ut2Q-uBTAevA", - "outputId": "96c00377-3068-40ae-935c-99bc82e3fa26" + "outputId": "f75cf127-a75f-4a09-a51a-7aecc28a0ee1" }, "execution_count": null, "outputs": [ @@ -790,7 +842,7 @@ "output_type": "execute_result", "data": { "text/plain": [ - "'{\"questions\":[{\"question\":\"Which of the following rivers flows through the states of Karnataka and Tamil Nadu?\",\"answer\":\"Kaveri\",\"explanation\":\"The Kaveri River is a major river in southern India, flowing through the states of Karnataka and Tamil Nadu before emptying into the Bay of Bengal.\",\"options\":[\"Kaveri\",\"Krishna\",\"Godavari\",\"Tungabhadra\"]},{\"question\":\"What is the name of the highest peak in the Western Ghats mountain range in South India?\",\"answer\":\"Anamudi\",\"explanation\":\"Anamudi is the highest peak in the Western Ghats mountain range, located in the Idukki district of Kerala, with an elevation of 2,695 meters above sea level.\",\"options\":[\"Anamudi\",\"Doddabetta\",\"Mullayanagiri\",\"Kemmangundi\"]},{\"question\":\"Which city is the capital of the state of Andhra Pradesh?\",\"answer\":\"Amaravati\",\"explanation\":\"Amaravati is the capital city of the Indian state of Andhra Pradesh, located on the southern bank of the Krishna River.\",\"options\":[\"Amaravati\",\"Hyderabad\",\"Visakhapatnam\",\"Tirupati\"]},{\"question\":\"What is the name of the largest city in the state of Tamil Nadu?\",\"answer\":\"Chennai\",\"explanation\":\"Chennai is the capital and largest city of the Indian state of Tamil Nadu, located on the Coromandel Coast of the Bay of Bengal.\",\"options\":[\"Chennai\",\"Coimbatore\",\"Madurai\",\"Tiruchirappalli\"]},{\"question\":\"Which of the following lakes is located in the state of Kerala?\",\"answer\":\"Vembanad Lake\",\"explanation\":\"Vembanad Lake is the longest lake in India, located in the state of Kerala, and is a popular tourist destination known for its backwater cruises.\",\"options\":[\"Vembanad Lake\",\"Sambhar Lake\",\"Pulicat Lake\",\"Kolleru Lake\"]}]}'" + "'{\"questions\":[{\"question\":\"Which of the following rivers flows through the state of Tamil Nadu?\",\"answer\":\"Kaveri\",\"explanation\":\"The Kaveri River is one of the major rivers in southern India and is the longest river in the state of Tamil Nadu.\",\"options\":[\"Kaveri\",\"Godavari\",\"Krishna\",\"Tapti\"]},{\"question\":\"Which mountain range runs along the western edge of the Deccan Plateau in the states of Kerala and Tamil Nadu?\",\"answer\":\"Western Ghats\",\"explanation\":\"The Western Ghats mountain range is a UNESCO World Heritage Site and is home to several national parks and wildlife sanctuaries.\",\"options\":[\"Western Ghats\",\"Eastern Ghats\",\"Vindhya Range\",\"Satpura Range\"]},{\"question\":\"Which city is the capital of the state of Andhra Pradesh?\",\"answer\":\"Amaravati\",\"explanation\":\"Amaravati is the de facto capital of the state of Andhra Pradesh and is located on the banks of the Krishna River.\",\"options\":[\"Amaravati\",\"Hyderabad\",\"Visakhapatnam\",\"Vijayawada\"]},{\"question\":\"Which of the following states in South India has the highest population?\",\"answer\":\"Tamil Nadu\",\"explanation\":\"According to the 2011 census, the state of Tamil Nadu has a population of over 72 million people.\",\"options\":[\"Tamil Nadu\",\"Karnataka\",\"Andhra Pradesh\",\"Kerala\"]},{\"question\":\"Which water body separates the states of Tamil Nadu and Sri Lanka?\",\"answer\":\"Palk Strait\",\"explanation\":\"The Palk Strait is a narrow water body that separates the Indian subcontinent from the island of Sri Lanka.\",\"options\":[\"Palk Strait\",\"Gulf of Mannar\",\"Laccadive Sea\",\"Indian Ocean\"]}]}'" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "string" @@ -811,7 +863,7 @@ "base_uri": "https://localhost:8080/" }, "id": "Uyn5XhPtAsN8", - "outputId": "5bb0bc78-ffe3-4fe6-e074-d86df4348964" + "outputId": "0d34a306-e843-40e0-c626-06363e33b583" }, "execution_count": null, "outputs": [ @@ -820,26 +872,26 @@ "name": "stdout", "text": [ "Question 1:\n", - "Question: Which of the following rivers flows through the states of Karnataka and Tamil Nadu?\n", + "Question: Which of the following rivers flows through the state of Tamil Nadu?\n", "Options:\n", " A. Kaveri\n", - " B. Krishna\n", - " C. Godavari\n", - " D. Tungabhadra\n", + " B. Godavari\n", + " C. Krishna\n", + " D. Tapti\n", "\n", "Correct Answer: Kaveri\n", - "Explanation: The Kaveri River is a major river in southern India, flowing through the states of Karnataka and Tamil Nadu before emptying into the Bay of Bengal.\n", + "Explanation: The Kaveri River is one of the major rivers in southern India and is the longest river in the state of Tamil Nadu.\n", "\n", "Question 2:\n", - "Question: What is the name of the highest peak in the Western Ghats mountain range in South India?\n", + "Question: Which mountain range runs along the western edge of the Deccan Plateau in the states of Kerala and Tamil Nadu?\n", "Options:\n", - " A. Anamudi\n", - " B. Doddabetta\n", - " C. Mullayanagiri\n", - " D. Kemmangundi\n", + " A. Western Ghats\n", + " B. Eastern Ghats\n", + " C. Vindhya Range\n", + " D. Satpura Range\n", "\n", - "Correct Answer: Anamudi\n", - "Explanation: Anamudi is the highest peak in the Western Ghats mountain range, located in the Idukki district of Kerala, with an elevation of 2,695 meters above sea level.\n", + "Correct Answer: Western Ghats\n", + "Explanation: The Western Ghats mountain range is a UNESCO World Heritage Site and is home to several national parks and wildlife sanctuaries.\n", "\n", "Question 3:\n", "Question: Which city is the capital of the state of Andhra Pradesh?\n", @@ -847,32 +899,32 @@ " A. Amaravati\n", " B. Hyderabad\n", " C. Visakhapatnam\n", - " D. Tirupati\n", + " D. Vijayawada\n", "\n", "Correct Answer: Amaravati\n", - "Explanation: Amaravati is the capital city of the Indian state of Andhra Pradesh, located on the southern bank of the Krishna River.\n", + "Explanation: Amaravati is the de facto capital of the state of Andhra Pradesh and is located on the banks of the Krishna River.\n", "\n", "Question 4:\n", - "Question: What is the name of the largest city in the state of Tamil Nadu?\n", + "Question: Which of the following states in South India has the highest population?\n", "Options:\n", - " A. Chennai\n", - " B. Coimbatore\n", - " C. Madurai\n", - " D. Tiruchirappalli\n", + " A. Tamil Nadu\n", + " B. Karnataka\n", + " C. Andhra Pradesh\n", + " D. Kerala\n", "\n", - "Correct Answer: Chennai\n", - "Explanation: Chennai is the capital and largest city of the Indian state of Tamil Nadu, located on the Coromandel Coast of the Bay of Bengal.\n", + "Correct Answer: Tamil Nadu\n", + "Explanation: According to the 2011 census, the state of Tamil Nadu has a population of over 72 million people.\n", "\n", "Question 5:\n", - "Question: Which of the following lakes is located in the state of Kerala?\n", + "Question: Which water body separates the states of Tamil Nadu and Sri Lanka?\n", "Options:\n", - " A. Vembanad Lake\n", - " B. Sambhar Lake\n", - " C. Pulicat Lake\n", - " D. Kolleru Lake\n", + " A. Palk Strait\n", + " B. Gulf of Mannar\n", + " C. Laccadive Sea\n", + " D. Indian Ocean\n", "\n", - "Correct Answer: Vembanad Lake\n", - "Explanation: Vembanad Lake is the longest lake in India, located in the state of Kerala, and is a popular tourist destination known for its backwater cruises.\n", + "Correct Answer: Palk Strait\n", + "Explanation: The Palk Strait is a narrow water body that separates the Indian subcontinent from the island of Sri Lanka.\n", "\n" ] } @@ -906,10 +958,10 @@ "metadata": { "colab": { "base_uri": "https://localhost:8080/", - "height": 196 + "height": 143 }, "id": "LsXgEb2C1zhX", - "outputId": "e0c14be2-8557-4de4-cc05-daf97a3b89c3" + "outputId": "1797c884-5c09-4d03-8a41-62012a126a17" }, "execution_count": null, "outputs": [ @@ -917,7 +969,7 @@ "output_type": "execute_result", "data": { "text/plain": [ - "'{\"questions\":[{\"question\":\"Which statistical measure is most sensitive to outliers?\",\"answer\":\"Mean\",\"explanation\":\"The mean is calculated by summing all values and dividing by the number of values. Outliers, being extreme values, can significantly impact the sum, thus heavily influencing the mean.\",\"options\":[\"Mean\",\"Median\",\"Mode\",\"Standard Deviation\"]},{\"question\":\"What does a p-value represent in hypothesis testing?\",\"answer\":\"The probability of observing the data if the null hypothesis is true\",\"explanation\":\"The p-value is a crucial element in hypothesis testing. It quantifies the likelihood of obtaining the observed results if the null hypothesis (the statement being tested) is actually correct.\",\"options\":[\"The probability of the null hypothesis being true\",\"The probability of observing the data if the null hypothesis is true\",\"The probability of the alternative hypothesis being true\",\"The probability of rejecting the null hypothesis when it is true\"]},{\"question\":\"What type of correlation is indicated by a correlation coefficient close to -1?\",\"answer\":\"Strong negative correlation\",\"explanation\":\"A correlation coefficient close to -1 indicates a strong inverse relationship between two variables. As one variable increases, the other tends to decrease.\",\"options\":[\"Strong positive correlation\",\"Weak positive correlation\",\"Strong negative correlation\",\"Weak negative correlation\"]},{\"question\":\"Which measure of central tendency is the middle value in an ordered dataset?\",\"answer\":\"Median\",\"explanation\":\"The median is the middle value when a dataset is arranged in ascending or descending order. It is less sensitive to outliers compared to the mean.\",\"options\":[\"Mean\",\"Median\",\"Mode\",\"Range\"]},{\"question\":\"What does the standard deviation measure?\",\"answer\":\"The dispersion or spread of data around the mean\",\"explanation\":\"The standard deviation quantifies the average distance of data points from the mean. A larger standard deviation indicates a greater spread of data.\",\"options\":[\"The center of a dataset\",\"The most frequent value in a dataset\",\"The difference between the highest and lowest values\",\"The dispersion or spread of data around the mean\"]}]}'" + "'{\"questions\":[{\"question\":\"Which measure of central tendency is most sensitive to outliers?\",\"answer\":\"Mean\",\"explanation\":\"The mean is calculated by summing all values and dividing by the number of values. Outliers, being extreme values, can significantly impact this sum, thus making the mean sensitive to them.\",\"options\":[\"Mean\",\"Median\",\"Mode\",\"Range\"]},{\"question\":\"What does the standard deviation measure?\",\"answer\":\"The spread or dispersion of data around the mean\",\"explanation\":\"Standard deviation quantifies how much individual data points deviate from the average (mean). A higher standard deviation indicates greater variability in the data.\",\"options\":[\"The spread or dispersion of data around the mean\",\"The middle value in a dataset\",\"The most frequent value in a dataset\",\"The difference between the highest and lowest values\"]},{\"question\":\"Which statistical test is used to compare the means of two independent groups?\",\"answer\":\"Independent samples t-test\",\"explanation\":\"The independent samples t-test is specifically designed to determine if there\\'s a statistically significant difference between the means of two groups that are not related.\",\"options\":[\"Independent samples t-test\",\"Paired samples t-test\",\"ANOVA\",\"Chi-square test\"]},{\"question\":\"What does a p-value represent in hypothesis testing?\",\"answer\":\"The probability of observing the results if the null hypothesis is true\",\"explanation\":\"The p-value is a measure of evidence against the null hypothesis. A low p-value suggests that the observed data is unlikely under the null hypothesis, leading to its rejection.\",\"options\":[\"The probability of observing the results if the null hypothesis is true\",\"The probability of the null hypothesis being true\",\"The probability of the alternative hypothesis being true\",\"The probability of making a Type II error\"]},{\"question\":\"What is the correlation coefficient used for?\",\"answer\":\"Measuring the strength and direction of a linear relationship between two variables\",\"explanation\":\"The correlation coefficient (e.g., Pearson\\'s correlation) provides a numerical value between -1 and +1, indicating the strength and direction (positive or negative) of a linear association between two variables.\",\"options\":[\"Measuring the strength and direction of a linear relationship between two variables\",\"Measuring the central tendency of a dataset\",\"Measuring the variability of a dataset\",\"Measuring the probability of an event\"]}]}'" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "string" @@ -938,7 +990,7 @@ "base_uri": "https://localhost:8080/" }, "id": "-mDGx6yk2RGn", - "outputId": "aa844e89-6957-4ffd-90e3-6bd6bf1b725f" + "outputId": "6f884bf6-6756-4f96-df5b-4bd6d015f073" }, "execution_count": null, "outputs": [ @@ -947,59 +999,59 @@ "name": "stdout", "text": [ "Question 1:\n", - "Question: Which statistical measure is most sensitive to outliers?\n", + "Question: Which measure of central tendency is most sensitive to outliers?\n", "Options:\n", " A. Mean\n", " B. Median\n", " C. Mode\n", - " D. Standard Deviation\n", + " D. Range\n", "\n", "Correct Answer: Mean\n", - "Explanation: The mean is calculated by summing all values and dividing by the number of values. Outliers, being extreme values, can significantly impact the sum, thus heavily influencing the mean.\n", + "Explanation: The mean is calculated by summing all values and dividing by the number of values. Outliers, being extreme values, can significantly impact this sum, thus making the mean sensitive to them.\n", "\n", "Question 2:\n", - "Question: What does a p-value represent in hypothesis testing?\n", + "Question: What does the standard deviation measure?\n", "Options:\n", - " A. The probability of the null hypothesis being true\n", - " B. The probability of observing the data if the null hypothesis is true\n", - " C. The probability of the alternative hypothesis being true\n", - " D. The probability of rejecting the null hypothesis when it is true\n", + " A. The spread or dispersion of data around the mean\n", + " B. The middle value in a dataset\n", + " C. The most frequent value in a dataset\n", + " D. The difference between the highest and lowest values\n", "\n", - "Correct Answer: The probability of observing the data if the null hypothesis is true\n", - "Explanation: The p-value is a crucial element in hypothesis testing. It quantifies the likelihood of obtaining the observed results if the null hypothesis (the statement being tested) is actually correct.\n", + "Correct Answer: The spread or dispersion of data around the mean\n", + "Explanation: Standard deviation quantifies how much individual data points deviate from the average (mean). A higher standard deviation indicates greater variability in the data.\n", "\n", "Question 3:\n", - "Question: What type of correlation is indicated by a correlation coefficient close to -1?\n", + "Question: Which statistical test is used to compare the means of two independent groups?\n", "Options:\n", - " A. Strong positive correlation\n", - " B. Weak positive correlation\n", - " C. Strong negative correlation\n", - " D. Weak negative correlation\n", + " A. Independent samples t-test\n", + " B. Paired samples t-test\n", + " C. ANOVA\n", + " D. Chi-square test\n", "\n", - "Correct Answer: Strong negative correlation\n", - "Explanation: A correlation coefficient close to -1 indicates a strong inverse relationship between two variables. As one variable increases, the other tends to decrease.\n", + "Correct Answer: Independent samples t-test\n", + "Explanation: The independent samples t-test is specifically designed to determine if there's a statistically significant difference between the means of two groups that are not related.\n", "\n", "Question 4:\n", - "Question: Which measure of central tendency is the middle value in an ordered dataset?\n", + "Question: What does a p-value represent in hypothesis testing?\n", "Options:\n", - " A. Mean\n", - " B. Median\n", - " C. Mode\n", - " D. Range\n", + " A. The probability of observing the results if the null hypothesis is true\n", + " B. The probability of the null hypothesis being true\n", + " C. The probability of the alternative hypothesis being true\n", + " D. The probability of making a Type II error\n", "\n", - "Correct Answer: Median\n", - "Explanation: The median is the middle value when a dataset is arranged in ascending or descending order. It is less sensitive to outliers compared to the mean.\n", + "Correct Answer: The probability of observing the results if the null hypothesis is true\n", + "Explanation: The p-value is a measure of evidence against the null hypothesis. A low p-value suggests that the observed data is unlikely under the null hypothesis, leading to its rejection.\n", "\n", "Question 5:\n", - "Question: What does the standard deviation measure?\n", + "Question: What is the correlation coefficient used for?\n", "Options:\n", - " A. The center of a dataset\n", - " B. The most frequent value in a dataset\n", - " C. The difference between the highest and lowest values\n", - " D. The dispersion or spread of data around the mean\n", + " A. Measuring the strength and direction of a linear relationship between two variables\n", + " B. Measuring the central tendency of a dataset\n", + " C. Measuring the variability of a dataset\n", + " D. Measuring the probability of an event\n", "\n", - "Correct Answer: The dispersion or spread of data around the mean\n", - "Explanation: The standard deviation quantifies the average distance of data points from the mean. A larger standard deviation indicates a greater spread of data.\n", + "Correct Answer: Measuring the strength and direction of a linear relationship between two variables\n", + "Explanation: The correlation coefficient (e.g., Pearson's correlation) provides a numerical value between -1 and +1, indicating the strength and direction (positive or negative) of a linear association between two variables.\n", "\n" ] } @@ -1033,10 +1085,10 @@ "metadata": { "colab": { "base_uri": "https://localhost:8080/", - "height": 196 + "height": 143 }, "id": "ik7NNCU_2Zmt", - "outputId": "2710cade-dd3b-4312-c25e-74a893857642" + "outputId": "00b74f6e-ca65-4459-8e00-5a4cd2d8903e" }, "execution_count": null, "outputs": [ @@ -1044,14 +1096,14 @@ "output_type": "execute_result", "data": { "text/plain": [ - "'{\"questions\":[{\"question\":\"What is the primary purpose of a Large Language Model (LLM)?\",\"answer\":\"To generate human-like text based on input\",\"explanation\":\"LLMs are designed to understand and generate human-like text, enabling them to perform a wide range of language-related tasks.\",\"options\":[\"To generate human-like text based on input\",\"To perform complex mathematical calculations\",\"To create visual art\",\"To control robotic systems\"]},{\"question\":\"Which of the following is NOT a common application of Large Language Models?\",\"answer\":\"Real-time video processing\",\"explanation\":\"While LLMs are versatile, they are primarily designed for text-based tasks and not typically used for real-time video processing.\",\"options\":[\"Chatbots and virtual assistants\",\"Text summarization\",\"Language translation\",\"Real-time video processing\"]},{\"question\":\"What technique is commonly used to train Large Language Models?\",\"answer\":\"Transformer architecture\",\"explanation\":\"The Transformer architecture, introduced in the \\'Attention is All You Need\\' paper, is the foundation for most modern LLMs due to its efficiency in processing sequential data.\",\"options\":[\"Convolutional Neural Networks\",\"Transformer architecture\",\"Recurrent Neural Networks\",\"Support Vector Machines\"]},{\"question\":\"What is \\'few-shot learning\\' in the context of Large Language Models?\",\"answer\":\"The ability to perform a task with only a few examples\",\"explanation\":\"Few-shot learning refers to an LLM\\'s capability to understand and perform a new task when provided with only a small number of examples or instructions.\",\"options\":[\"Training on a very small dataset\",\"The ability to perform a task with only a few examples\",\"Learning to generate short sentences\",\"A technique to reduce model size\"]},{\"question\":\"Which of the following is a major ethical concern associated with Large Language Models?\",\"answer\":\"Bias in generated content\",\"explanation\":\"LLMs can inadvertently perpetuate or amplify biases present in their training data, leading to concerns about fairness and representation in AI-generated content.\",\"options\":[\"Excessive energy consumption\",\"Bias in generated content\",\"Physical safety risks\",\"Inability to learn new information\"]}]}'" + "'{\"questions\":[{\"question\":\"What is the primary purpose of a Large Language Model (LLM)?\",\"answer\":\"To generate human-like text based on input prompts\",\"explanation\":\"LLMs are designed to understand and generate human-like text across a wide range of topics and tasks, making them versatile tools for various applications in natural language processing.\",\"options\":[\"To generate human-like text based on input prompts\",\"To perform mathematical calculations\",\"To create visual art\",\"To control robotic systems\"]},{\"question\":\"Which of the following is NOT a common application of Large Language Models?\",\"answer\":\"Real-time video processing\",\"explanation\":\"While LLMs are versatile, they are primarily designed for text-based tasks. Real-time video processing is typically handled by other types of AI models specialized in computer vision.\",\"options\":[\"Chatbots and virtual assistants\",\"Text summarization\",\"Language translation\",\"Real-time video processing\"]},{\"question\":\"What technique is commonly used to improve the performance of Large Language Models on specific tasks?\",\"answer\":\"Fine-tuning\",\"explanation\":\"Fine-tuning involves further training a pre-trained LLM on a specific dataset or task to adapt its knowledge and improve performance for that particular application.\",\"options\":[\"Fine-tuning\",\"Overclocking\",\"Data compression\",\"Hardware acceleration\"]},{\"question\":\"Which of the following is a key challenge in developing and deploying Large Language Models?\",\"answer\":\"Ethical concerns and potential biases\",\"explanation\":\"LLMs can inadvertently perpetuate biases present in their training data, raising ethical concerns about their use and impact on society.\",\"options\":[\"Lack of available training data\",\"Insufficient computing power\",\"Ethical concerns and potential biases\",\"Limited application scenarios\"]},{\"question\":\"What is the term for the ability of Large Language Models to perform tasks they weren\\'t explicitly trained on?\",\"answer\":\"Zero-shot learning\",\"explanation\":\"Zero-shot learning refers to an LLM\\'s ability to understand and perform tasks it hasn\\'t been specifically trained on, based on its general knowledge and understanding of language.\",\"options\":[\"Transfer learning\",\"Zero-shot learning\",\"Unsupervised learning\",\"Reinforcement learning\"]}]}'" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "string" } }, "metadata": {}, - "execution_count": 19 + "execution_count": 20 } ] }, @@ -1065,7 +1117,7 @@ "base_uri": "https://localhost:8080/" }, "id": "UjbPBToX2wlw", - "outputId": "2cab612b-8d95-4206-e471-a67aed71819f" + "outputId": "a8530457-bb88-4eb9-ecd3-dda14ca2b517" }, "execution_count": null, "outputs": [ @@ -1076,13 +1128,13 @@ "Question 1:\n", "Question: What is the primary purpose of a Large Language Model (LLM)?\n", "Options:\n", - " A. To generate human-like text based on input\n", - " B. To perform complex mathematical calculations\n", + " A. To generate human-like text based on input prompts\n", + " B. To perform mathematical calculations\n", " C. To create visual art\n", " D. To control robotic systems\n", "\n", - "Correct Answer: To generate human-like text based on input\n", - "Explanation: LLMs are designed to understand and generate human-like text, enabling them to perform a wide range of language-related tasks.\n", + "Correct Answer: To generate human-like text based on input prompts\n", + "Explanation: LLMs are designed to understand and generate human-like text across a wide range of topics and tasks, making them versatile tools for various applications in natural language processing.\n", "\n", "Question 2:\n", "Question: Which of the following is NOT a common application of Large Language Models?\n", @@ -1093,40 +1145,40 @@ " D. Real-time video processing\n", "\n", "Correct Answer: Real-time video processing\n", - "Explanation: While LLMs are versatile, they are primarily designed for text-based tasks and not typically used for real-time video processing.\n", + "Explanation: While LLMs are versatile, they are primarily designed for text-based tasks. Real-time video processing is typically handled by other types of AI models specialized in computer vision.\n", "\n", "Question 3:\n", - "Question: What technique is commonly used to train Large Language Models?\n", + "Question: What technique is commonly used to improve the performance of Large Language Models on specific tasks?\n", "Options:\n", - " A. Convolutional Neural Networks\n", - " B. Transformer architecture\n", - " C. Recurrent Neural Networks\n", - " D. Support Vector Machines\n", + " A. Fine-tuning\n", + " B. Overclocking\n", + " C. Data compression\n", + " D. Hardware acceleration\n", "\n", - "Correct Answer: Transformer architecture\n", - "Explanation: The Transformer architecture, introduced in the 'Attention is All You Need' paper, is the foundation for most modern LLMs due to its efficiency in processing sequential data.\n", + "Correct Answer: Fine-tuning\n", + "Explanation: Fine-tuning involves further training a pre-trained LLM on a specific dataset or task to adapt its knowledge and improve performance for that particular application.\n", "\n", "Question 4:\n", - "Question: What is 'few-shot learning' in the context of Large Language Models?\n", + "Question: Which of the following is a key challenge in developing and deploying Large Language Models?\n", "Options:\n", - " A. Training on a very small dataset\n", - " B. The ability to perform a task with only a few examples\n", - " C. Learning to generate short sentences\n", - " D. A technique to reduce model size\n", + " A. Lack of available training data\n", + " B. Insufficient computing power\n", + " C. Ethical concerns and potential biases\n", + " D. Limited application scenarios\n", "\n", - "Correct Answer: The ability to perform a task with only a few examples\n", - "Explanation: Few-shot learning refers to an LLM's capability to understand and perform a new task when provided with only a small number of examples or instructions.\n", + "Correct Answer: Ethical concerns and potential biases\n", + "Explanation: LLMs can inadvertently perpetuate biases present in their training data, raising ethical concerns about their use and impact on society.\n", "\n", "Question 5:\n", - "Question: Which of the following is a major ethical concern associated with Large Language Models?\n", + "Question: What is the term for the ability of Large Language Models to perform tasks they weren't explicitly trained on?\n", "Options:\n", - " A. Excessive energy consumption\n", - " B. Bias in generated content\n", - " C. Physical safety risks\n", - " D. Inability to learn new information\n", + " A. Transfer learning\n", + " B. Zero-shot learning\n", + " C. Unsupervised learning\n", + " D. Reinforcement learning\n", "\n", - "Correct Answer: Bias in generated content\n", - "Explanation: LLMs can inadvertently perpetuate or amplify biases present in their training data, leading to concerns about fairness and representation in AI-generated content.\n", + "Correct Answer: Zero-shot learning\n", + "Explanation: Zero-shot learning refers to an LLM's ability to understand and perform tasks it hasn't been specifically trained on, based on its general knowledge and understanding of language.\n", "\n" ] } @@ -1160,7 +1212,7 @@ "url_list = client.qna_engine.generate_questions_from_data(\n", " source=\"https://www.buildfastwithai.com/genai-course\",\n", " source_type=\"url\",\n", - " num=3,\n", + " num=10,\n", " question_type=\"Multiple Choice\",\n", " difficulty_level=\"Intermediate\",\n", " custom_instructions= \"Ask questions only about Satvik\"\n", @@ -1174,7 +1226,7 @@ "base_uri": "https://localhost:8080/" }, "id": "T-Z6OMK53MzM", - "outputId": "0b3ba2c4-8396-4cbb-a70d-abc75730c2fd" + "outputId": "e82f1558-9778-43b5-bb79-7e5e0982c188" }, "execution_count": null, "outputs": [ @@ -1183,37 +1235,114 @@ "name": "stdout", "text": [ "Question 1:\n", - "Question: What institution did Satvik Paramkusham graduate from?\n", + "Question: What is Satvik's educational background?\n", "Options:\n", - " A. IIT Delhi\n", - " B. IIT Bombay\n", - " C. IIT Kanpur\n", - " D. IIT Madras\n", + " A. Bachelor's and Master's degrees from IIT Delhi\n", + " B. PhD from MIT\n", + " C. Bachelor's degree from Harvard\n", + " D. Master's degree from Stanford\n", "\n", - "Correct Answer: IIT Delhi\n", - "Explanation: Satvik Paramkusham holds both Bachelor's and Master's degrees from IIT Delhi, a prestigious institution in India.\n", + "Correct Answer: Bachelor's and Master's degrees from IIT Delhi\n", + "Explanation: Satvik is an alumnus of IIT Delhi, indicating a strong foundation in technical education.\n", "\n", "Question 2:\n", - "Question: How many people has Satvik Paramkusham trained in the field of AI?\n", + "Question: How many students has Satvik trained?\n", "Options:\n", - " A. 1000+\n", - " B. 2500+\n", - " C. 5000+\n", - " D. 10000+\n", + " A. Over 500 people\n", + " B. Over 1000 people\n", + " C. Over 5000 people\n", + " D. Over 10000 people\n", "\n", - "Correct Answer: 5000+\n", - "Explanation: Satvik has trained over 5000 individuals, showcasing his extensive experience and impact in the AI education space.\n", + "Correct Answer: Over 5000 people\n", + "Explanation: Satvik has extensive experience in teaching and mentoring, having trained a large number of students.\n", "\n", "Question 3:\n", - "Question: What role does Satvik Paramkusham hold in the Build Fast with AI bootcamp?\n", + "Question: What role does Satvik hold in the Build Fast with AI bootcamp?\n", "Options:\n", - " A. Co-Founder\n", - " B. Instructor\n", - " C. Founder\n", - " D. Mentor\n", + " A. Instructor\n", + " B. Founder\n", + " C. Mentor\n", + " D. Project Manager\n", "\n", "Correct Answer: Founder\n", - "Explanation: Satvik is the founder of Build Fast with AI, where he leads the curriculum and training efforts.\n", + "Explanation: Satvik is the founder of the Build Fast with AI initiative, leading the bootcamp and its curriculum.\n", + "\n", + "Question 4:\n", + "Question: What companies has Satvik collaborated with for events?\n", + "Options:\n", + " A. Apple, Facebook, and Amazon\n", + " B. IBM, Oracle, and Dell\n", + " C. Google, Microsoft, and BCG\n", + " D. SAP, Cisco, and Intel\n", + "\n", + "Correct Answer: Google, Microsoft, and BCG\n", + "Explanation: Satvik's collaboration with major tech companies highlights his industry experience and network.\n", + "\n", + "Question 5:\n", + "Question: What is Satvik's teaching approach?\n", + "Options:\n", + " A. Theoretical approach with no hands-on training\n", + " B. Practical approach enabling translation of knowledge into actionable skills\n", + " C. Lectures without interaction\n", + " D. Focus on exams over projects\n", + "\n", + "Correct Answer: Practical approach enabling translation of knowledge into actionable skills\n", + "Explanation: Satvik emphasizes a hands-on, practical approach to ensure students can apply what they learn.\n", + "\n", + "Question 6:\n", + "Question: Which program is Satvik associated with for Generative AI training?\n", + "Options:\n", + " A. Data Science Bootcamp\n", + " B. Machine Learning Course\n", + " C. Generative AI Bootcamp\n", + " D. AI Ethics Seminar\n", + "\n", + "Correct Answer: Generative AI Bootcamp\n", + "Explanation: Satvik leads the Generative AI Bootcamp, focusing on practical applications and real-world projects.\n", + "\n", + "Question 7:\n", + "Question: What is one of Satvik's notable contributions to the AI community?\n", + "Options:\n", + " A. Creating AI software\n", + " B. Hands-on projects that provide valuable insights\n", + " C. Writing research papers\n", + " D. Designing AI hardware\n", + "\n", + "Correct Answer: Hands-on projects that provide valuable insights\n", + "Explanation: Satvik's focus on hands-on projects helps students understand real-world applications of AI.\n", + "\n", + "Question 8:\n", + "Question: What feedback have students given about Satvik's teaching?\n", + "Options:\n", + " A. He is too strict\n", + " B. He is a patient, conscientious teacher with a good grip on fundamentals.\n", + " C. He rushes through topics\n", + " D. He only focuses on advanced students\n", + "\n", + "Correct Answer: He is a patient, conscientious teacher with a good grip on fundamentals.\n", + "Explanation: Students appreciate Satvik's dedication and ability to explain complex concepts clearly.\n", + "\n", + "Question 9:\n", + "Question: How does Satvik assist students outside of class?\n", + "Options:\n", + " A. He does not provide any support\n", + " B. By going out of his way to assist students with queries\n", + " C. He only responds to emails\n", + " D. He refers them to other resources\n", + "\n", + "Correct Answer: By going out of his way to assist students with queries\n", + "Explanation: Satvik is known for his commitment to student success, offering additional support when needed.\n", + "\n", + "Question 10:\n", + "Question: What is a key feature of Satvik's bootcamp?\n", + "Options:\n", + " A. Only recorded lectures\n", + " B. It includes live sessions and practical projects.\n", + " C. No interaction with instructors\n", + " D. Focus on theoretical exams only\n", + "\n", + "Correct Answer: It includes live sessions and practical projects.\n", + "Explanation: The bootcamp's structure is designed to maximize learning through both theoretical and practical experiences.\n", "\n" ] } @@ -1232,15 +1361,13 @@ { "cell_type": "code", "source": [ - "from educhain import Educhain\n", - "\n", "client = Educhain()\n", "\n", "\n", "pdf_questions = client.qna_engine.generate_questions_from_data(\n", - " source=\"/content/test.pdf\",\n", + " source=\"/content/NIPS-2017-attention-is-all-you-need-Paper.pdf\",\n", " source_type=\"pdf\",\n", - " num=5,\n", + " num=10,\n", " question_type=\"Multiple Choice\",\n", " learning_objective=\"\",\n", " difficulty_level=\"Intermediate\",\n", @@ -1250,76 +1377,10 @@ "pdf_questions.show()" ], "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "GETsO96S3nJm", - "outputId": "efda0495-6dc6-4d86-e279-be37db847a6e" + "id": "GETsO96S3nJm" }, "execution_count": null, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Question 1:\n", - "Question: Which of the following numbers is a rational number?\n", - "Options:\n", - " A. 0.75\n", - " B. √2\n", - " C. π\n", - " D. e\n", - "\n", - "Correct Answer: 0.75\n", - "Explanation: A rational number can be expressed as a fraction of two integers. 0.75 can be written as 3/4.\n", - "\n", - "Question 2:\n", - "Question: What is the result of adding the rational numbers 1/2 and 3/4?\n", - "Options:\n", - " A. 5/4\n", - " B. 1/4\n", - " C. 7/4\n", - " D. 3/4\n", - "\n", - "Correct Answer: 5/4\n", - "Explanation: To add fractions, we find a common denominator. The common denominator for 2 and 4 is 4. Rewriting 1/2 as 2/4, we have 2/4 + 3/4 = 5/4.\n", - "\n", - "Question 3:\n", - "Question: On a number line, which number is represented by -2/3?\n", - "Options:\n", - " A. -0.6667\n", - " B. -1/3\n", - " C. 1/3\n", - " D. 0.6667\n", - "\n", - "Correct Answer: -0.6667\n", - "Explanation: The number -2/3 is located to the left of 0 on the number line, approximately at -0.6667.\n", - "\n", - "Question 4:\n", - "Question: Which operation will yield a rational number when performed on two rational numbers?\n", - "Options:\n", - " A. Addition\n", - " B. Subtraction\n", - " C. Multiplication\n", - " D. All of the above\n", - "\n", - "Correct Answer: All of the above\n", - "Explanation: Addition, subtraction, multiplication, and division (except by zero) of rational numbers will always yield a rational number.\n", - "\n", - "Question 5:\n", - "Question: If you divide 3/4 by 1/2, what is the result?\n", - "Options:\n", - " A. 3/2\n", - " B. 1/2\n", - " C. 1/4\n", - " D. 6/4\n", - "\n", - "Correct Answer: 3/2\n", - "Explanation: Dividing by a fraction is equivalent to multiplying by its reciprocal. Therefore, 3/4 ÷ 1/2 = 3/4 × 2/1 = 3/2.\n", - "\n" - ] - } - ] + "outputs": [] }, { "cell_type": "markdown", @@ -1341,7 +1402,7 @@ " source=\"\"\"Navigate the AI Landscape\n", " After Week 1, you'll possess a deep understanding of LLMs, Transformers, and Prompt Engineering, enabling you to guide AI initiatives with confidence.\"\"\",\n", " source_type=\"text\",\n", - " num=3,\n", + " num=10,\n", " question_type=\"Multiple Choice\",\n", " learning_objective=\"\",\n", " difficulty_level=\"Intermediate\",\n", @@ -1355,7 +1416,7 @@ "base_uri": "https://localhost:8080/" }, "id": "XIKDGlz24pbx", - "outputId": "275f71de-f338-43ba-923b-3daeb52d50ee" + "outputId": "a4f5bfdd-4dc0-4626-fa41-b16f38e34cfc" }, "execution_count": null, "outputs": [ @@ -1367,34 +1428,111 @@ "Question: What does LLM stand for in the context of AI?\n", "Options:\n", " A. Large Language Model\n", - " B. Linear Learning Model\n", - " C. Logical Language Model\n", - " D. Low-Level Model\n", + " B. Low-Level Model\n", + " C. Linear Learning Model\n", + " D. Linguistic Language Model\n", "\n", "Correct Answer: Large Language Model\n", - "Explanation: LLM refers to a type of AI model that is designed to understand and generate human-like text based on large datasets.\n", + "Explanation: LLM refers to Large Language Models, which are designed to understand and generate human language.\n", "\n", "Question 2:\n", - "Question: Which architecture is commonly used in the development of LLMs?\n", + "Question: Which architecture is commonly used in LLMs?\n", "Options:\n", " A. Convolutional Neural Networks\n", " B. Recurrent Neural Networks\n", " C. Transformers\n", - " D. Support Vector Machines\n", + " D. Decision Trees\n", "\n", "Correct Answer: Transformers\n", - "Explanation: Transformers are a type of neural network architecture that has revolutionized how we process sequential data, making them ideal for LLMs.\n", + "Explanation: Transformers are the backbone architecture for most modern LLMs, enabling better context understanding and generation.\n", "\n", "Question 3:\n", - "Question: What is the primary purpose of prompt engineering in LLMs?\n", + "Question: What is prompt engineering?\n", + "Options:\n", + " A. Creating AI models from scratch\n", + " B. Crafting inputs to elicit desired responses from AI models.\n", + " C. Training models using reinforcement learning\n", + " D. Collecting data for AI training\n", + "\n", + "Correct Answer: Crafting inputs to elicit desired responses from AI models.\n", + "Explanation: Prompt engineering involves designing and refining the input given to LLMs to achieve specific outputs.\n", + "\n", + "Question 4:\n", + "Question: Which of the following is a key feature of LLMs?\n", + "Options:\n", + " A. They operate only on structured data.\n", + " B. They can only process images.\n", + " C. They can generate coherent text based on a given prompt.\n", + " D. They require manual coding for every response.\n", + "\n", + "Correct Answer: They can generate coherent text based on a given prompt.\n", + "Explanation: LLMs are designed to generate text that is contextually relevant and coherent, making them useful for various applications.\n", + "\n", + "Question 5:\n", + "Question: What is the primary advantage of using Transformers over previous architectures?\n", + "Options:\n", + " A. They only process one piece of data at a time.\n", + " B. They have less memory requirement.\n", + " C. They can process data in parallel, improving efficiency.\n", + " D. They require less training data.\n", + "\n", + "Correct Answer: They can process data in parallel, improving efficiency.\n", + "Explanation: Transformers allow for parallel processing of data, making them more efficient than sequential models like RNNs.\n", + "\n", + "Question 6:\n", + "Question: In the context of LLMs, what is 'fine-tuning'?\n", "Options:\n", - " A. To train the model from scratch\n", - " B. To optimize the input given to the model for better output\n", - " C. To reduce the model's size\n", - " D. To evaluate model performance\n", + " A. Building a model from scratch.\n", + " B. Adjusting a pre-trained model on a specific task or dataset.\n", + " C. Removing layers from a model.\n", + " D. Increasing the model's size indefinitely.\n", "\n", - "Correct Answer: To optimize the input given to the model for better output\n", - "Explanation: Prompt engineering involves crafting effective prompts to guide LLMs towards generating desired and relevant responses.\n", + "Correct Answer: Adjusting a pre-trained model on a specific task or dataset.\n", + "Explanation: Fine-tuning involves taking a model that has already been trained on a large dataset and adjusting it for a specific application.\n", + "\n", + "Question 7:\n", + "Question: What is one of the main challenges when working with LLMs?\n", + "Options:\n", + " A. They require too much hardware.\n", + " B. Bias in the training data can lead to biased outputs.\n", + " C. They are always accurate.\n", + " D. They cannot understand context.\n", + "\n", + "Correct Answer: Bias in the training data can lead to biased outputs.\n", + "Explanation: LLMs can inadvertently learn biases present in their training data, which may result in biased or inappropriate outputs.\n", + "\n", + "Question 8:\n", + "Question: Which of the following best describes the training process of LLMs?\n", + "Options:\n", + " A. They are trained only on labeled datasets.\n", + " B. They are typically trained on vast amounts of text data using unsupervised learning.\n", + " C. They require human intervention for every training step.\n", + " D. They learn only from structured data.\n", + "\n", + "Correct Answer: They are typically trained on vast amounts of text data using unsupervised learning.\n", + "Explanation: LLMs are trained on large datasets using unsupervised learning methods, allowing them to learn language patterns.\n", + "\n", + "Question 9:\n", + "Question: Which task is NOT typically performed by LLMs?\n", + "Options:\n", + " A. Text generation\n", + " B. Summarization\n", + " C. Sentiment analysis\n", + " D. Solving complex mathematical equations.\n", + "\n", + "Correct Answer: Solving complex mathematical equations.\n", + "Explanation: While LLMs can assist with some mathematical tasks, they are primarily designed for natural language understanding and generation.\n", + "\n", + "Question 10:\n", + "Question: What is the role of context in LLMs?\n", + "Options:\n", + " A. Context is irrelevant.\n", + " B. Context helps the model generate relevant and coherent responses.\n", + " C. LLMs ignore context.\n", + " D. Context is only used in training.\n", + "\n", + "Correct Answer: Context helps the model generate relevant and coherent responses.\n", + "Explanation: LLMs rely on context to understand the meaning behind input prompts and generate appropriate responses.\n", "\n" ] } @@ -1443,7 +1581,7 @@ "\n", "questions = client.qna_engine.generate_questions(\n", " topic=\"Machine Learning\",\n", - " num=3,\n", + " num=10,\n", " question_type=\"Multiple Choice\",) # #supported types : \"Multiple Choice\", \"Short Answer\", \"True/False\", \"Fill in the Blank\"\n", "\n", "questions.show()" @@ -1453,7 +1591,7 @@ "base_uri": "https://localhost:8080/" }, "id": "cp-nkbUi42T8", - "outputId": "e7573ccd-fba6-4ca1-c0ce-3a5cf25ffdda" + "outputId": "285a97db-a73b-442d-a828-bfb751db9904" }, "execution_count": null, "outputs": [ @@ -1464,35 +1602,112 @@ "Question 1:\n", "Question: What is the primary goal of supervised learning in machine learning?\n", "Options:\n", - " A. To learn a mapping from inputs to outputs based on labeled training data.\n", - " B. To find hidden patterns in unlabeled data.\n", - " C. To reduce the dimensionality of data.\n", - " D. To cluster data points into groups.\n", + " A. To cluster data points into groups.\n", + " B. To learn a mapping from inputs to outputs using labeled data.\n", + " C. To generate new data points.\n", + " D. To find hidden patterns in unlabeled data.\n", "\n", - "Correct Answer: To learn a mapping from inputs to outputs based on labeled training data.\n", - "Explanation: Supervised learning involves training a model on a labeled dataset, where the model learns to predict the output for new, unseen inputs based on the patterns it has learned.\n", + "Correct Answer: To learn a mapping from inputs to outputs using labeled data.\n", + "Explanation: Supervised learning relies on labeled datasets to train models that can predict outcomes for new, unseen data.\n", "\n", "Question 2:\n", - "Question: Which of the following algorithms is commonly used for classification tasks?\n", + "Question: Which of the following is NOT a common type of machine learning?\n", "Options:\n", - " A. Support Vector Machines (SVM)\n", - " B. K-Means Clustering\n", - " C. Principal Component Analysis (PCA)\n", - " D. Linear Regression\n", + " A. Supervised Learning\n", + " B. Unsupervised Learning\n", + " C. Reinforcement Learning\n", + " D. Random Learning\n", "\n", - "Correct Answer: Support Vector Machines (SVM)\n", - "Explanation: Support Vector Machines are a type of supervised learning algorithm that can be used for classification tasks by finding the hyperplane that best separates different classes.\n", + "Correct Answer: Random Learning\n", + "Explanation: The major types of machine learning include supervised learning, unsupervised learning, and reinforcement learning; 'Random Learning' is not a recognized type.\n", "\n", "Question 3:\n", - "Question: What is overfitting in the context of machine learning?\n", + "Question: What is overfitting in machine learning?\n", + "Options:\n", + " A. When a model learns the training data too well, including its noise.\n", + " B. When a model performs well on unseen data.\n", + " C. When a model is too simple to capture the underlying pattern.\n", + " D. When a model has high bias.\n", + "\n", + "Correct Answer: When a model learns the training data too well, including its noise.\n", + "Explanation: Overfitting occurs when a model becomes too complex and captures noise instead of the underlying pattern, leading to poor performance on new data.\n", + "\n", + "Question 4:\n", + "Question: What is the purpose of a confusion matrix?\n", + "Options:\n", + " A. To evaluate the performance of a classification model.\n", + " B. To visualize the data distribution.\n", + " C. To optimize hyperparameters.\n", + " D. To perform feature selection.\n", + "\n", + "Correct Answer: To evaluate the performance of a classification model.\n", + "Explanation: A confusion matrix displays the true positives, false positives, true negatives, and false negatives to help assess model accuracy and performance.\n", + "\n", + "Question 5:\n", + "Question: Which algorithm is commonly used for classification tasks?\n", + "Options:\n", + " A. Linear Regression\n", + " B. Support Vector Machines (SVM)\n", + " C. K-Means Clustering\n", + " D. Principal Component Analysis (PCA)\n", + "\n", + "Correct Answer: Support Vector Machines (SVM)\n", + "Explanation: Support Vector Machines are widely used for classification due to their effectiveness in high-dimensional spaces and capacity to handle non-linear boundaries.\n", + "\n", + "Question 6:\n", + "Question: What is the main advantage of using ensemble methods in machine learning?\n", "Options:\n", - " A. When a model learns the training data too well, including its noise, leading to poor generalization on unseen data.\n", - " B. When a model performs poorly on both training and test data.\n", - " C. When a model generalizes well to unseen data.\n", - " D. When a model is too simple to capture the underlying patterns.\n", + " A. They simplify the model.\n", + " B. They combine multiple models to improve prediction accuracy.\n", + " C. They reduce the size of the dataset.\n", + " D. They eliminate the need for feature selection.\n", "\n", - "Correct Answer: When a model learns the training data too well, including its noise, leading to poor generalization on unseen data.\n", - "Explanation: Overfitting occurs when a model is too complex and captures noise instead of the underlying distribution, resulting in high performance on training data but low performance on test data.\n", + "Correct Answer: They combine multiple models to improve prediction accuracy.\n", + "Explanation: Ensemble methods leverage the strengths of various models to reduce variance and bias, often resulting in better performance than any single model.\n", + "\n", + "Question 7:\n", + "Question: What does the term 'feature engineering' refer to?\n", + "Options:\n", + " A. The process of collecting data.\n", + " B. The process of selecting and transforming variables to improve model performance.\n", + " C. The process of evaluating a model.\n", + " D. The process of tuning hyperparameters.\n", + "\n", + "Correct Answer: The process of selecting and transforming variables to improve model performance.\n", + "Explanation: Feature engineering involves creating new input features or modifying existing ones to better capture the underlying patterns in the data.\n", + "\n", + "Question 8:\n", + "Question: What is cross-validation used for in machine learning?\n", + "Options:\n", + " A. To assess how the results of a statistical analysis will generalize to an independent dataset.\n", + " B. To increase the size of the training dataset.\n", + " C. To optimize the model parameters.\n", + " D. To visualize the data.\n", + "\n", + "Correct Answer: To assess how the results of a statistical analysis will generalize to an independent dataset.\n", + "Explanation: Cross-validation helps to estimate the skill of the model on unseen data and reduces the risk of overfitting.\n", + "\n", + "Question 9:\n", + "Question: Which of the following is a common metric used to evaluate regression models?\n", + "Options:\n", + " A. Accuracy\n", + " B. Mean Absolute Error (MAE)\n", + " C. F1 Score\n", + " D. Confusion Matrix\n", + "\n", + "Correct Answer: Mean Absolute Error (MAE)\n", + "Explanation: Mean Absolute Error is a widely used metric that measures the average magnitude of errors in a set of predictions, without considering their direction.\n", + "\n", + "Question 10:\n", + "Question: What is the role of an activation function in a neural network?\n", + "Options:\n", + " A. To initialize the weights of the model.\n", + " B. To introduce non-linearity into the model.\n", + " C. To optimize the learning rate.\n", + " D. To calculate the loss function.\n", + "\n", + "Correct Answer: To introduce non-linearity into the model.\n", + "Explanation: Activation functions allow neural networks to learn complex patterns by introducing non-linear transformations of the input data.\n", "\n" ] } @@ -1516,7 +1731,7 @@ "\n", "questions = client.qna_engine.generate_questions(\n", " topic=\"Gravitation\",\n", - " num=3,\n", + " num=10,\n", " question_type=\"Fill in the Blank\",) # #supported types : \"Multiple Choice\", \"Short Answer\", \"True/False\", \"Fill in the Blank\"\n", "\n", "questions.show()" @@ -1526,7 +1741,7 @@ "base_uri": "https://localhost:8080/" }, "id": "E8-V6Ixe6ZMQ", - "outputId": "70a09bf6-f637-46fc-bdb0-e390bd42565c" + "outputId": "8b2c4784-910e-4056-9881-19b16f191250" }, "execution_count": null, "outputs": [ @@ -1535,33 +1750,82 @@ "name": "stdout", "text": [ "Question 1:\n", - "Question: The force of attraction between two masses is known as ______.\n", + "Question: The force of attraction between two masses is called __________.\n", "Answer: gravitation\n", - "Explanation: Gravitation is the universal force that attracts two bodies towards each other, depending on their masses and the distance between them.\n", + "Explanation: Gravitation is the natural phenomenon by which all things with mass are brought toward one another.\n", "\n", "Word to fill: gravitation\n", "\n", "Question 2:\n", - "Question: According to Newton's law of universal gravitation, the gravitational force is directly proportional to the product of the masses and inversely proportional to the square of the ______ between them.\n", + "Question: According to Newton's law of universal gravitation, the gravitational force is directly proportional to the product of the masses and inversely proportional to the square of the __________ between them.\n", "Answer: distance\n", - "Explanation: This law states that as the distance between two masses increases, the gravitational force between them decreases rapidly.\n", + "Explanation: This relationship means that as the distance between two masses increases, the gravitational force decreases.\n", "\n", "Word to fill: distance\n", "\n", "Question 3:\n", - "Question: The gravitational pull of the Earth gives objects weight, which is a force calculated by multiplying mass by the acceleration due to ______.\n", + "Question: The gravitational pull of the Earth gives us our weight, which is measured in __________.\n", + "Answer: newtons\n", + "Explanation: Weight is the force exerted by gravity on an object, and it is measured in newtons (N).\n", + "\n", + "Word to fill: newtons\n", + "\n", + "Question 4:\n", + "Question: The acceleration due to gravity on the surface of the Earth is approximately __________ m/s².\n", + "Answer: 9.81\n", + "Explanation: This value represents the acceleration an object experiences when falling freely under the influence of Earth's gravity.\n", + "\n", + "Word to fill: 9.81\n", + "\n", + "Question 5:\n", + "Question: In the context of gravitation, the term __________ refers to the curvature of spacetime caused by massive objects, as described by Einstein's theory of general relativity.\n", "Answer: gravity\n", - "Explanation: Weight is a measure of the force exerted on an object due to gravity, which on Earth is approximately 9.81 m/s².\n", + "Explanation: General relativity describes gravity not as a force but as a curvature of spacetime created by mass.\n", "\n", "Word to fill: gravity\n", - "\n" - ] - } - ] - }, - { - "cell_type": "markdown", - "source": [ + "\n", + "Question 6:\n", + "Question: The __________ is a measure of the amount of matter in an object, which affects its gravitational attraction.\n", + "Answer: mass\n", + "Explanation: Mass is a scalar quantity that, along with distance, plays a crucial role in gravitational interactions.\n", + "\n", + "Word to fill: mass\n", + "\n", + "Question 7:\n", + "Question: The gravitational force between two objects decreases as the __________ between them increases.\n", + "Answer: distance\n", + "Explanation: This is a fundamental concept in Newton's law of universal gravitation—greater distances lead to weaker gravitational forces.\n", + "\n", + "Word to fill: distance\n", + "\n", + "Question 8:\n", + "Question: The orbit of planets around the Sun is an example of how __________ governs celestial bodies.\n", + "Answer: gravitation\n", + "Explanation: Gravitation is the force that keeps planets in orbit around stars and moons around planets.\n", + "\n", + "Word to fill: gravitation\n", + "\n", + "Question 9:\n", + "Question: One of the consequences of gravitational attraction is that it causes objects to __________ toward each other.\n", + "Answer: accelerate\n", + "Explanation: According to Newton's second law of motion, an object will accelerate towards another due to gravitational force.\n", + "\n", + "Word to fill: accelerate\n", + "\n", + "Question 10:\n", + "Question: The concept of __________ refers to the strength of a gravitational field at a given point in space.\n", + "Answer: gravitational field strength\n", + "Explanation: Gravitational field strength is defined as the force per unit mass experienced by a small test mass placed in the field.\n", + "\n", + "Word to fill: gravitational field strength\n", + "\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ "###✅ Short Answer\n", "\n" ], @@ -1578,7 +1842,7 @@ "\n", "questions = client.qna_engine.generate_questions(\n", " topic=\"Atoms\",\n", - " num=5,\n", + " num=10,\n", " question_type=\"Short Answer\",\n", " difficulty_level=\"Intermediate\", ) # #supported types : \"Multiple Choice\", \"Short Answer\", \"True/False\", \"Fill in the Blank\"\n", "\n", @@ -1588,7 +1852,7 @@ "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "a7ac524f-f140-42c7-9385-7d3ca66bbf2b", + "outputId": "fe46ed28-11f5-4094-d6b7-4c6f5a930e9b", "id": "Hgy9sv4S61wc" }, "execution_count": null, @@ -1598,39 +1862,74 @@ "name": "stdout", "text": [ "Question 1:\n", - "Question: What is the smallest unit of matter?\n", + "Question: What is the basic unit of matter?\n", "Answer: Atom\n", - "Explanation: An atom is the basic building block of all matter, and it consists of protons, neutrons, and electrons.\n", + "Explanation: Atoms are the smallest units of matter that retain the properties of an element.\n", "\n", - "Keywords: atom, smallest unit, matter\n", + "Keywords: atom, matter, element\n", "\n", "Question 2:\n", - "Question: What particles make up an atom's nucleus?\n", - "Answer: Protons and neutrons\n", - "Explanation: The nucleus of an atom contains protons, which are positively charged, and neutrons, which have no charge.\n", + "Question: What are the three main subatomic particles found in an atom?\n", + "Answer: Protons, neutrons, and electrons\n", + "Explanation: Protons and neutrons are found in the nucleus, while electrons orbit around the nucleus.\n", "\n", - "Keywords: nucleus, protons, neutrons\n", + "Keywords: subatomic particles, protons, neutrons, electrons\n", "\n", "Question 3:\n", + "Question: What is the charge of a proton?\n", + "Answer: Positive\n", + "Explanation: Protons carry a positive electric charge, which is essential for the structure of atoms.\n", + "\n", + "Keywords: proton, charge, positive\n", + "\n", + "Question 4:\n", "Question: What is the charge of an electron?\n", "Answer: Negative\n", - "Explanation: Electrons are subatomic particles that carry a negative charge, which is equal in magnitude but opposite in sign to the charge of protons.\n", + "Explanation: Electrons have a negative charge, which balances the positive charge of protons in an atom.\n", "\n", "Keywords: electron, charge, negative\n", "\n", - "Question 4:\n", + "Question 5:\n", + "Question: Where are neutrons located in an atom?\n", + "Answer: In the nucleus\n", + "Explanation: Neutrons are found in the nucleus along with protons, helping to stabilize the atom.\n", + "\n", + "Keywords: neutron, nucleus, atom\n", + "\n", + "Question 6:\n", "Question: What determines the atomic number of an element?\n", "Answer: The number of protons\n", - "Explanation: The atomic number of an element is defined by the number of protons in its nucleus, which also determines the element's identity.\n", + "Explanation: The atomic number is defined by the number of protons in the nucleus of an atom.\n", "\n", "Keywords: atomic number, protons, element\n", "\n", - "Question 5:\n", - "Question: What are isotopes?\n", - "Answer: Atoms of the same element with different numbers of neutrons\n", - "Explanation: Isotopes are variants of a particular chemical element that have the same number of protons but a different number of neutrons, leading to different atomic masses.\n", + "Question 7:\n", + "Question: What is the main difference between isotopes of an element?\n", + "Answer: The number of neutrons\n", + "Explanation: Isotopes differ in the number of neutrons while having the same number of protons.\n", "\n", - "Keywords: isotopes, neutrons, atomic mass\n", + "Keywords: isotope, neutrons, protons\n", + "\n", + "Question 8:\n", + "Question: What is the electron cloud?\n", + "Answer: A region around the nucleus where electrons are likely to be found\n", + "Explanation: The electron cloud represents the probable locations of electrons around the nucleus.\n", + "\n", + "Keywords: electron cloud, nucleus, electrons\n", + "\n", + "Question 9:\n", + "Question: What is a valence electron?\n", + "Answer: An electron in the outermost shell of an atom\n", + "Explanation: Valence electrons are important for chemical bonding and reactions.\n", + "\n", + "Keywords: valence electron, outer shell, chemical bonding\n", + "\n", + "Question 10:\n", + "Question: What is the significance of the periodic table?\n", + "Answer: It organizes elements based on atomic number and properties\n", + "Explanation: The periodic table helps predict the behavior of elements based on their position.\n", + "\n", + "Keywords: periodic table, elements, atomic number\n", "\n" ] } @@ -1655,7 +1954,7 @@ "\n", "questions = client.qna_engine.generate_questions(\n", " topic=\"quntum Computing\",\n", - " num=5,\n", + " num=10,\n", " question_type=\"True/False\",\n", " difficulty_level=\"Intermediate\", ) # #supported types : \"Multiple Choice\", \"Short Answer\", \"True/False\", \"Fill in the Blank\"\n", "\n", @@ -1665,7 +1964,7 @@ "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "7d9e4ace-8c0a-40b0-e782-97635409fb73", + "outputId": "536f7f23-6ad5-47a4-c9a7-c769c712f156", "id": "UYAbeT4x7Qw5" }, "execution_count": null, @@ -1675,37 +1974,72 @@ "name": "stdout", "text": [ "Question 1:\n", - "Question: Quantum computing uses classical bits as its basic unit of information.\n", + "Question: Quantum computers use classical bits for processing.\n", "Answer: False\n", - "Explanation: Quantum computing uses quantum bits, or qubits, which can represent and store information in a fundamentally different way than classical bits, allowing for more complex computations.\n", + "Explanation: Quantum computers use qubits, which can exist in multiple states simultaneously, unlike classical bits which are either 0 or 1.\n", "\n", "True/False: False\n", "\n", "Question 2:\n", - "Question: Quantum entanglement is a phenomenon that allows qubits to be interconnected, even when separated by large distances.\n", + "Question: Entanglement is a phenomenon where qubits become linked in such a way that the state of one directly affects the state of another, regardless of distance.\n", "Answer: True\n", - "Explanation: Quantum entanglement is a key principle of quantum mechanics where particles become linked, and the state of one particle can depend on the state of another, regardless of the distance separating them.\n", + "Explanation: Entanglement is a key feature of quantum mechanics that allows qubits to be interconnected in a unique way.\n", "\n", "True/False: True\n", "\n", "Question 3:\n", - "Question: A quantum computer can solve all problems faster than a classical computer.\n", + "Question: Shor's algorithm is designed for efficiently solving problems that can be solved in polynomial time on classical computers.\n", "Answer: False\n", - "Explanation: While quantum computers have the potential to outperform classical computers for certain problems (like factoring large numbers or simulating quantum systems), they are not universally faster for all types of computations.\n", + "Explanation: Shor's algorithm is specifically designed to factor large numbers exponentially faster than the best-known classical algorithms.\n", "\n", "True/False: False\n", "\n", "Question 4:\n", - "Question: Superposition is a fundamental principle that allows qubits to exist in multiple states at once.\n", + "Question: Quantum superposition allows a qubit to be in a state of 0, 1, or both at the same time.\n", "Answer: True\n", - "Explanation: Superposition allows quantum bits to be in a combination of both 0 and 1 states simultaneously, which is what gives quantum computers their computational power.\n", + "Explanation: Superposition is a fundamental principle of quantum mechanics that allows qubits to exist in multiple states simultaneously.\n", "\n", "True/False: True\n", "\n", "Question 5:\n", - "Question: Quantum algorithms can be run on classical computers without any modifications.\n", + "Question: Quantum computing has no applications in cryptography.\n", + "Answer: False\n", + "Explanation: Quantum computing has significant implications for cryptography, particularly in breaking classical encryption methods.\n", + "\n", + "True/False: False\n", + "\n", + "Question 6:\n", + "Question: Quantum computers can solve certain problems faster than classical computers.\n", + "Answer: True\n", + "Explanation: Quantum computers can outperform classical computers on specific tasks due to their ability to process a vast number of possibilities simultaneously.\n", + "\n", + "True/False: True\n", + "\n", + "Question 7:\n", + "Question: The concept of quantum tunneling is irrelevant to quantum computing.\n", + "Answer: False\n", + "Explanation: Quantum tunneling is a phenomenon that can be exploited in quantum computing for certain algorithms and processes.\n", + "\n", + "True/False: False\n", + "\n", + "Question 8:\n", + "Question: Quantum decoherence is the loss of quantum behavior due to the interaction with the environment.\n", + "Answer: True\n", + "Explanation: Decoherence is a major challenge in quantum computing, as it leads to the loss of information stored in qubits.\n", + "\n", + "True/False: True\n", + "\n", + "Question 9:\n", + "Question: All quantum computers are built using superconducting circuits.\n", "Answer: False\n", - "Explanation: Quantum algorithms are designed to take advantage of quantum mechanics, and they cannot be run on classical computers without significant changes, as classical computers do not exploit the principles of superposition and entanglement.\n", + "Explanation: There are various technologies for building quantum computers, including trapped ions, topological qubits, and photonic systems, in addition to superconducting circuits.\n", + "\n", + "True/False: False\n", + "\n", + "Question 10:\n", + "Question: Quantum algorithms can outperform classical algorithms for all types of problems.\n", + "Answer: False\n", + "Explanation: Quantum algorithms are more efficient for specific problems, such as factoring and searching unsorted databases, but not for all problems.\n", "\n", "True/False: False\n", "\n" @@ -1730,192 +2064,16 @@ "client = Educhain()\n", "\n", "plan = client.content_engine.generate_lesson_plan(\n", - " topic = \"Newton's Law of Motion\")\n", + " topic = \"Arithmetic\")\n", "\n", "print(plan)\n", "plan.json() # plan.dict()" ], "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 1000 - }, - "id": "4VGBeR5m-hUO", - "outputId": "a659d386-c030-4cad-a811-69831f02fa3c" + "id": "4VGBeR5m-hUO" }, "execution_count": null, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Raw output from LLM:\n", - "```json\n", - "{\n", - " \"title\": \"Understanding Newton's Laws of Motion\",\n", - " \"subject\": \"Physics\",\n", - " \"learning_objectives\": [\n", - " \"Identify and explain the three laws of motion.\",\n", - " \"Apply Newton's laws to everyday scenarios and experiments.\",\n", - " \"Analyze the effects of forces on motion and evaluate real-world applications.\"\n", - " ],\n", - " \"lesson_introduction\": \"Imagine you are in a car that suddenly accelerates or a ball rolling down a hill. What forces are at play? Today, we will explore how Newton's Laws of Motion explain these everyday phenomena. Have you ever wondered how athletes use these laws to improve their performance? Let's find out!\",\n", - " \"main_topics\": [\n", - " {\n", - " \"title\": \"Newton's First Law of Motion\",\n", - " \"subtopics\": [\n", - " {\n", - " \"title\": \"Inertia and Motion\",\n", - " \"key_concepts\": [\n", - " {\n", - " \"type\": \"definition\",\n", - " \"content\": \"Newton's First Law states that an object at rest will stay at rest, and an object in motion will stay in motion unless acted upon by a net external force.\"\n", - " },\n", - " {\n", - " \"type\": \"example\",\n", - " \"content\": \"Example: A book on a table remains at rest until someone pushes it.\"\n", - " },\n", - " {\n", - " \"type\": \"multimedia\",\n", - " \"content\": \"Video demonstrating everyday examples of inertia.\"\n", - " }\n", - " ],\n", - " \"discussion_questions\": [\n", - " {\n", - " \"question\": \"Can you think of a situation where you experienced inertia?\"\n", - " }\n", - " ],\n", - " \"hands_on_activities\": [\n", - " {\n", - " \"title\": \"Inertia Experiment\",\n", - " \"description\": \"Use a toy car and a ramp to demonstrate how objects in motion stay in motion.\"\n", - " }\n", - " ],\n", - " \"reflective_questions\": [\n", - " {\n", - " \"question\": \"How does inertia affect our daily lives?\"\n", - " }\n", - " ],\n", - " \"assessment_ideas\": [\n", - " {\n", - " \"type\": \"project\",\n", - " \"description\": \"Create a poster illustrating Newton's First Law with real-life examples.\"\n", - " }\n", - " ]\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"title\": \"Newton's Second Law of Motion\",\n", - " \"subtopics\": [\n", - " {\n", - " \"title\": \"Force, Mass, and Acceleration\",\n", - " \"key_concepts\": [\n", - " {\n", - " \"type\": \"definition\",\n", - " \"content\": \"Newton's Second Law states that Force equals mass times acceleration (F = ma).\"\n", - " },\n", - " {\n", - " \"type\": \"example\",\n", - " \"content\": \"Example: Pushing a heavier box requires more force than a lighter box.\"\n", - " },\n", - " {\n", - " \"type\": \"illustration\",\n", - " \"content\": \"Diagram showing how force, mass, and acceleration relate in different scenarios.\"\n", - " }\n", - " ],\n", - " \"discussion_questions\": [\n", - " {\n", - " \"question\": \"What factors do you think affect an object's acceleration?\"\n", - " }\n", - " ],\n", - " \"hands_on_activities\": [\n", - " {\n", - " \"title\": \"Force and Acceleration Lab\",\n", - " \"description\": \"Conduct experiments using different weights and measure the acceleration of toy cars.\"\n", - " }\n", - " ],\n", - " \"reflective_questions\": [\n", - " {\n", - " \"question\": \"How does this law apply to vehicles and transportation?\"\n", - " }\n", - " ],\n", - " \"assessment_ideas\": [\n", - " {\n", - " \"type\": \"quiz\",\n", - " \"description\": \"A short quiz on the calculations using F = ma with given masses and forces.\"\n", - " }\n", - " ]\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"title\": \"Newton's Third Law of Motion\",\n", - " \"subtopics\": [\n", - " {\n", - " \"title\": \"Action and Reaction\",\n", - " \"key_concepts\": [\n", - " {\n", - " \"type\": \"definition\",\n", - " \"content\": \"Newton's Third Law states that for every action, there is an equal and opposite reaction.\"\n", - " },\n", - " {\n", - " \"type\": \"example\",\n", - " \"content\": \"Example: When you jump off a small boat, the boat moves backward.\"\n", - " },\n", - " {\n", - " \"type\": \"multimedia\",\n", - " \"content\": \"Interactive simulation showing action-reaction pairs.\"\n", - " }\n", - " ],\n", - " \"discussion_questions\": [\n", - " {\n", - " \"question\": \"Can you provide another example of action and reaction in sports?\"\n", - " }\n", - " ],\n", - " \"hands_on_activities\": [\n", - " {\n", - " \"title\": \"Balloon Rocket Experiment\",\n", - " \"description\": \"Create a balloon rocket to visualize action and reaction forces.\"\n", - " }\n", - " ],\n", - " \"reflective_questions\": [\n", - " {\n", - " \"question\": \"How does understanding these forces help in designing safer vehicles?\"\n", - " }\n", - " ],\n", - " \"assessment_ideas\": [\n", - " {\n", - " \"type\": \"written task\",\n", - " \"description\": \"Write a short essay on how Newton's Third Law is observed in space travel.\"\n", - " }\n", - " ]\n", - " }\n", - " ]\n", - " }\n", - " ],\n", - " \"learning_adaptations\": \"For younger students, simplify the concepts with more visuals and interactive games. For advanced learners, introduce applications in engineering and aerodynamics.\",\n", - " \"real_world_applications\": \"Newton's laws are essential in various fields such as engineering, sports science, and even space exploration. Careers in physics, engineering, and robotics heavily rely on these principles.\",\n", - " \"ethical_considerations\": \"Understanding forces and motion is crucial in designing technologies that are safe for public use, such as vehicles and amusement park rides. The ethical implications of using this knowledge in developing advanced weaponry or in aerospace technology must also be considered.\"\n", - "}\n", - "```\n", - "title=\"Understanding Newton's Laws of Motion\" subject='Physics' learning_objectives=['Identify and explain the three laws of motion.', \"Apply Newton's laws to everyday scenarios and experiments.\", 'Analyze the effects of forces on motion and evaluate real-world applications.'] lesson_introduction=\"Imagine you are in a car that suddenly accelerates or a ball rolling down a hill. What forces are at play? Today, we will explore how Newton's Laws of Motion explain these everyday phenomena. Have you ever wondered how athletes use these laws to improve their performance? Let's find out!\" main_topics=[MainTopic(title=\"Newton's First Law of Motion\", subtopics=[SubTopic(title='Inertia and Motion', key_concepts=[ContentElement(type='definition', content=\"Newton's First Law states that an object at rest will stay at rest, and an object in motion will stay in motion unless acted upon by a net external force.\"), ContentElement(type='example', content='Example: A book on a table remains at rest until someone pushes it.'), ContentElement(type='multimedia', content='Video demonstrating everyday examples of inertia.')], discussion_questions=[DiscussionQuestion(question='Can you think of a situation where you experienced inertia?')], hands_on_activities=[HandsOnActivity(title='Inertia Experiment', description='Use a toy car and a ramp to demonstrate how objects in motion stay in motion.')], reflective_questions=[ReflectiveQuestion(question='How does inertia affect our daily lives?')], assessment_ideas=[AssessmentIdea(type='project', description=\"Create a poster illustrating Newton's First Law with real-life examples.\")])]), MainTopic(title=\"Newton's Second Law of Motion\", subtopics=[SubTopic(title='Force, Mass, and Acceleration', key_concepts=[ContentElement(type='definition', content=\"Newton's Second Law states that Force equals mass times acceleration (F = ma).\"), ContentElement(type='example', content='Example: Pushing a heavier box requires more force than a lighter box.'), ContentElement(type='illustration', content='Diagram showing how force, mass, and acceleration relate in different scenarios.')], discussion_questions=[DiscussionQuestion(question=\"What factors do you think affect an object's acceleration?\")], hands_on_activities=[HandsOnActivity(title='Force and Acceleration Lab', description='Conduct experiments using different weights and measure the acceleration of toy cars.')], reflective_questions=[ReflectiveQuestion(question='How does this law apply to vehicles and transportation?')], assessment_ideas=[AssessmentIdea(type='quiz', description='A short quiz on the calculations using F = ma with given masses and forces.')])]), MainTopic(title=\"Newton's Third Law of Motion\", subtopics=[SubTopic(title='Action and Reaction', key_concepts=[ContentElement(type='definition', content=\"Newton's Third Law states that for every action, there is an equal and opposite reaction.\"), ContentElement(type='example', content='Example: When you jump off a small boat, the boat moves backward.'), ContentElement(type='multimedia', content='Interactive simulation showing action-reaction pairs.')], discussion_questions=[DiscussionQuestion(question='Can you provide another example of action and reaction in sports?')], hands_on_activities=[HandsOnActivity(title='Balloon Rocket Experiment', description='Create a balloon rocket to visualize action and reaction forces.')], reflective_questions=[ReflectiveQuestion(question='How does understanding these forces help in designing safer vehicles?')], assessment_ideas=[AssessmentIdea(type='written task', description=\"Write a short essay on how Newton's Third Law is observed in space travel.\")])])] learning_adaptations='For younger students, simplify the concepts with more visuals and interactive games. For advanced learners, introduce applications in engineering and aerodynamics.' real_world_applications=\"Newton's laws are essential in various fields such as engineering, sports science, and even space exploration. Careers in physics, engineering, and robotics heavily rely on these principles.\" ethical_considerations='Understanding forces and motion is crucial in designing technologies that are safe for public use, such as vehicles and amusement park rides. The ethical implications of using this knowledge in developing advanced weaponry or in aerospace technology must also be considered.'\n" - ] - }, - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "'{\"title\":\"Understanding Newton\\'s Laws of Motion\",\"subject\":\"Physics\",\"learning_objectives\":[\"Identify and explain the three laws of motion.\",\"Apply Newton\\'s laws to everyday scenarios and experiments.\",\"Analyze the effects of forces on motion and evaluate real-world applications.\"],\"lesson_introduction\":\"Imagine you are in a car that suddenly accelerates or a ball rolling down a hill. What forces are at play? Today, we will explore how Newton\\'s Laws of Motion explain these everyday phenomena. Have you ever wondered how athletes use these laws to improve their performance? Let\\'s find out!\",\"main_topics\":[{\"title\":\"Newton\\'s First Law of Motion\",\"subtopics\":[{\"title\":\"Inertia and Motion\",\"key_concepts\":[{\"type\":\"definition\",\"content\":\"Newton\\'s First Law states that an object at rest will stay at rest, and an object in motion will stay in motion unless acted upon by a net external force.\"},{\"type\":\"example\",\"content\":\"Example: A book on a table remains at rest until someone pushes it.\"},{\"type\":\"multimedia\",\"content\":\"Video demonstrating everyday examples of inertia.\"}],\"discussion_questions\":[{\"question\":\"Can you think of a situation where you experienced inertia?\"}],\"hands_on_activities\":[{\"title\":\"Inertia Experiment\",\"description\":\"Use a toy car and a ramp to demonstrate how objects in motion stay in motion.\"}],\"reflective_questions\":[{\"question\":\"How does inertia affect our daily lives?\"}],\"assessment_ideas\":[{\"type\":\"project\",\"description\":\"Create a poster illustrating Newton\\'s First Law with real-life examples.\"}]}]},{\"title\":\"Newton\\'s Second Law of Motion\",\"subtopics\":[{\"title\":\"Force, Mass, and Acceleration\",\"key_concepts\":[{\"type\":\"definition\",\"content\":\"Newton\\'s Second Law states that Force equals mass times acceleration (F = ma).\"},{\"type\":\"example\",\"content\":\"Example: Pushing a heavier box requires more force than a lighter box.\"},{\"type\":\"illustration\",\"content\":\"Diagram showing how force, mass, and acceleration relate in different scenarios.\"}],\"discussion_questions\":[{\"question\":\"What factors do you think affect an object\\'s acceleration?\"}],\"hands_on_activities\":[{\"title\":\"Force and Acceleration Lab\",\"description\":\"Conduct experiments using different weights and measure the acceleration of toy cars.\"}],\"reflective_questions\":[{\"question\":\"How does this law apply to vehicles and transportation?\"}],\"assessment_ideas\":[{\"type\":\"quiz\",\"description\":\"A short quiz on the calculations using F = ma with given masses and forces.\"}]}]},{\"title\":\"Newton\\'s Third Law of Motion\",\"subtopics\":[{\"title\":\"Action and Reaction\",\"key_concepts\":[{\"type\":\"definition\",\"content\":\"Newton\\'s Third Law states that for every action, there is an equal and opposite reaction.\"},{\"type\":\"example\",\"content\":\"Example: When you jump off a small boat, the boat moves backward.\"},{\"type\":\"multimedia\",\"content\":\"Interactive simulation showing action-reaction pairs.\"}],\"discussion_questions\":[{\"question\":\"Can you provide another example of action and reaction in sports?\"}],\"hands_on_activities\":[{\"title\":\"Balloon Rocket Experiment\",\"description\":\"Create a balloon rocket to visualize action and reaction forces.\"}],\"reflective_questions\":[{\"question\":\"How does understanding these forces help in designing safer vehicles?\"}],\"assessment_ideas\":[{\"type\":\"written task\",\"description\":\"Write a short essay on how Newton\\'s Third Law is observed in space travel.\"}]}]}],\"learning_adaptations\":\"For younger students, simplify the concepts with more visuals and interactive games. For advanced learners, introduce applications in engineering and aerodynamics.\",\"real_world_applications\":\"Newton\\'s laws are essential in various fields such as engineering, sports science, and even space exploration. Careers in physics, engineering, and robotics heavily rely on these principles.\",\"ethical_considerations\":\"Understanding forces and motion is crucial in designing technologies that are safe for public use, such as vehicles and amusement park rides. The ethical implications of using this knowledge in developing advanced weaponry or in aerospace technology must also be considered.\"}'" - ], - "application/vnd.google.colaboratory.intrinsic+json": { - "type": "string" - } - }, - "metadata": {}, - "execution_count": 28 - } - ] + "outputs": [] }, { "cell_type": "code", @@ -1927,7 +2085,7 @@ "base_uri": "https://localhost:8080/" }, "id": "2436fi6X-wxg", - "outputId": "5e3437aa-7ba0-4378-8894-9c932b78047e" + "outputId": "c74a8a8c-7fa3-49ed-8f58-df319748bee2" }, "execution_count": null, "outputs": [ @@ -1936,63 +2094,47 @@ "name": "stdout", "text": [ "================================================================================\n", - "Lesson Plan: Understanding Newton's Laws of Motion\n", + "Lesson Plan: Exploring Newton's Laws of Motion\n", "Subject: Physics\n", - "Learning Objectives: Identify and explain the three laws of motion., Apply Newton's laws to everyday scenarios and experiments., Analyze the effects of forces on motion and evaluate real-world applications.\n", - "Lesson Introduction: Imagine you are in a car that suddenly accelerates or a ball rolling down a hill. What forces are at play? Today, we will explore how Newton's Laws of Motion explain these everyday phenomena. Have you ever wondered how athletes use these laws to improve their performance? Let's find out!\n", "================================================================================\n", "\n", - "Main Topic 1: Newton's First Law of Motion\n", - "\n", - " Subtopic 1.1: Inertia and Motion\n", - " Key Concepts:\n", - " - Definition: Newton's First Law states that an object at rest will stay at rest, and an object in motion will stay in motion unless acted upon by a net external force.\n", - " - Example: Example: A book on a table remains at rest until someone pushes it.\n", - " - Multimedia: Video demonstrating everyday examples of inertia.\n", - " Discussion Questions:\n", - " - Can you think of a situation where you experienced inertia?\n", - " Hands-On Activities:\n", - " - Inertia Experiment: Use a toy car and a ramp to demonstrate how objects in motion stay in motion.\n", - " Reflective Questions:\n", - " - How does inertia affect our daily lives?\n", - " Assessment Ideas:\n", - " - Project: Create a poster illustrating Newton's First Law with real-life examples.\n", - "\n", - "Main Topic 2: Newton's Second Law of Motion\n", - "\n", - " Subtopic 2.1: Force, Mass, and Acceleration\n", - " Key Concepts:\n", - " - Definition: Newton's Second Law states that Force equals mass times acceleration (F = ma).\n", - " - Example: Example: Pushing a heavier box requires more force than a lighter box.\n", - " - Illustration: Diagram showing how force, mass, and acceleration relate in different scenarios.\n", - " Discussion Questions:\n", - " - What factors do you think affect an object's acceleration?\n", - " Hands-On Activities:\n", - " - Force and Acceleration Lab: Conduct experiments using different weights and measure the acceleration of toy cars.\n", - " Reflective Questions:\n", - " - How does this law apply to vehicles and transportation?\n", - " Assessment Ideas:\n", - " - Quiz: A short quiz on the calculations using F = ma with given masses and forces.\n", - "\n", - "Main Topic 3: Newton's Third Law of Motion\n", - "\n", - " Subtopic 3.1: Action and Reaction\n", - " Key Concepts:\n", - " - Definition: Newton's Third Law states that for every action, there is an equal and opposite reaction.\n", - " - Example: Example: When you jump off a small boat, the boat moves backward.\n", - " - Multimedia: Interactive simulation showing action-reaction pairs.\n", - " Discussion Questions:\n", - " - Can you provide another example of action and reaction in sports?\n", - " Hands-On Activities:\n", - " - Balloon Rocket Experiment: Create a balloon rocket to visualize action and reaction forces.\n", - " Reflective Questions:\n", - " - How does understanding these forces help in designing safer vehicles?\n", - " Assessment Ideas:\n", - " - Written task: Write a short essay on how Newton's Third Law is observed in space travel.\n", - "\n", - "Learning Adaptations: For younger students, simplify the concepts with more visuals and interactive games. For advanced learners, introduce applications in engineering and aerodynamics.\n", - "Real-World Applications: Newton's laws are essential in various fields such as engineering, sports science, and even space exploration. Careers in physics, engineering, and robotics heavily rely on these principles.\n", - "Ethical Considerations: Understanding forces and motion is crucial in designing technologies that are safe for public use, such as vehicles and amusement park rides. The ethical implications of using this knowledge in developing advanced weaponry or in aerospace technology must also be considered.\n" + "1. Newton's First Law of Motion\n", + "\n", + " 1.1 Inertia\n", + " - Inertia is the tendency of an object to resist changes in its state of motion.\n", + " - A book resting on a table will remain at rest until someone pushes it.\n", + " - Conduct an experiment using a toy car and observe how it continues to move until friction slows it down.\n", + "\n", + " 1.2 Balanced and Unbalanced Forces\n", + " - Balanced forces do not change an object's motion, while unbalanced forces do.\n", + " - When two people push a stationary car with equal force in opposite directions, the forces are balanced.\n", + " - Use a force meter to measure forces on an object and determine if they are balanced or unbalanced.\n", + "\n", + "2. Newton's Second Law of Motion\n", + "\n", + " 2.1 Force, Mass, and Acceleration\n", + " - Newton's Second Law states that Force equals Mass times Acceleration (F=ma).\n", + " - If you push a car and a bicycle with the same force, the bicycle will accelerate more because it has less mass.\n", + " - Calculate the force needed to accelerate different masses using the formula F=ma and perform a hands-on experiment.\n", + "\n", + " 2.2 Practical Applications\n", + " - Understanding how force, mass, and acceleration apply in real-world scenarios, such as vehicle safety.\n", + " - Seatbelts in cars help to reduce the acceleration experienced by passengers in an accident, illustrating the importance of mass and force.\n", + " - Design a mini car crash test to observe the effects of different masses on acceleration.\n", + "\n", + "3. Newton's Third Law of Motion\n", + "\n", + " 3.1 Action and Reaction\n", + " - For every action, there is an equal and opposite reaction.\n", + " - When you jump off a small boat, the boat moves backward as you move forward.\n", + " - Use balloons to demonstrate action-reaction by releasing air and observing the balloon's movement.\n", + "\n", + " 3.2 Real-Life Examples\n", + " - Newton's Third Law explains how rockets propel into space by expelling gas downward.\n", + " - When a swimmer pushes water backwards, they move forward in the opposite direction.\n", + " - Create a simple rocket using a straw and paper to visualize action and reaction forces.\n", + "\n", + "================================================================================\n" ] } ] @@ -2039,7 +2181,7 @@ "base_uri": "https://localhost:8080/" }, "id": "wxSgw7hEqiYe", - "outputId": "d7f2a40a-53ae-4f12-e77c-d01e5c538b88" + "outputId": "b1d33aca-2ff4-4ede-d60a-ee98b13d515c" }, "execution_count": null, "outputs": [ @@ -2048,204 +2190,194 @@ "name": "stdout", "text": [ "Question 1:\n", - "Question: What is Satvik's educational background?\n", + "Question: What is the start date of the Generative AI Bootcamp?\n", "Options:\n", - " A. IIT Delhi alumnus\n", - " B. IIT Bombay alumnus\n", - " C. Stanford University graduate\n", - " D. Harvard University graduate\n", + " A. 1st November\n", + " B. 5th November\n", + " C. 9th November\n", + " D. 15th November\n", "\n", - "Correct Answer: IIT Delhi alumnus\n", + "Correct Answer: 9th November\n", "\n", "Question 2:\n", - "Question: How many students has Satvik trained?\n", + "Question: How long is the Generative AI Bootcamp program?\n", "Options:\n", - " A. 3000 students\n", - " B. 4000 students\n", - " C. Over 5000 students\n", - " D. 6000 students\n", + " A. 4 weeks\n", + " B. 6 weeks\n", + " C. 8 weeks\n", + " D. 10 weeks\n", "\n", - "Correct Answer: Over 5000 students\n", + "Correct Answer: 6 weeks\n", "\n", "Question 3:\n", - "Question: What is the main focus of Satvik's bootcamp?\n", + "Question: Who is the instructor of the Generative AI Bootcamp?\n", "Options:\n", - " A. Theoretical knowledge of AI\n", - " B. Building real-world applications with Generative AI\n", - " C. Data analysis techniques\n", - " D. Basic programming skills\n", + " A. John Doe\n", + " B. Satvik\n", + " C. Alice Smith\n", + " D. Michael Brown\n", "\n", - "Correct Answer: Building real-world applications with Generative AI\n", + "Correct Answer: Satvik\n", "\n", "Question 4:\n", - "Question: What is the duration of the Generative AI Bootcamp?\n", + "Question: What is the fee for the Generative AI Bootcamp?\n", "Options:\n", - " A. 4 weeks\n", - " B. 6 weeks\n", - " C. 8 weeks\n", - " D. 10 weeks\n", + " A. Rs 20,000/-\n", + " B. Rs 25,000/-\n", + " C. Rs 30,000/-\n", + " D. Rs 35,000/-\n", "\n", - "Correct Answer: 6 weeks\n", + "Correct Answer: Rs 30,000/-\n", "\n", "Question 5:\n", - "Question: When does the Generative AI Bootcamp start?\n", + "Question: How often are the live sessions scheduled during the bootcamp?\n", "Options:\n", - " A. 1st November\n", - " B. 9th November\n", - " C. 15th November\n", - " D. 30th November\n", + " A. Every Monday\n", + " B. Every Wednesday\n", + " C. Every Saturday\n", + " D. Every Sunday\n", "\n", - "Correct Answer: 9th November\n", + "Correct Answer: Every Saturday\n", "\n", "Question 6:\n", - "Question: How frequently are the live sessions held during the bootcamp?\n", + "Question: What is included in the fee for the bootcamp?\n", "Options:\n", - " A. Every day\n", - " B. Every Saturday\n", - " C. Once a month\n", - " D. Every Sunday\n", + " A. $100 in AI Credits\n", + " B. $200 in AI Credits\n", + " C. $250 in AI Credits\n", + " D. $300 in AI Credits\n", "\n", - "Correct Answer: Every Saturday\n", + "Correct Answer: $250 in AI Credits\n", "\n", "Question 7:\n", - "Question: What is the fee for the Generative AI Bootcamp?\n", + "Question: What kind of projects will participants build during the bootcamp?\n", "Options:\n", - " A. Rs 20,000/-\n", - " B. Rs 25,000/-\n", - " C. Rs 30,000/-\n", - " D. Rs 35,000/-\n", + " A. Theoretical projects\n", + " B. Real-world projects\n", + " C. Group projects only\n", + " D. No projects\n", "\n", - "Correct Answer: Rs 30,000/-\n", + "Correct Answer: Real-world projects\n", "\n", "Question 8:\n", - "Question: What kind of mentorship does Satvik offer in the bootcamp?\n", + "Question: What is the primary goal of the bootcamp?\n", "Options:\n", - " A. Peer mentorship\n", - " B. Expert mentorship\n", - " C. No mentorship\n", - " D. Group mentorship\n", + " A. Learn theory only\n", + " B. Transform Ideas into Real-World Applications\n", + " C. Become an AI consultant\n", + " D. Prepare for exams\n", "\n", - "Correct Answer: Expert mentorship\n", + "Correct Answer: Transform Ideas into Real-World Applications\n", "\n", "Question 9:\n", - "Question: What type of projects will participants build in the bootcamp?\n", + "Question: Which of the following is NOT a benefit of joining the bootcamp?\n", "Options:\n", - " A. Theoretical projects\n", - " B. Real-world projects\n", - " C. Group projects\n", - " D. Solo projects\n", + " A. Expert mentorship\n", + " B. Access to a professional network\n", + " C. Guaranteed job placement\n", + " D. Building a compelling AI portfolio\n", "\n", - "Correct Answer: Real-world projects\n", + "Correct Answer: Guaranteed job placement\n", "\n", "Question 10:\n", - "Question: What additional benefit do participants receive with their bootcamp fee?\n", + "Question: Who is the target audience for the bootcamp?\n", "Options:\n", - " A. $100 in AI Credits\n", - " B. $250 in AI Credits\n", - " C. $500 in AI Credits\n", - " D. No credits\n", + " A. Only beginners\n", + " B. Developers wanting to build Gen AI applications\n", + " C. Marketing professionals\n", + " D. Students only\n", "\n", - "Correct Answer: $250 in AI Credits\n", + "Correct Answer: Developers wanting to build Gen AI applications\n", "\n", "Question 11:\n", - "Question: Which companies has Satvik collaborated with?\n", + "Question: What type of learning approach does Satvik emphasize in the bootcamp?\n", "Options:\n", - " A. Facebook, Amazon, and IBM\n", - " B. Google, Microsoft, and BCG\n", - " C. Apple, Tesla, and Netflix\n", - " D. None of the above\n", + " A. Theoretical approach\n", + " B. Practical approach\n", + " C. Online quizzes\n", + " D. Self-paced study\n", "\n", - "Correct Answer: Google, Microsoft, and BCG\n", + "Correct Answer: Practical approach\n", "\n", "Question 12:\n", - "Question: What is the emphasis of Satvik's teaching approach?\n", + "Question: When will video modules be available during the bootcamp?\n", "Options:\n", - " A. Theoretical approach\n", - " B. Practical approach\n", - " C. Lecture-based approach\n", - " D. Self-study approach\n", + " A. Every Week\n", + " B. Every Day\n", + " C. Every Sunday\n", + " D. Every Month\n", "\n", - "Correct Answer: Practical approach\n", + "Correct Answer: Every Day\n", "\n", "Question 13:\n", - "Question: What kind of network will participants have access to?\n", + "Question: What is one of the skills participants will learn in the bootcamp?\n", "Options:\n", - " A. Local community network\n", - " B. An elite professional network\n", - " C. Student network\n", - " D. Online forum network\n", + " A. Only basic programming\n", + " B. Building sophisticated AI models\n", + " C. Creating presentations\n", + " D. Writing reports\n", "\n", - "Correct Answer: An elite professional network\n", + "Correct Answer: Building sophisticated AI models\n", "\n", "Question 14:\n", - "Question: What is the objective of the Generative AI Bootcamp?\n", + "Question: How many people has Satvik trained in total?\n", "Options:\n", - " A. Learning theoretical concepts\n", - " B. Transforming ideas into real-world applications\n", - " C. Networking with professionals\n", - " D. Participating in competitions\n", + " A. 1000+\n", + " B. 2500+\n", + " C. 5000+\n", + " D. 7500+\n", "\n", - "Correct Answer: Transforming ideas into real-world applications\n", + "Correct Answer: 5000+\n", "\n", "Question 15:\n", - "Question: What is the main benefit of joining the bootcamp?\n", + "Question: What is one of the tools participants will gain hands-on expertise in?\n", "Options:\n", - " A. Free software tools\n", - " B. Building a compelling AI portfolio\n", - " C. Job placement guarantee\n", - " D. Networking with students\n", + " A. Excel\n", + " B. Langchain\n", + " C. Photoshop\n", + " D. PowerPoint\n", "\n", - "Correct Answer: Building a compelling AI portfolio\n", + "Correct Answer: Langchain\n", "\n", "Question 16:\n", - "Question: How are the video modules structured during the bootcamp?\n", + "Question: What type of feedback can participants expect during the bootcamp?\n", "Options:\n", - " A. Every week\n", - " B. Every day\n", - " C. Every month\n", - " D. Every alternate day\n", + " A. Group feedback only\n", + " B. One to One sessions\n", + " C. No feedback\n", + " D. Email feedback\n", "\n", - "Correct Answer: Every day\n", + "Correct Answer: One to One sessions\n", "\n", "Question 17:\n", - "Question: What should one do for bulk registrations or corporate trainings?\n", + "Question: What is included in the bootcamp's support structure?\n", "Options:\n", - " A. Contact the support team\n", - " B. Reach out to Satvik via email\n", - " C. Fill out a form online\n", - " D. Call the office\n", + " A. Group sessions only\n", + " B. Direct, personalized support from Satvik\n", + " C. Automated responses\n", + " D. No support\n", "\n", - "Correct Answer: Reach out to Satvik via email\n", + "Correct Answer: Direct, personalized support from Satvik\n", "\n", "Question 18:\n", - "Question: What kind of insights does Satvik provide as a consultant?\n", + "Question: What aspect of AI does the bootcamp focus on?\n", "Options:\n", - " A. Basic knowledge\n", - " B. Valuable industry insights\n", - " C. Personal opinions\n", - " D. No insights\n", + " A. Data entry automation\n", + " B. Generative AI applications\n", + " C. Basic programming\n", + " D. Web development\n", "\n", - "Correct Answer: Valuable industry insights\n", + "Correct Answer: Generative AI applications\n", "\n", "Question 19:\n", - "Question: What is the format of the Generative AI Bootcamp?\n", - "Options:\n", - " A. Casual program\n", - " B. Intensive program\n", - " C. Part-time program\n", - " D. Self-paced program\n", - "\n", - "Correct Answer: Intensive program\n", - "\n", - "Question 20:\n", - "Question: What are the scheduled dates for the bootcamp's weeks?\n", + "Question: What does Satvik emphasize for participants to achieve during the bootcamp?\n", "Options:\n", - " A. 1st November to 30th November\n", - " B. 19th November to 14th December\n", - " C. 1st December to 14th December\n", - " D. 9th November to 16th December\n", + " A. Just learn theory\n", + " B. Translate their knowledge into actionable skills\n", + " C. Prepare for exams only\n", + " D. Participate in discussions\n", "\n", - "Correct Answer: 19th November to 14th December\n", + "Correct Answer: Translate their knowledge into actionable skills\n", "\n" ] } @@ -2541,7 +2673,7 @@ "base_uri": "https://localhost:8080/" }, "id": "v911M6faz1EP", - "outputId": "e8b51702-a81f-4436-88b5-001bdfd1d5e5" + "outputId": "04e4c8cb-ad23-45b1-c76e-db4c9db73117" }, "execution_count": null, "outputs": [ @@ -2550,108 +2682,509 @@ "name": "stdout", "text": [ "Question 1:\n", - "Question: What are LLMs primarily used for?\n", + "Question: What does LLM stand for?\n", "Options:\n", - " A. Image recognition tasks.\n", - " B. Natural language processing tasks.\n", - " C. Data analysis tasks.\n", - " D. Hardware optimization tasks.\n", + " A. Large Language Model\n", + " B. Long Language Model\n", + " C. Learning Language Model\n", + " D. Linguistic Language Model\n", "\n", - "Correct Answer: Natural language processing tasks.\n", + "Correct Answer: Large Language Model\n", "\n", "Question 2:\n", - "Question: Which architecture is commonly used in LLMs?\n", + "Question: Which of the following is a key component of Transformers?\n", + "Options:\n", + " A. Recurrent Neural Networks\n", + " B. Self-Attention Mechanism\n", + " C. Convolutional Neural Networks\n", + " D. Feedforward Networks\n", + "\n", + "Correct Answer: Self-Attention Mechanism\n", + "\n", + "Question 3:\n", + "Question: What is the primary purpose of Prompt Engineering?\n", + "Options:\n", + " A. To code AI algorithms\n", + " B. To create effective inputs for AI models\n", + " C. To analyze AI performance\n", + " D. To train AI models\n", + "\n", + "Correct Answer: To create effective inputs for AI models\n", + "\n", + "Question 4:\n", + "Question: What is the role of a Transformer in Natural Language Processing?\n", + "Options:\n", + " A. To process sequential data efficiently\n", + " B. To generate images from text\n", + " C. To classify data into categories\n", + " D. To encrypt messages\n", + "\n", + "Correct Answer: To process sequential data efficiently\n", + "\n", + "Question 5:\n", + "Question: What does the term 'fine-tuning' refer to in the context of LLMs?\n", + "Options:\n", + " A. Creating a new model from scratch\n", + " B. Adjusting a pre-trained model on a specific task\n", + " C. Testing model performance\n", + " D. Compressing model size\n", + "\n", + "Correct Answer: Adjusting a pre-trained model on a specific task\n", + "\n", + "Question 6:\n", + "Question: Which of the following is NOT a benefit of using LLMs?\n", + "Options:\n", + " A. They can generate human-like text\n", + " B. They can understand context better\n", + " C. They require less data than traditional models\n", + " D. They can be fine-tuned for specific tasks\n", + "\n", + "Correct Answer: They require less data than traditional models\n", + "\n", + "Question 7:\n", + "Question: In the context of AI, what does 'scalability' refer to?\n", + "Options:\n", + " A. The ability to improve accuracy\n", + " B. The ability to handle increasing amounts of work or expand capacity\n", + " C. The ability to learn from less data\n", + " D. The ability to generate various outputs\n", + "\n", + "Correct Answer: The ability to handle increasing amounts of work or expand capacity\n", + "\n", + "Question 8:\n", + "Question: What is a common application of LLMs?\n", + "Options:\n", + " A. Image recognition\n", + " B. Chatbots and virtual assistants\n", + " C. Database management\n", + " D. Network security\n", + "\n", + "Correct Answer: Chatbots and virtual assistants\n", + "\n", + "Question 9:\n", + "Question: Which of the following best describes 'transfer learning' in LLMs?\n", + "Options:\n", + " A. Training a model from scratch\n", + " B. Using knowledge gained from one task to improve performance on another task\n", + " C. Testing model robustness\n", + " D. Creating datasets for training\n", + "\n", + "Correct Answer: Using knowledge gained from one task to improve performance on another task\n", + "\n", + "Question 10:\n", + "Question: What is the significance of 'tokenization' in LLMs?\n", + "Options:\n", + " A. It converts text into a format that can be processed by the model\n", + " B. It improves the model's accuracy\n", + " C. It reduces the model's size\n", + " D. It defines the model's architecture\n", + "\n", + "Correct Answer: It converts text into a format that can be processed by the model\n", + "\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "###Generate Visual Questions with Educhain and Gemini\n" + ], + "metadata": { + "id": "e--mhUTIF2uO" + } + }, + { + "cell_type": "code", + "source": [ + "!pip install -qU langchain-google-genai" + ], + "metadata": { + "id": "M9adBHuiGZCi" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "from langchain_google_genai import ChatGoogleGenerativeAI\n", + "from educhain import Educhain, LLMConfig\n", + "\n", + "gemini_flash = ChatGoogleGenerativeAI(model=\"gemini-1.5-flash\")\n", + "flash_config = LLMConfig(custom_model=gemini_flash)\n", + "client = Educhain(flash_config)\n", + "\n", + "ques = client.qna_engine.generate_visual_questions(\n", + " topic=\"GMAT Statistics\", num=3\n", + " )" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 1000 + }, + "id": "mf8EIhxpF4Dc", + "outputId": "04c6c378-3d93-40c4-db26-a8dd6ec6d22d" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": [ + "" + ], + "text/html": [ + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\n", + "Question: A GMAT preparation course surveyed 100 students about their preferred study method. The results are shown below. What percentage of students preferred online resources?\n", + "A. 25%\n", + "B. 30%\n", + "C. 35%\n", + "D. 40%\n", + "Correct Answer: 35%\n", + "--------------------------------------------------------------------------------\n", + "question='A GMAT preparation course surveyed 100 students about their preferred study method. The results are shown below. What percentage of students preferred online resources?' answer='35%' explanation='The pie chart shows that 35 out of 100 students (35%) preferred online resources.' options=['25%', '30%', '35%', '40%'] graph_instruction=GraphInstruction(type='pie', x_labels=None, x_values=None, y_values=None, labels=['Textbooks', 'Online Resources', 'Practice Tests', 'In-person Classes'], sizes=[25.0, 35.0, 20.0, 20.0], y_label=None, title=None, data=None)\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + "" + ], + "text/html": [ + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\n", + "Question: The following table shows the GMAT scores of five students and the number of hours they studied. What is the average number of hours studied by students who scored above 700?\n", + "A. 150\n", + "B. 175\n", + "C. 200\n", + "D. 225\n", + "Correct Answer: 175\n", + "--------------------------------------------------------------------------------\n", + "question='The following table shows the GMAT scores of five students and the number of hours they studied. What is the average number of hours studied by students who scored above 700?' answer='175' explanation='Students A, C, and E scored above 700. Their study hours are 200, 225, and 175 respectively. The average is (200 + 225 + 175) / 3 = 175 hours.' options=['150', '175', '200', '225'] graph_instruction=GraphInstruction(type='table', x_labels=None, x_values=None, y_values=None, labels=None, sizes=None, y_label=None, title=None, data=[{'Student': 'A', 'Score': '720', 'Hours Studied': '200'}, {'Student': 'B', 'Score': '680', 'Hours Studied': '150'}, {'Student': 'C', 'Score': '750', 'Hours Studied': '225'}, {'Student': 'D', 'Score': '650', 'Hours Studied': '100'}, {'Student': 'E', 'Score': '780', 'Hours Studied': '175'}])\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.11/dist-packages/educhain/engines/qna_engine.py:227: UserWarning: No artists with labels found to put in legend. Note that artists whose label start with an underscore are ignored when legend() is called with no argument.\n", + " plt.legend()\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + "" + ], + "text/html": [ + "" + ] + }, + "metadata": {} + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\n", + "Question: The graph below shows the average GMAT quant score for students over a 5-month period. What was the difference between the average quant score in Month 2 and Month 5?\n", + "A. 10 points\n", + "B. 15 points\n", + "C. 20 points\n", + "D. 25 points\n", + "Correct Answer: 15 points\n", + "--------------------------------------------------------------------------------\n", + "question='The graph below shows the average GMAT quant score for students over a 5-month period. What was the difference between the average quant score in Month 2 and Month 5?' answer='15 points' explanation='The average quant score in Month 2 was 620 and in Month 5 it was 635. The difference is 635 - 620 = 15 points.' options=['10 points', '15 points', '20 points', '25 points'] graph_instruction=GraphInstruction(type='line', x_labels=['Month 1', 'Month 2', 'Month 3', 'Month 4', 'Month 5'], x_values=None, y_values=[600, 620, 650, 640, 635], labels=None, sizes=None, y_label='Average Quant Score', title='Average GMAT Quant Score Over Time', data=None)\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "###Solve Problems Using Images" + ], + "metadata": { + "id": "DBuY4En58Nvi" + } + }, + { + "cell_type": "code", + "source": [ + "from educhain import Educhain\n", + "\n", + "client = Educhain() #Default is 4o-mini (make sure to use a multimodal LLM!)\n", + "\n", + "question = client.qna_engine.solve_doubt(\n", + " image_source=\"https://i.ytimg.com/vi/OQjkFQAIOck/maxresdefault.jpg\",\n", + " prompt=\"Explain the diagram in detail\",\n", + " detail_level = \"High\"\n", + " )\n", + "\n", + "print(question)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "JGDd-tK18ROX", + "outputId": "38c6834a-83dc-46ee-ce47-c8a1f61172c3" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "explanation='The problem presented in the diagram is a multiplication question asking for the product of 6 and 8. To solve for 6 times 8, we can break it down into simpler steps, or directly calculate the product. The options provided are potential answers, including 45, 48, 42, and 84. The correct answer is 48, as 6 multiplied by 8 equals 48.' steps=['Identify the numbers to be multiplied: 6 and 8.', 'Use the multiplication operation: 6 x 8.', 'Calculate the product: 6 x 8 = 48.', 'Compare the result with the provided options: A. 45, B. 48, C. 42, D. 84.', 'Select the correct answer, which is B. 48.'] additional_notes='Multiplication can be thought of as repeated addition. For example, 6 x 8 means adding 6 a total of 8 times (6 + 6 + 6 + 6 + 6 + 6 + 6 + 6). This can sometimes make it easier to understand the multiplication process.'\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "question.show()" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "E484dqAJ9ATi", + "outputId": "59c84702-3f85-45e3-f562-777f2220fb3c" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\n", + "=== Problem Explanation ===\n", + "The problem presented in the diagram is a multiplication question asking for the product of 6 and 8. To solve for 6 times 8, we can break it down into simpler steps, or directly calculate the product. The options provided are potential answers, including 45, 48, 42, and 84. The correct answer is 48, as 6 multiplied by 8 equals 48.\n", + "\n", + "=== Solution Steps ===\n", + "1. Identify the numbers to be multiplied: 6 and 8.\n", + "2. Use the multiplication operation: 6 x 8.\n", + "3. Calculate the product: 6 x 8 = 48.\n", + "4. Compare the result with the provided options: A. 45, B. 48, C. 42, D. 84.\n", + "5. Select the correct answer, which is B. 48.\n", + "\n", + "=== Additional Notes ===\n", + "Multiplication can be thought of as repeated addition. For example, 6 x 8 means adding 6 a total of 8 times (6 + 6 + 6 + 6 + 6 + 6 + 6 + 6). This can sometimes make it easier to understand the multiplication process.\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "###Generate Questions from YouTube Videos" + ], + "metadata": { + "id": "EyVJswVv9PAK" + } + }, + { + "cell_type": "code", + "source": [ + "from educhain import Educhain\n", + "\n", + "client = Educhain()\n", + "\n", + "# Basic usage - Generate 3 MCQs from a YouTube video\n", + "questions = client.qna_engine.generate_questions_from_youtube(\n", + " url=\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\",\n", + " num=10\n", + ")\n", + "questions.model_dump_json()" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 143 + }, + "id": "HzMGab_59P_3", + "outputId": "3f86d42a-b1b3-481c-e7dd-ce9d8a498b0e" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "'{\"questions\":[{\"question\":\"What is the main theme of the lyrics?\",\"answer\":\"Commitment in love\",\"explanation\":\"The lyrics express a strong commitment to a romantic relationship.\",\"options\":[\"Commitment in love\",\"Heartbreak\",\"Friendship\",\"Freedom\"]},{\"question\":\"Which phrase is repeated multiple times throughout the lyrics?\",\"answer\":\"Never going to give you up\",\"explanation\":\"This phrase emphasizes the promise of unwavering support and commitment.\",\"options\":[\"Never going to give you up\",\"Always going to let you down\",\"Always going to run away\",\"Going to say goodbye\"]},{\"question\":\"What emotion is suggested by the line \\'your heart\\'s been aching\\'?\",\"answer\":\"Sadness\",\"explanation\":\"This line indicates that the person has been feeling emotional pain.\",\"options\":[\"Joy\",\"Anger\",\"Sadness\",\"Confusion\"]},{\"question\":\"What does the speaker want to convey to their partner?\",\"answer\":\"Their true feelings\",\"explanation\":\"The speaker expresses a desire to communicate their feelings clearly.\",\"options\":[\"Their true feelings\",\"Their regrets\",\"Their fears\",\"Their plans\"]},{\"question\":\"How does the speaker feel about the relationship?\",\"answer\":\"Confident and committed\",\"explanation\":\"The lyrics convey strong confidence in the relationship and commitment to the partner.\",\"options\":[\"Confident and committed\",\"Uncertain and afraid\",\"Indifferent and distant\",\"Bored and uninterested\"]},{\"question\":\"What is implied by \\'we both know what’s been going on\\'?\",\"answer\":\"Shared understanding\",\"explanation\":\"This implies that both individuals are aware of the dynamics of their relationship.\",\"options\":[\"Shared understanding\",\"Miscommunication\",\"Secrets\",\"Denial\"]},{\"question\":\"What is the tone of the lyrics?\",\"answer\":\"Reassuring and affectionate\",\"explanation\":\"The tone is meant to reassure the partner of the speaker\\'s loyalty and affection.\",\"options\":[\"Reassuring and affectionate\",\"Angry and resentful\",\"Indifferent and cold\",\"Sad and regretful\"]},{\"question\":\"What does the phrase \\'never going to let you down\\' signify?\",\"answer\":\"Reliability and trust\",\"explanation\":\"This phrase signifies that the speaker will always be there for the partner.\",\"options\":[\"Reliability and trust\",\"Disappointment and betrayal\",\"Indifference and neglect\",\"Surprise and excitement\"]},{\"question\":\"What action does the speaker promise not to take?\",\"answer\":\"Make you cry\",\"explanation\":\"The speaker assures their partner that they will not cause them emotional pain.\",\"options\":[\"Make you cry\",\"Tell a lie\",\"Run away\",\"Say goodbye\"]},{\"question\":\"What phrase suggests an ongoing relationship?\",\"answer\":\"We\\'ve known each other for so long\",\"explanation\":\"This phrase indicates a long-standing connection between the two individuals.\",\"options\":[\"We\\'ve known each other for so long\",\"It\\'s time to move on\",\"Let\\'s break up\",\"I don\\'t care anymore\"]}]}'" + ], + "application/vnd.google.colaboratory.intrinsic+json": { + "type": "string" + } + }, + "metadata": {}, + "execution_count": 10 + } + ] + }, + { + "cell_type": "code", + "source": [ + "questions.show()" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "XIQ-1hq99dIj", + "outputId": "e0e0f819-6422-4fa8-9ab4-7ae2af6b798f" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Question 1:\n", + "Question: What is the main theme of the lyrics?\n", + "Options:\n", + " A. Commitment in love\n", + " B. Heartbreak\n", + " C. Friendship\n", + " D. Freedom\n", + "\n", + "Correct Answer: Commitment in love\n", + "Explanation: The lyrics express a strong commitment to a romantic relationship.\n", + "\n", + "Question 2:\n", + "Question: Which phrase is repeated multiple times throughout the lyrics?\n", "Options:\n", - " A. Convolutional Neural Networks.\n", - " B. Recurrent Neural Networks.\n", - " C. Transformers.\n", - " D. Support Vector Machines.\n", + " A. Never going to give you up\n", + " B. Always going to let you down\n", + " C. Always going to run away\n", + " D. Going to say goodbye\n", "\n", - "Correct Answer: Transformers.\n", + "Correct Answer: Never going to give you up\n", + "Explanation: This phrase emphasizes the promise of unwavering support and commitment.\n", "\n", "Question 3:\n", - "Question: What is the main advantage of using Prompt Engineering?\n", + "Question: What emotion is suggested by the line 'your heart's been aching'?\n", "Options:\n", - " A. It reduces computational costs.\n", - " B. It helps in fine-tuning the model's responses.\n", - " C. It increases the model's speed.\n", - " D. It guarantees accurate outputs.\n", + " A. Joy\n", + " B. Anger\n", + " C. Sadness\n", + " D. Confusion\n", "\n", - "Correct Answer: It helps in fine-tuning the model's responses.\n", + "Correct Answer: Sadness\n", + "Explanation: This line indicates that the person has been feeling emotional pain.\n", "\n", "Question 4:\n", - "Question: What does the term 'contextual understanding' refer to in LLMs?\n", + "Question: What does the speaker want to convey to their partner?\n", "Options:\n", - " A. The ability to process large datasets.\n", - " B. The ability to understand the meaning based on surrounding text.\n", - " C. The ability to generate random text.\n", - " D. The ability to predict user behavior.\n", + " A. Their true feelings\n", + " B. Their regrets\n", + " C. Their fears\n", + " D. Their plans\n", "\n", - "Correct Answer: The ability to understand the meaning based on surrounding text.\n", + "Correct Answer: Their true feelings\n", + "Explanation: The speaker expresses a desire to communicate their feelings clearly.\n", "\n", "Question 5:\n", - "Question: What is the significance of training data in LLMs?\n", + "Question: How does the speaker feel about the relationship?\n", "Options:\n", - " A. It is used for model visualization.\n", - " B. It defines the model's knowledge and performance.\n", - " C. It increases the model's size.\n", - " D. It is irrelevant to the model's functioning.\n", + " A. Confident and committed\n", + " B. Uncertain and afraid\n", + " C. Indifferent and distant\n", + " D. Bored and uninterested\n", "\n", - "Correct Answer: It defines the model's knowledge and performance.\n", + "Correct Answer: Confident and committed\n", + "Explanation: The lyrics convey strong confidence in the relationship and commitment to the partner.\n", "\n", "Question 6:\n", - "Question: What role does fine-tuning play in LLMs?\n", + "Question: What is implied by 'we both know what’s been going on'?\n", "Options:\n", - " A. It reduces the model's size.\n", - " B. It customizes the model for specific tasks.\n", - " C. It generates new training data.\n", - " D. It improves hardware efficiency.\n", + " A. Shared understanding\n", + " B. Miscommunication\n", + " C. Secrets\n", + " D. Denial\n", "\n", - "Correct Answer: It customizes the model for specific tasks.\n", + "Correct Answer: Shared understanding\n", + "Explanation: This implies that both individuals are aware of the dynamics of their relationship.\n", "\n", "Question 7:\n", - "Question: How can LLMs enhance user experience?\n", + "Question: What is the tone of the lyrics?\n", "Options:\n", - " A. By speeding up data processing.\n", - " B. By providing personalized and context-aware interactions.\n", - " C. By reducing server costs.\n", - " D. By eliminating the need for human input.\n", + " A. Reassuring and affectionate\n", + " B. Angry and resentful\n", + " C. Indifferent and cold\n", + " D. Sad and regretful\n", "\n", - "Correct Answer: By providing personalized and context-aware interactions.\n", + "Correct Answer: Reassuring and affectionate\n", + "Explanation: The tone is meant to reassure the partner of the speaker's loyalty and affection.\n", "\n", "Question 8:\n", - "Question: What does 'overfitting' mean in the context of LLMs?\n", + "Question: What does the phrase 'never going to let you down' signify?\n", "Options:\n", - " A. The model performs well on training data but poorly on unseen data.\n", - " B. The model generates random outputs.\n", - " C. The model is faster than expected.\n", - " D. The model has too few parameters.\n", + " A. Reliability and trust\n", + " B. Disappointment and betrayal\n", + " C. Indifference and neglect\n", + " D. Surprise and excitement\n", "\n", - "Correct Answer: The model performs well on training data but poorly on unseen data.\n", + "Correct Answer: Reliability and trust\n", + "Explanation: This phrase signifies that the speaker will always be there for the partner.\n", "\n", "Question 9:\n", - "Question: What is a key characteristic of Transformers in LLMs?\n", + "Question: What action does the speaker promise not to take?\n", "Options:\n", - " A. They are limited to sequential data.\n", - " B. They use self-attention mechanisms.\n", - " C. They require less training data.\n", - " D. They are primarily used for image processing.\n", + " A. Make you cry\n", + " B. Tell a lie\n", + " C. Run away\n", + " D. Say goodbye\n", "\n", - "Correct Answer: They use self-attention mechanisms.\n", + "Correct Answer: Make you cry\n", + "Explanation: The speaker assures their partner that they will not cause them emotional pain.\n", "\n", "Question 10:\n", - "Question: In LLMs, what is the purpose of tokenization?\n", + "Question: What phrase suggests an ongoing relationship?\n", "Options:\n", - " A. To convert text into a format that the model can understand.\n", - " B. To increase the complexity of the model.\n", - " C. To reduce the size of the training dataset.\n", - " D. To enhance user interaction.\n", + " A. We've known each other for so long\n", + " B. It's time to move on\n", + " C. Let's break up\n", + " D. I don't care anymore\n", "\n", - "Correct Answer: To convert text into a format that the model can understand.\n", + "Correct Answer: We've known each other for so long\n", + "Explanation: This phrase indicates a long-standing connection between the two individuals.\n", "\n" ] } ] + }, + { + "cell_type": "code", + "source": [], + "metadata": { + "id": "WU8ffl629d2N" + }, + "execution_count": null, + "outputs": [] } ] -} +} \ No newline at end of file