Repository: satvik314/educhain (language: python)

Issue:
Update setup.py
- Updated Stable Versions of All Libraries Present in Educhain/setup.py


Discussion / hints:

Fix patch:
diff --git a/.gitignore b/.gitignore
index 1fd79ea..8e7bfca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -161,4 +161,5 @@ cython_debug/
 #  option (not recommended) you can uncomment the following to ignore the entire idea folder.
 #.idea/
 
-Desktop.ini
\ No newline at end of file
+Desktop.ini
+.vscode
\ No newline at end of file
diff --git a/archive/qna_engine.py b/archive/qna_engine.py
index 73cedb4..c519824 100644
--- a/archive/qna_engine.py
+++ b/archive/qna_engine.py
@@ -255,3 +255,70 @@ def get_youtube_transcript(url: str) -> str:
         raise ValueError(f"Error fetching transcript: {str(e)}")
 
 
+def generate_mcq_math(self, topic, num=1, llm=None, response_model=None,
+                         prompt_template=None, custom_instructions=None, **kwargs):
+        if response_model is None:
+            parser = PydanticOutputParser(pydantic_object=MCQListMath)
+            format_instructions = parser.get_format_instructions()
+        else:
+            parser = PydanticOutputParser(pydantic_object=response_model)
+            format_instructions = parser.get_format_instructions()
+
+        if prompt_template is None:
+            prompt_template = """
+            You are an Academic AI assistant tasked with generating multiple-choice questions on various topics specialised in Maths Subject.
+            Generate {num} multiple-choice question (MCQ) based on the given topic and level.
+            provide the question, four answer options, and the correct answer.
+
+            Topic: {topic}
+            """
+
+        if custom_instructions:
+            prompt_template += f"\n\nAdditional Instructions:\n{custom_instructions}"
+
+        prompt_template += "\nThe response should be in JSON format. \n {format_instructions}"
+
+        MCQ_prompt = PromptTemplate(
+            input_variables=["num", "topic"],
+            template=prompt_template,
+            partial_variables={"format_instructions": format_instructions}
+        )
+
+        if llm:
+            llm = llm
+        else:
+            llm = self.llm  # Use the initialized LLM from the class
+
+        MCQ_chain = MCQ_prompt | llm
+
+        results = MCQ_chain.invoke(
+            {"num": num, "topic": topic, **kwargs},
+        )
+        results = results.content
+        structured_output = parser.parse(results)
+
+        llm_math = LLMMathChain.from_llm(llm=llm, verbose=False)
+
+        for question in structured_output.questions:
+            if question.requires_math:
+                try:
+                    with get_openai_callback() as cb:
+                        result = llm_math.invoke({"question": question.question})
+                        result = result['result'].strip().split(":")[-1]
+                        result = float(result)
+                        result = f"{result: .2f}"
+
+                    question.explanation += f"\n\nMath solution: {result}"
+
+                    correct_option = Option(text=str(result.lstrip()), correct='true')
+                    incorrect_options = [Option(text=opt.strip(), correct='false')
+                                         for opt in self.generate_similar_options(question.question, result)]
+
+                    while len(incorrect_options) < 3:
+                        incorrect_options.append(Option(text="N/A", correct='false'))
+
+                    question.options = [correct_option] + incorrect_options[:3]
+                    random.shuffle(question.options)
+                except Exception as e:
+                    print(f"LLMMathChain failed to answer: {str(e)}")
+        return structured_output
\ No newline at end of file
diff --git a/cookbook/Convert_any_webpage_to_quiz.ipynb b/cookbook/Convert_any_webpage_to_quiz.ipynb
index d3a6de4..c516e21 100644
--- a/cookbook/Convert_any_webpage_to_quiz.ipynb
+++ b/cookbook/Convert_any_webpage_to_quiz.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/1i-K3mdWfyApCuUx7t_uSRTczZ-B4qpdI?usp=sharing)"
+        "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/185Py9FXMLspaEqwmUAx0I1p-IeCa67zH?usp=sharing)"
       ],
       "metadata": {
         "id": "ScXuwxJl9uTo"
@@ -43,7 +43,7 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 1,
+      "execution_count": null,
       "metadata": {
         "colab": {
           "base_uri": "https://localhost:8080/"
@@ -89,17 +89,19 @@
       "metadata": {
         "id": "e5R2skFs6wCq"
       },
-      "execution_count": 2,
+      "execution_count": null,
       "outputs": []
     },
     {
       "cell_type": "code",
       "source": [
-        "from educhain import qna_engine\n",
+        "from educhain import Educhain\n",
         "from langchain_openai import ChatOpenAI\n",
         "\n",
         "gpt_4o_mini = ChatOpenAI(model = \"gpt-4o-mini\")\n",
         "\n",
+        "client = Educhain()\n",
+        "\n",
         "url_mcqs = qna_engine.generate_mcqs_from_data(\n",
         "        source=\"https://en.wikipedia.org/wiki/Butterfly_effect\",\n",
         "        source_type=\"url\",\n",
@@ -116,7 +118,7 @@
         "id": "-GIvZQuO6zKH",
         "outputId": "230790b6-50b9-4eb3-cb16-289024245d6a"
       },
-      "execution_count": 4,
+      "execution_count": null,
       "outputs": [
         {
           "output_type": "stream",
diff --git a/cookbook/Generate_flashcards_basics.ipynb b/cookbook/Generate_flashcards_basics.ipynb
new file mode 100644
index 0000000..9f64a36
--- /dev/null
+++ b/cookbook/Generate_flashcards_basics.ipynb
@@ -0,0 +1,248 @@
+{
+  "nbformat": 4,
+  "nbformat_minor": 0,
+  "metadata": {
+    "colab": {
+      "provenance": []
+    },
+    "kernelspec": {
+      "name": "python3",
+      "display_name": "Python 3"
+    },
+    "language_info": {
+      "name": "python"
+    }
+  },
+  "cells": [
+    {
+      "cell_type": "markdown",
+      "source": [
+        "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1kUqNA-VCznoS6d1T7-IyZXfaQs-c-2M0?usp=sharing)"
+      ],
+      "metadata": {
+        "id": "QZY7KgxpkwIP"
+      }
+    },
+    {
+      "cell_type": "markdown",
+      "source": [
+        "#Flashcard Generator Function\n",
+        "\n",
+        "A simple tool that creates educational flashcards on any topic you choose. 📚\n",
+        "\n",
+        "What it Does\n",
+        "\n",
+        "1.Creates study flashcards based on your chosen topic\n",
+        "\n",
+        "2.Let's you pick how many cards you want\n",
+        "\n",
+        "3.Can customize content style and difficulty"
+      ],
+      "metadata": {
+        "id": "U2L0HzzUkJ2V"
+      }
+    },
+    {
+      "cell_type": "code",
+      "execution_count": 1,
+      "metadata": {
+        "colab": {
+          "base_uri": "https://localhost:8080/"
+        },
+        "id": "rYs8Szr1nuJL",
+        "outputId": "4af0b96b-aa9b-4723-ead3-710821645a2b"
+      },
+      "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.4 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[32m50.6/50.6 kB\u001b[0m \u001b[31m1.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m607.0/607.0 kB\u001b[0m \u001b[31m15.6 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[31m52.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.0/1.0 MB\u001b[0m \u001b[31m53.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[31m78.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.9/49.9 kB\u001b[0m \u001b[31m4.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m386.9/386.9 kB\u001b[0m \u001b[31m28.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[31m17.8 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[31m73.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m273.8/273.8 kB\u001b[0m \u001b[31m22.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m94.7/94.7 kB\u001b[0m \u001b[31m8.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m76.4/76.4 kB\u001b[0m \u001b[31m6.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m78.0/78.0 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[32m325.2/325.2 kB\u001b[0m \u001b[31m23.2 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[31m66.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m408.0/408.0 kB\u001b[0m \u001b[31m30.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m296.9/296.9 kB\u001b[0m \u001b[31m25.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m93.2/93.2 kB\u001b[0m \u001b[31m8.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m13.2/13.2 MB\u001b[0m \u001b[31m81.0 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[31m4.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[31m13.2 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[31m5.5 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[31m9.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m144.5/144.5 kB\u001b[0m \u001b[31m13.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m54.4/54.4 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[32m1.2/1.2 MB\u001b[0m \u001b[31m58.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m63.7/63.7 kB\u001b[0m \u001b[31m5.6 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[31m5.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m442.1/442.1 kB\u001b[0m \u001b[31m23.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.5/49.5 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[32m54.5/54.5 kB\u001b[0m \u001b[31m5.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m73.3/73.3 kB\u001b[0m \u001b[31m6.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.8/3.8 MB\u001b[0m \u001b[31m90.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m425.7/425.7 kB\u001b[0m \u001b[31m31.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m164.1/164.1 kB\u001b[0m \u001b[31m14.6 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.7 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[31m7.6 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"
+          ]
+        }
+      ],
+      "source": [
+        "!pip install -U educhain --quiet"
+      ]
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "from langchain_openai import ChatOpenAI\n",
+        "import os\n",
+        "from google.colab import userdata\n",
+        "os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY')\n"
+      ],
+      "metadata": {
+        "id": "V4DRv7Udn1ZS"
+      },
+      "execution_count": null,
+      "outputs": []
+    },
+    {
+      "cell_type": "markdown",
+      "source": [
+        "## Use Cases 🧰\n",
+        "\n",
+        "- Students studying for tests\n",
+        "- Teachers making lesson materials\n",
+        "- Self-study on any topic\n",
+        "- Corporate training materials"
+      ],
+      "metadata": {
+        "id": "SIr7-NmwkSTs"
+      }
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "from educhain import Educhain\n",
+        "\n",
+        "client = Educhain()\n",
+        "\n",
+        "\n",
+        "# content_engine = ContentEngine()\n",
+        "flashcard_set = client.content_engine.generate_flashcards(\"Python Basics\")\n",
+        "  # This will display the flashcards in a formatted way"
+      ],
+      "metadata": {
+        "id": "l5Z-SAQgn4UF"
+      },
+      "execution_count": null,
+      "outputs": []
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "flashcard_set"
+      ],
+      "metadata": {
+        "colab": {
+          "base_uri": "https://localhost:8080/"
+        },
+        "id": "P2SNbu0XoIuN",
+        "outputId": "2036061a-40b8-4fa3-aba2-ca01cb3be6d5"
+      },
+      "execution_count": null,
+      "outputs": [
+        {
+          "output_type": "execute_result",
+          "data": {
+            "text/plain": [
+              "FlashcardSet(title='Python Basics', flashcards=[Flashcard(front='What is Python?', back='Python is a high-level, interpreted programming language known for its readability and versatility.', explanation='Python is widely used for web development, data analysis, artificial intelligence, scientific computing, and more.'), Flashcard(front='What are variables in Python?', back='Variables are used to store data values in Python.', explanation='In Python, you do not need to declare the type of a variable explicitly; it is determined dynamically.'), Flashcard(front='What does \\'if __name__ == \"__main__\":\\' do?', back=\"This construct allows a Python script to determine if it's being run as the main program or being imported as a module.\", explanation='Code within this block will only execute if the script is run directly, allowing for better module organization.'), Flashcard(front='What are lists in Python?', back='Lists are mutable, ordered collections of items in Python.', explanation='You can store multiple items in a single variable and access them using indices.'), Flashcard(front='What is a dictionary in Python?', back='A dictionary is an unordered collection of key-value pairs.', explanation='Dictionaries are useful for storing data that is associated with unique keys, enabling fast access.'), Flashcard(front='What are functions in Python?', back='Functions are reusable blocks of code that perform a specific task.', explanation=\"You can define functions using the 'def' keyword and call them to execute their code.\"), Flashcard(front='What is a loop in Python?', back='A loop is a control structure that enables repeated execution of a block of code.', explanation=\"Python has 'for' loops and 'while' loops to iterate over sequences and execute code based on conditions.\"), Flashcard(front='What is a module in Python?', back='A module is a file containing Python code that can define functions, classes, and variables.', explanation='Modules promote code reusability and organization by allowing you to separate functionality into different files.'), Flashcard(front='What is a class in Python?', back='A class is a blueprint for creating objects that encapsulate data and functionality.', explanation='Python supports object-oriented programming, allowing you to define classes and create instances (objects) of those classes.'), Flashcard(front='What is list comprehension?', back='List comprehension is a concise way to create lists in Python using a single line of code.', explanation='It allows for more readable and efficient code by combining loops and conditional statements.')])"
+            ]
+          },
+          "metadata": {},
+          "execution_count": 4
+        }
+      ]
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "\n",
+        "# Loop through each flashcard and print the 'front' and 'back' attributes\n",
+        "for flashcard in flashcard_set.flashcards:\n",
+        "    print(\"Front:\", flashcard.front)\n",
+        "    print(\"Back:\", flashcard.back)\n",
+        "    print()  # Blank line for better readability\n"
+      ],
+      "metadata": {
+        "colab": {
+          "base_uri": "https://localhost:8080/"
+        },
+        "id": "uLtpGhlajYLL",
+        "outputId": "9d2c8e57-b998-448f-ec6d-40ebe660c287"
+      },
+      "execution_count": null,
+      "outputs": [
+        {
+          "output_type": "stream",
+          "name": "stdout",
+          "text": [
+            "Front: What is Python?\n",
+            "Back: Python is a high-level, interpreted programming language known for its readability and versatility.\n",
+            "\n",
+            "Front: What are variables in Python?\n",
+            "Back: Variables are used to store data values in Python.\n",
+            "\n",
+            "Front: What does 'if __name__ == \"__main__\":' do?\n",
+            "Back: This construct allows a Python script to determine if it's being run as the main program or being imported as a module.\n",
+            "\n",
+            "Front: What are lists in Python?\n",
+            "Back: Lists are mutable, ordered collections of items in Python.\n",
+            "\n",
+            "Front: What is a dictionary in Python?\n",
+            "Back: A dictionary is an unordered collection of key-value pairs.\n",
+            "\n",
+            "Front: What are functions in Python?\n",
+            "Back: Functions are reusable blocks of code that perform a specific task.\n",
+            "\n",
+            "Front: What is a loop in Python?\n",
+            "Back: A loop is a control structure that enables repeated execution of a block of code.\n",
+            "\n",
+            "Front: What is a module in Python?\n",
+            "Back: A module is a file containing Python code that can define functions, classes, and variables.\n",
+            "\n",
+            "Front: What is a class in Python?\n",
+            "Back: A class is a blueprint for creating objects that encapsulate data and functionality.\n",
+            "\n",
+            "Front: What is list comprehension?\n",
+            "Back: List comprehension is a concise way to create lists in Python using a single line of code.\n",
+            "\n"
+          ]
+        }
+      ]
+    },
+    {
+      "cell_type": "code",
+      "source": [],
+      "metadata": {
+        "id": "NfewjoaDjb0A"
+      },
+      "execution_count": null,
+      "outputs": []
+    }
+  ]
+}
\ No newline at end of file
diff --git a/cookbook/educhain_generate_lesson_plan.ipynb b/cookbook/educhain_generate_lesson_plan.ipynb
new file mode 100644
index 0000000..60ae898
--- /dev/null
+++ b/cookbook/educhain_generate_lesson_plan.ipynb
@@ -0,0 +1,1494 @@
+{
+  "nbformat": 4,
+  "nbformat_minor": 0,
+  "metadata": {
+    "colab": {
+      "provenance": []
+    },
+    "kernelspec": {
+      "name": "python3",
+      "display_name": "Python 3"
+    },
+    "language_info": {
+      "name": "python"
+    }
+  },
+  "cells": [
+    {
+      "cell_type": "markdown",
+      "source": [
+        "## Generate Lesson Plan using [Educhain](https://github.com/satvik314/educhain)"
+      ],
+      "metadata": {
+        "id": "oSawbo0DTCIf"
+      }
+    },
+    {
+      "cell_type": "markdown",
+      "source": [
+        "Explore the power of AI-driven education with Educhain! This notebook demonstrates how to create high-quality Lesson Plans from various topics using the Educhain package.\n",
+        "\n",
+        "Key Features:\n",
+        "- Customize prompts according to your need\n",
+        "- Export lesson plan to CSV, JSON, or PDF formats\n",
+        "- Leverage advanced language models for lesson plan generation\n",
+        "\n",
+        "Perfect for educators, content creators, and e-learning developers looking to automate and enhance their lesson plan creation process. Dive in to revolutionize your approach to educational content generation!"
+      ],
+      "metadata": {
+        "id": "vzX5-viBTIfw"
+      }
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "!pip install git+https://github.com/lunatic-7/educhain.git@main"
+      ],
+      "metadata": {
+        "colab": {
+          "base_uri": "https://localhost:8080/"
+        },
+        "id": "2nNPwCZoTHb6",
+        "outputId": "78710a5b-0952-4c40-8ae5-ccca8d3c4630"
+      },
+      "execution_count": 5,
+      "outputs": [
+        {
+          "output_type": "stream",
+          "name": "stdout",
+          "text": [
+            "Collecting git+https://github.com/lunatic-7/educhain.git@main\n",
+            "  Cloning https://github.com/lunatic-7/educhain.git (to revision main) to /tmp/pip-req-build-3phwx_g8\n",
+            "  Running command git clone --filter=blob:none --quiet https://github.com/lunatic-7/educhain.git /tmp/pip-req-build-3phwx_g8\n",
+            "  Resolved https://github.com/lunatic-7/educhain.git to commit a06893962b395fc18f988da08087cc7cc62aa00a\n",
+            "  Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
+            "Collecting langchain (from educhain==0.3.2)\n",
+            "  Downloading langchain-0.3.4-py3-none-any.whl.metadata (7.1 kB)\n",
+            "Collecting langchain-community (from educhain==0.3.2)\n",
+            "  Downloading langchain_community-0.3.3-py3-none-any.whl.metadata (2.8 kB)\n",
+            "Collecting langchain-openai (from educhain==0.3.2)\n",
+            "  Downloading langchain_openai-0.2.3-py3-none-any.whl.metadata (2.6 kB)\n",
+            "Collecting openai (from educhain==0.3.2)\n",
+            "  Downloading openai-1.52.0-py3-none-any.whl.metadata (24 kB)\n",
+            "Collecting python-dotenv (from educhain==0.3.2)\n",
+            "  Downloading python_dotenv-1.0.1-py3-none-any.whl.metadata (23 kB)\n",
+            "Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from educhain==0.3.2) (2.2.2)\n",
+            "Collecting reportlab (from educhain==0.3.2)\n",
+            "  Downloading reportlab-4.2.5-py3-none-any.whl.metadata (1.5 kB)\n",
+            "Collecting PyPDF2 (from educhain==0.3.2)\n",
+            "  Downloading pypdf2-3.0.1-py3-none-any.whl.metadata (6.8 kB)\n",
+            "Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.10/dist-packages (from educhain==0.3.2) (4.12.3)\n",
+            "Collecting youtube_transcript_api (from educhain==0.3.2)\n",
+            "  Downloading youtube_transcript_api-0.6.2-py3-none-any.whl.metadata (15 kB)\n",
+            "Requirement already satisfied: pydantic in /usr/local/lib/python3.10/dist-packages (from educhain==0.3.2) (2.9.2)\n",
+            "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from educhain==0.3.2) (2.32.3)\n",
+            "Collecting chromadb (from educhain==0.3.2)\n",
+            "  Downloading chromadb-0.5.15-py3-none-any.whl.metadata (6.8 kB)\n",
+            "Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.10/dist-packages (from beautifulsoup4->educhain==0.3.2) (2.6)\n",
+            "Collecting build>=1.0.3 (from chromadb->educhain==0.3.2)\n",
+            "  Downloading build-1.2.2.post1-py3-none-any.whl.metadata (6.5 kB)\n",
+            "Collecting chroma-hnswlib==0.7.6 (from chromadb->educhain==0.3.2)\n",
+            "  Downloading chroma_hnswlib-0.7.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (252 bytes)\n",
+            "Collecting fastapi>=0.95.2 (from chromadb->educhain==0.3.2)\n",
+            "  Downloading fastapi-0.115.2-py3-none-any.whl.metadata (27 kB)\n",
+            "Collecting uvicorn>=0.18.3 (from uvicorn[standard]>=0.18.3->chromadb->educhain==0.3.2)\n",
+            "  Downloading uvicorn-0.32.0-py3-none-any.whl.metadata (6.6 kB)\n",
+            "Requirement already satisfied: numpy>=1.22.5 in /usr/local/lib/python3.10/dist-packages (from chromadb->educhain==0.3.2) (1.26.4)\n",
+            "Collecting posthog>=2.4.0 (from chromadb->educhain==0.3.2)\n",
+            "  Downloading posthog-3.7.0-py2.py3-none-any.whl.metadata (2.0 kB)\n",
+            "Requirement already satisfied: typing-extensions>=4.5.0 in /usr/local/lib/python3.10/dist-packages (from chromadb->educhain==0.3.2) (4.12.2)\n",
+            "Collecting onnxruntime>=1.14.1 (from chromadb->educhain==0.3.2)\n",
+            "  Downloading onnxruntime-1.19.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (4.5 kB)\n",
+            "Requirement already satisfied: opentelemetry-api>=1.2.0 in /usr/local/lib/python3.10/dist-packages (from chromadb->educhain==0.3.2) (1.16.0)\n",
+            "Collecting opentelemetry-exporter-otlp-proto-grpc>=1.2.0 (from chromadb->educhain==0.3.2)\n",
+            "  Downloading opentelemetry_exporter_otlp_proto_grpc-1.27.0-py3-none-any.whl.metadata (2.3 kB)\n",
+            "Collecting opentelemetry-instrumentation-fastapi>=0.41b0 (from chromadb->educhain==0.3.2)\n",
+            "  Downloading opentelemetry_instrumentation_fastapi-0.48b0-py3-none-any.whl.metadata (2.1 kB)\n",
+            "Requirement already satisfied: opentelemetry-sdk>=1.2.0 in /usr/local/lib/python3.10/dist-packages (from chromadb->educhain==0.3.2) (1.16.0)\n",
+            "Requirement already satisfied: tokenizers>=0.13.2 in /usr/local/lib/python3.10/dist-packages (from chromadb->educhain==0.3.2) (0.19.1)\n",
+            "Collecting pypika>=0.48.9 (from chromadb->educhain==0.3.2)\n",
+            "  Downloading PyPika-0.48.9.tar.gz (67 kB)\n",
+            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.3/67.3 kB\u001b[0m \u001b[31m3.0 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",
+            "Requirement already satisfied: tqdm>=4.65.0 in /usr/local/lib/python3.10/dist-packages (from chromadb->educhain==0.3.2) (4.66.5)\n",
+            "Collecting overrides>=7.3.1 (from chromadb->educhain==0.3.2)\n",
+            "  Downloading overrides-7.7.0-py3-none-any.whl.metadata (5.8 kB)\n",
+            "Requirement already satisfied: importlib-resources in /usr/local/lib/python3.10/dist-packages (from chromadb->educhain==0.3.2) (6.4.5)\n",
+            "Requirement already satisfied: grpcio>=1.58.0 in /usr/local/lib/python3.10/dist-packages (from chromadb->educhain==0.3.2) (1.64.1)\n",
+            "Collecting bcrypt>=4.0.1 (from chromadb->educhain==0.3.2)\n",
+            "  Downloading bcrypt-4.2.0-cp39-abi3-manylinux_2_28_x86_64.whl.metadata (9.6 kB)\n",
+            "Requirement already satisfied: typer>=0.9.0 in /usr/local/lib/python3.10/dist-packages (from chromadb->educhain==0.3.2) (0.12.5)\n",
+            "Collecting kubernetes>=28.1.0 (from chromadb->educhain==0.3.2)\n",
+            "  Downloading kubernetes-31.0.0-py2.py3-none-any.whl.metadata (1.5 kB)\n",
+            "Requirement already satisfied: tenacity>=8.2.3 in /usr/local/lib/python3.10/dist-packages (from chromadb->educhain==0.3.2) (9.0.0)\n",
+            "Requirement already satisfied: PyYAML>=6.0.0 in /usr/local/lib/python3.10/dist-packages (from chromadb->educhain==0.3.2) (6.0.2)\n",
+            "Collecting mmh3>=4.0.1 (from chromadb->educhain==0.3.2)\n",
+            "  Downloading mmh3-5.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (14 kB)\n",
+            "Collecting orjson>=3.9.12 (from chromadb->educhain==0.3.2)\n",
+            "  Downloading orjson-3.10.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (50 kB)\n",
+            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.6/50.6 kB\u001b[0m \u001b[31m3.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hCollecting httpx>=0.27.0 (from chromadb->educhain==0.3.2)\n",
+            "  Downloading httpx-0.27.2-py3-none-any.whl.metadata (7.1 kB)\n",
+            "Requirement already satisfied: rich>=10.11.0 in /usr/local/lib/python3.10/dist-packages (from chromadb->educhain==0.3.2) (13.9.2)\n",
+            "Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from pydantic->educhain==0.3.2) (0.7.0)\n",
+            "Requirement already satisfied: pydantic-core==2.23.4 in /usr/local/lib/python3.10/dist-packages (from pydantic->educhain==0.3.2) (2.23.4)\n",
+            "Requirement already satisfied: SQLAlchemy<3,>=1.4 in /usr/local/lib/python3.10/dist-packages (from langchain->educhain==0.3.2) (2.0.36)\n",
+            "Requirement already satisfied: aiohttp<4.0.0,>=3.8.3 in /usr/local/lib/python3.10/dist-packages (from langchain->educhain==0.3.2) (3.10.10)\n",
+            "Requirement already satisfied: async-timeout<5.0.0,>=4.0.0 in /usr/local/lib/python3.10/dist-packages (from langchain->educhain==0.3.2) (4.0.3)\n",
+            "Collecting langchain-core<0.4.0,>=0.3.12 (from langchain->educhain==0.3.2)\n",
+            "  Downloading langchain_core-0.3.12-py3-none-any.whl.metadata (6.3 kB)\n",
+            "Collecting langchain-text-splitters<0.4.0,>=0.3.0 (from langchain->educhain==0.3.2)\n",
+            "  Downloading langchain_text_splitters-0.3.0-py3-none-any.whl.metadata (2.3 kB)\n",
+            "Collecting langsmith<0.2.0,>=0.1.17 (from langchain->educhain==0.3.2)\n",
+            "  Downloading langsmith-0.1.136-py3-none-any.whl.metadata (13 kB)\n",
+            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->educhain==0.3.2) (3.4.0)\n",
+            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->educhain==0.3.2) (3.10)\n",
+            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->educhain==0.3.2) (2.2.3)\n",
+            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->educhain==0.3.2) (2024.8.30)\n",
+            "Collecting dataclasses-json<0.7,>=0.5.7 (from langchain-community->educhain==0.3.2)\n",
+            "  Downloading dataclasses_json-0.6.7-py3-none-any.whl.metadata (25 kB)\n",
+            "Collecting pydantic-settings<3.0.0,>=2.4.0 (from langchain-community->educhain==0.3.2)\n",
+            "  Downloading pydantic_settings-2.6.0-py3-none-any.whl.metadata (3.5 kB)\n",
+            "Collecting tiktoken<1,>=0.7 (from langchain-openai->educhain==0.3.2)\n",
+            "  Downloading tiktoken-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.6 kB)\n",
+            "Requirement already satisfied: anyio<5,>=3.5.0 in /usr/local/lib/python3.10/dist-packages (from openai->educhain==0.3.2) (3.7.1)\n",
+            "Requirement already satisfied: distro<2,>=1.7.0 in /usr/lib/python3/dist-packages (from openai->educhain==0.3.2) (1.7.0)\n",
+            "Collecting jiter<1,>=0.4.0 (from openai->educhain==0.3.2)\n",
+            "  Downloading jiter-0.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.2 kB)\n",
+            "Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from openai->educhain==0.3.2) (1.3.1)\n",
+            "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from pandas->educhain==0.3.2) (2.8.2)\n",
+            "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->educhain==0.3.2) (2024.2)\n",
+            "Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.10/dist-packages (from pandas->educhain==0.3.2) (2024.2)\n",
+            "Requirement already satisfied: pillow>=9.0.0 in /usr/local/lib/python3.10/dist-packages (from reportlab->educhain==0.3.2) (10.4.0)\n",
+            "Requirement already satisfied: chardet in /usr/local/lib/python3.10/dist-packages (from reportlab->educhain==0.3.2) (5.2.0)\n",
+            "Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain->educhain==0.3.2) (2.4.3)\n",
+            "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain->educhain==0.3.2) (1.3.1)\n",
+            "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain->educhain==0.3.2) (24.2.0)\n",
+            "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain->educhain==0.3.2) (1.4.1)\n",
+            "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain->educhain==0.3.2) (6.1.0)\n",
+            "Requirement already satisfied: yarl<2.0,>=1.12.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain->educhain==0.3.2) (1.15.2)\n",
+            "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5,>=3.5.0->openai->educhain==0.3.2) (1.2.2)\n",
+            "Requirement already satisfied: packaging>=19.1 in /usr/local/lib/python3.10/dist-packages (from build>=1.0.3->chromadb->educhain==0.3.2) (24.1)\n",
+            "Collecting pyproject_hooks (from build>=1.0.3->chromadb->educhain==0.3.2)\n",
+            "  Downloading pyproject_hooks-1.2.0-py3-none-any.whl.metadata (1.3 kB)\n",
+            "Requirement already satisfied: tomli>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from build>=1.0.3->chromadb->educhain==0.3.2) (2.0.2)\n",
+            "Collecting marshmallow<4.0.0,>=3.18.0 (from dataclasses-json<0.7,>=0.5.7->langchain-community->educhain==0.3.2)\n",
+            "  Downloading marshmallow-3.23.0-py3-none-any.whl.metadata (7.6 kB)\n",
+            "Collecting typing-inspect<1,>=0.4.0 (from dataclasses-json<0.7,>=0.5.7->langchain-community->educhain==0.3.2)\n",
+            "  Downloading typing_inspect-0.9.0-py3-none-any.whl.metadata (1.5 kB)\n",
+            "Collecting starlette<0.41.0,>=0.37.2 (from fastapi>=0.95.2->chromadb->educhain==0.3.2)\n",
+            "  Downloading starlette-0.40.0-py3-none-any.whl.metadata (6.0 kB)\n",
+            "Collecting httpcore==1.* (from httpx>=0.27.0->chromadb->educhain==0.3.2)\n",
+            "  Downloading httpcore-1.0.6-py3-none-any.whl.metadata (21 kB)\n",
+            "Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx>=0.27.0->chromadb->educhain==0.3.2)\n",
+            "  Downloading h11-0.14.0-py3-none-any.whl.metadata (8.2 kB)\n",
+            "Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python3.10/dist-packages (from kubernetes>=28.1.0->chromadb->educhain==0.3.2) (1.16.0)\n",
+            "Requirement already satisfied: google-auth>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from kubernetes>=28.1.0->chromadb->educhain==0.3.2) (2.27.0)\n",
+            "Requirement already satisfied: websocket-client!=0.40.0,!=0.41.*,!=0.42.*,>=0.32.0 in /usr/local/lib/python3.10/dist-packages (from kubernetes>=28.1.0->chromadb->educhain==0.3.2) (1.8.0)\n",
+            "Requirement already satisfied: requests-oauthlib in /usr/local/lib/python3.10/dist-packages (from kubernetes>=28.1.0->chromadb->educhain==0.3.2) (1.3.1)\n",
+            "Requirement already satisfied: oauthlib>=3.2.2 in /usr/local/lib/python3.10/dist-packages (from kubernetes>=28.1.0->chromadb->educhain==0.3.2) (3.2.2)\n",
+            "Collecting durationpy>=0.7 (from kubernetes>=28.1.0->chromadb->educhain==0.3.2)\n",
+            "  Downloading durationpy-0.9-py3-none-any.whl.metadata (338 bytes)\n",
+            "Collecting jsonpatch<2.0,>=1.33 (from langchain-core<0.4.0,>=0.3.12->langchain->educhain==0.3.2)\n",
+            "  Downloading jsonpatch-1.33-py2.py3-none-any.whl.metadata (3.0 kB)\n",
+            "Collecting requests-toolbelt<2.0.0,>=1.0.0 (from langsmith<0.2.0,>=0.1.17->langchain->educhain==0.3.2)\n",
+            "  Downloading requests_toolbelt-1.0.0-py2.py3-none-any.whl.metadata (14 kB)\n",
+            "Collecting coloredlogs (from onnxruntime>=1.14.1->chromadb->educhain==0.3.2)\n",
+            "  Downloading coloredlogs-15.0.1-py2.py3-none-any.whl.metadata (12 kB)\n",
+            "Requirement already satisfied: flatbuffers in /usr/local/lib/python3.10/dist-packages (from onnxruntime>=1.14.1->chromadb->educhain==0.3.2) (24.3.25)\n",
+            "Requirement already satisfied: protobuf in /usr/local/lib/python3.10/dist-packages (from onnxruntime>=1.14.1->chromadb->educhain==0.3.2) (3.20.3)\n",
+            "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from onnxruntime>=1.14.1->chromadb->educhain==0.3.2) (1.13.3)\n",
+            "Requirement already satisfied: deprecated>=1.2.6 in /usr/local/lib/python3.10/dist-packages (from opentelemetry-api>=1.2.0->chromadb->educhain==0.3.2) (1.2.14)\n",
+            "Requirement already satisfied: setuptools>=16.0 in /usr/local/lib/python3.10/dist-packages (from opentelemetry-api>=1.2.0->chromadb->educhain==0.3.2) (75.1.0)\n",
+            "Requirement already satisfied: googleapis-common-protos~=1.52 in /usr/local/lib/python3.10/dist-packages (from opentelemetry-exporter-otlp-proto-grpc>=1.2.0->chromadb->educhain==0.3.2) (1.65.0)\n",
+            "Collecting opentelemetry-exporter-otlp-proto-common==1.27.0 (from opentelemetry-exporter-otlp-proto-grpc>=1.2.0->chromadb->educhain==0.3.2)\n",
+            "  Downloading opentelemetry_exporter_otlp_proto_common-1.27.0-py3-none-any.whl.metadata (1.8 kB)\n",
+            "Collecting opentelemetry-proto==1.27.0 (from opentelemetry-exporter-otlp-proto-grpc>=1.2.0->chromadb->educhain==0.3.2)\n",
+            "  Downloading opentelemetry_proto-1.27.0-py3-none-any.whl.metadata (2.3 kB)\n",
+            "Collecting opentelemetry-sdk>=1.2.0 (from chromadb->educhain==0.3.2)\n",
+            "  Downloading opentelemetry_sdk-1.27.0-py3-none-any.whl.metadata (1.5 kB)\n",
+            "Collecting opentelemetry-instrumentation-asgi==0.48b0 (from opentelemetry-instrumentation-fastapi>=0.41b0->chromadb->educhain==0.3.2)\n",
+            "  Downloading opentelemetry_instrumentation_asgi-0.48b0-py3-none-any.whl.metadata (2.0 kB)\n",
+            "Collecting opentelemetry-instrumentation==0.48b0 (from opentelemetry-instrumentation-fastapi>=0.41b0->chromadb->educhain==0.3.2)\n",
+            "  Downloading opentelemetry_instrumentation-0.48b0-py3-none-any.whl.metadata (6.1 kB)\n",
+            "Collecting opentelemetry-semantic-conventions==0.48b0 (from opentelemetry-instrumentation-fastapi>=0.41b0->chromadb->educhain==0.3.2)\n",
+            "  Downloading opentelemetry_semantic_conventions-0.48b0-py3-none-any.whl.metadata (2.4 kB)\n",
+            "Collecting opentelemetry-util-http==0.48b0 (from opentelemetry-instrumentation-fastapi>=0.41b0->chromadb->educhain==0.3.2)\n",
+            "  Downloading opentelemetry_util_http-0.48b0-py3-none-any.whl.metadata (2.5 kB)\n",
+            "Requirement already satisfied: wrapt<2.0.0,>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from opentelemetry-instrumentation==0.48b0->opentelemetry-instrumentation-fastapi>=0.41b0->chromadb->educhain==0.3.2) (1.16.0)\n",
+            "Collecting asgiref~=3.0 (from opentelemetry-instrumentation-asgi==0.48b0->opentelemetry-instrumentation-fastapi>=0.41b0->chromadb->educhain==0.3.2)\n",
+            "  Downloading asgiref-3.8.1-py3-none-any.whl.metadata (9.3 kB)\n",
+            "Collecting opentelemetry-api>=1.2.0 (from chromadb->educhain==0.3.2)\n",
+            "  Downloading opentelemetry_api-1.27.0-py3-none-any.whl.metadata (1.4 kB)\n",
+            "Collecting importlib-metadata<=8.4.0,>=6.0 (from opentelemetry-api>=1.2.0->chromadb->educhain==0.3.2)\n",
+            "  Downloading importlib_metadata-8.4.0-py3-none-any.whl.metadata (4.7 kB)\n",
+            "Collecting monotonic>=1.5 (from posthog>=2.4.0->chromadb->educhain==0.3.2)\n",
+            "  Downloading monotonic-1.6-py2.py3-none-any.whl.metadata (1.5 kB)\n",
+            "Collecting backoff>=1.10.0 (from posthog>=2.4.0->chromadb->educhain==0.3.2)\n",
+            "  Downloading backoff-2.2.1-py3-none-any.whl.metadata (14 kB)\n",
+            "Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.10/dist-packages (from rich>=10.11.0->chromadb->educhain==0.3.2) (3.0.0)\n",
+            "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.10/dist-packages (from rich>=10.11.0->chromadb->educhain==0.3.2) (2.18.0)\n",
+            "Requirement already satisfied: greenlet!=0.4.17 in /usr/local/lib/python3.10/dist-packages (from SQLAlchemy<3,>=1.4->langchain->educhain==0.3.2) (3.1.1)\n",
+            "Requirement already satisfied: regex>=2022.1.18 in /usr/local/lib/python3.10/dist-packages (from tiktoken<1,>=0.7->langchain-openai->educhain==0.3.2) (2024.9.11)\n",
+            "Requirement already satisfied: huggingface-hub<1.0,>=0.16.4 in /usr/local/lib/python3.10/dist-packages (from tokenizers>=0.13.2->chromadb->educhain==0.3.2) (0.24.7)\n",
+            "Requirement already satisfied: click>=8.0.0 in /usr/local/lib/python3.10/dist-packages (from typer>=0.9.0->chromadb->educhain==0.3.2) (8.1.7)\n",
+            "Requirement already satisfied: shellingham>=1.3.0 in /usr/local/lib/python3.10/dist-packages (from typer>=0.9.0->chromadb->educhain==0.3.2) (1.5.4)\n",
+            "Collecting httptools>=0.5.0 (from uvicorn[standard]>=0.18.3->chromadb->educhain==0.3.2)\n",
+            "  Downloading httptools-0.6.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.6 kB)\n",
+            "Collecting uvloop!=0.15.0,!=0.15.1,>=0.14.0 (from uvicorn[standard]>=0.18.3->chromadb->educhain==0.3.2)\n",
+            "  Downloading uvloop-0.21.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.9 kB)\n",
+            "Collecting watchfiles>=0.13 (from uvicorn[standard]>=0.18.3->chromadb->educhain==0.3.2)\n",
+            "  Downloading watchfiles-0.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.9 kB)\n",
+            "Collecting websockets>=10.4 (from uvicorn[standard]>=0.18.3->chromadb->educhain==0.3.2)\n",
+            "  Downloading websockets-13.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.8 kB)\n",
+            "Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from google-auth>=1.0.1->kubernetes>=28.1.0->chromadb->educhain==0.3.2) (5.5.0)\n",
+            "Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.10/dist-packages (from google-auth>=1.0.1->kubernetes>=28.1.0->chromadb->educhain==0.3.2) (0.4.1)\n",
+            "Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.10/dist-packages (from google-auth>=1.0.1->kubernetes>=28.1.0->chromadb->educhain==0.3.2) (4.9)\n",
+            "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.16.4->tokenizers>=0.13.2->chromadb->educhain==0.3.2) (3.16.1)\n",
+            "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.16.4->tokenizers>=0.13.2->chromadb->educhain==0.3.2) (2024.6.1)\n",
+            "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.10/dist-packages (from importlib-metadata<=8.4.0,>=6.0->opentelemetry-api>=1.2.0->chromadb->educhain==0.3.2) (3.20.2)\n",
+            "Collecting jsonpointer>=1.9 (from jsonpatch<2.0,>=1.33->langchain-core<0.4.0,>=0.3.12->langchain->educhain==0.3.2)\n",
+            "  Downloading jsonpointer-3.0.0-py2.py3-none-any.whl.metadata (2.3 kB)\n",
+            "Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py>=2.2.0->rich>=10.11.0->chromadb->educhain==0.3.2) (0.1.2)\n",
+            "Collecting mypy-extensions>=0.3.0 (from typing-inspect<1,>=0.4.0->dataclasses-json<0.7,>=0.5.7->langchain-community->educhain==0.3.2)\n",
+            "  Downloading mypy_extensions-1.0.0-py3-none-any.whl.metadata (1.1 kB)\n",
+            "Requirement already satisfied: propcache>=0.2.0 in /usr/local/lib/python3.10/dist-packages (from yarl<2.0,>=1.12.0->aiohttp<4.0.0,>=3.8.3->langchain->educhain==0.3.2) (0.2.0)\n",
+            "Collecting humanfriendly>=9.1 (from coloredlogs->onnxruntime>=1.14.1->chromadb->educhain==0.3.2)\n",
+            "  Downloading humanfriendly-10.0-py2.py3-none-any.whl.metadata (9.2 kB)\n",
+            "Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from sympy->onnxruntime>=1.14.1->chromadb->educhain==0.3.2) (1.3.0)\n",
+            "Requirement already satisfied: pyasn1<0.7.0,>=0.4.6 in /usr/local/lib/python3.10/dist-packages (from pyasn1-modules>=0.2.1->google-auth>=1.0.1->kubernetes>=28.1.0->chromadb->educhain==0.3.2) (0.6.1)\n",
+            "Downloading chromadb-0.5.15-py3-none-any.whl (607 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m607.0/607.0 kB\u001b[0m \u001b[31m16.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading chroma_hnswlib-0.7.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.4/2.4 MB\u001b[0m \u001b[31m57.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading langchain-0.3.4-py3-none-any.whl (1.0 MB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.0/1.0 MB\u001b[0m \u001b[31m44.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading langchain_community-0.3.3-py3-none-any.whl (2.4 MB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.4/2.4 MB\u001b[0m \u001b[31m62.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading langchain_openai-0.2.3-py3-none-any.whl (49 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.9/49.9 kB\u001b[0m \u001b[31m3.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading openai-1.52.0-py3-none-any.whl (386 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m386.9/386.9 kB\u001b[0m \u001b[31m22.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading pypdf2-3.0.1-py3-none-any.whl (232 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m232.6/232.6 kB\u001b[0m \u001b[31m16.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading python_dotenv-1.0.1-py3-none-any.whl (19 kB)\n",
+            "Downloading reportlab-4.2.5-py3-none-any.whl (1.9 MB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.9/1.9 MB\u001b[0m \u001b[31m52.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading youtube_transcript_api-0.6.2-py3-none-any.whl (24 kB)\n",
+            "Downloading bcrypt-4.2.0-cp39-abi3-manylinux_2_28_x86_64.whl (273 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m273.8/273.8 kB\u001b[0m \u001b[31m17.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading build-1.2.2.post1-py3-none-any.whl (22 kB)\n",
+            "Downloading dataclasses_json-0.6.7-py3-none-any.whl (28 kB)\n",
+            "Downloading fastapi-0.115.2-py3-none-any.whl (94 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m94.7/94.7 kB\u001b[0m \u001b[31m5.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading httpx-0.27.2-py3-none-any.whl (76 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m76.4/76.4 kB\u001b[0m \u001b[31m5.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading httpcore-1.0.6-py3-none-any.whl (78 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m78.0/78.0 kB\u001b[0m \u001b[31m5.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading jiter-0.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (325 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m325.2/325.2 kB\u001b[0m \u001b[31m22.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading kubernetes-31.0.0-py2.py3-none-any.whl (1.9 MB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.9/1.9 MB\u001b[0m \u001b[31m59.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading langchain_core-0.3.12-py3-none-any.whl (407 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m407.7/407.7 kB\u001b[0m \u001b[31m28.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading langchain_text_splitters-0.3.0-py3-none-any.whl (25 kB)\n",
+            "Downloading langsmith-0.1.136-py3-none-any.whl (296 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m296.7/296.7 kB\u001b[0m \u001b[31m20.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading mmh3-5.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (93 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m93.2/93.2 kB\u001b[0m \u001b[31m6.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading onnxruntime-1.19.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (13.2 MB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m13.2/13.2 MB\u001b[0m \u001b[31m77.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading opentelemetry_exporter_otlp_proto_grpc-1.27.0-py3-none-any.whl (18 kB)\n",
+            "Downloading opentelemetry_exporter_otlp_proto_common-1.27.0-py3-none-any.whl (17 kB)\n",
+            "Downloading opentelemetry_proto-1.27.0-py3-none-any.whl (52 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m52.5/52.5 kB\u001b[0m \u001b[31m3.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading opentelemetry_instrumentation_fastapi-0.48b0-py3-none-any.whl (11 kB)\n",
+            "Downloading opentelemetry_instrumentation-0.48b0-py3-none-any.whl (29 kB)\n",
+            "Downloading opentelemetry_instrumentation_asgi-0.48b0-py3-none-any.whl (15 kB)\n",
+            "Downloading opentelemetry_semantic_conventions-0.48b0-py3-none-any.whl (149 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m149.7/149.7 kB\u001b[0m \u001b[31m9.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading opentelemetry_api-1.27.0-py3-none-any.whl (63 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m64.0/64.0 kB\u001b[0m \u001b[31m3.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading opentelemetry_util_http-0.48b0-py3-none-any.whl (6.9 kB)\n",
+            "Downloading opentelemetry_sdk-1.27.0-py3-none-any.whl (110 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m110.5/110.5 kB\u001b[0m \u001b[31m7.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading orjson-3.10.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (144 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m144.5/144.5 kB\u001b[0m \u001b[31m10.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading overrides-7.7.0-py3-none-any.whl (17 kB)\n",
+            "Downloading posthog-3.7.0-py2.py3-none-any.whl (54 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m54.4/54.4 kB\u001b[0m \u001b[31m3.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading pydantic_settings-2.6.0-py3-none-any.whl (28 kB)\n",
+            "Downloading tiktoken-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.2/1.2 MB\u001b[0m \u001b[31m46.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading uvicorn-0.32.0-py3-none-any.whl (63 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m63.7/63.7 kB\u001b[0m \u001b[31m3.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading backoff-2.2.1-py3-none-any.whl (15 kB)\n",
+            "Downloading durationpy-0.9-py3-none-any.whl (3.5 kB)\n",
+            "Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m3.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading httptools-0.6.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (442 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m442.1/442.1 kB\u001b[0m \u001b[31m28.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading importlib_metadata-8.4.0-py3-none-any.whl (26 kB)\n",
+            "Downloading jsonpatch-1.33-py2.py3-none-any.whl (12 kB)\n",
+            "Downloading marshmallow-3.23.0-py3-none-any.whl (49 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.5/49.5 kB\u001b[0m \u001b[31m3.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading monotonic-1.6-py2.py3-none-any.whl (8.2 kB)\n",
+            "Downloading requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m54.5/54.5 kB\u001b[0m \u001b[31m3.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading starlette-0.40.0-py3-none-any.whl (73 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m73.3/73.3 kB\u001b[0m \u001b[31m5.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading typing_inspect-0.9.0-py3-none-any.whl (8.8 kB)\n",
+            "Downloading uvloop-0.21.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.8/3.8 MB\u001b[0m \u001b[31m69.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading watchfiles-0.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (425 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m425.7/425.7 kB\u001b[0m \u001b[31m24.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading websockets-13.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (164 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m164.1/164.1 kB\u001b[0m \u001b[31m8.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m46.0/46.0 kB\u001b[0m \u001b[31m2.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading pyproject_hooks-1.2.0-py3-none-any.whl (10 kB)\n",
+            "Downloading asgiref-3.8.1-py3-none-any.whl (23 kB)\n",
+            "Downloading humanfriendly-10.0-py2.py3-none-any.whl (86 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m86.8/86.8 kB\u001b[0m \u001b[31m6.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hDownloading jsonpointer-3.0.0-py2.py3-none-any.whl (7.6 kB)\n",
+            "Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)\n",
+            "Building wheels for collected packages: educhain, pypika\n",
+            "  Building wheel for educhain (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
+            "  Created wheel for educhain: filename=educhain-0.3.2-py3-none-any.whl size=15554 sha256=e74e4c920f039bc10b192209570e0e6475fdedabff63b9e2c85d336796be5580\n",
+            "  Stored in directory: /tmp/pip-ephem-wheel-cache-hsgqweb3/wheels/cf/37/1a/d1708e678c8679ecce8ee35b17f42fc00df5e425b1ef60b913\n",
+            "  Building wheel for pypika (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
+            "  Created wheel for pypika: filename=PyPika-0.48.9-py2.py3-none-any.whl size=53725 sha256=30b5b35b539c522a66e732dbc9e57aec1a4c18835a766503662627daa1a93bea\n",
+            "  Stored in directory: /root/.cache/pip/wheels/e1/26/51/d0bffb3d2fd82256676d7ad3003faea3bd6dddc9577af665f4\n",
+            "Successfully built educhain pypika\n",
+            "Installing collected packages: pypika, monotonic, durationpy, websockets, uvloop, reportlab, python-dotenv, pyproject_hooks, PyPDF2, overrides, orjson, opentelemetry-util-http, opentelemetry-proto, mypy-extensions, mmh3, marshmallow, jsonpointer, jiter, importlib-metadata, humanfriendly, httptools, h11, chroma-hnswlib, bcrypt, backoff, asgiref, youtube_transcript_api, watchfiles, uvicorn, typing-inspect, tiktoken, starlette, requests-toolbelt, posthog, opentelemetry-exporter-otlp-proto-common, opentelemetry-api, jsonpatch, httpcore, coloredlogs, build, pydantic-settings, opentelemetry-semantic-conventions, opentelemetry-instrumentation, onnxruntime, kubernetes, httpx, fastapi, dataclasses-json, opentelemetry-sdk, opentelemetry-instrumentation-asgi, openai, langsmith, opentelemetry-instrumentation-fastapi, opentelemetry-exporter-otlp-proto-grpc, langchain-core, langchain-text-splitters, langchain-openai, chromadb, langchain, langchain-community, educhain\n",
+            "  Attempting uninstall: importlib-metadata\n",
+            "    Found existing installation: importlib_metadata 8.5.0\n",
+            "    Uninstalling importlib_metadata-8.5.0:\n",
+            "      Successfully uninstalled importlib_metadata-8.5.0\n",
+            "  Attempting uninstall: opentelemetry-api\n",
+            "    Found existing installation: opentelemetry-api 1.16.0\n",
+            "    Uninstalling opentelemetry-api-1.16.0:\n",
+            "      Successfully uninstalled opentelemetry-api-1.16.0\n",
+            "  Attempting uninstall: opentelemetry-semantic-conventions\n",
+            "    Found existing installation: opentelemetry-semantic-conventions 0.37b0\n",
+            "    Uninstalling opentelemetry-semantic-conventions-0.37b0:\n",
+            "      Successfully uninstalled opentelemetry-semantic-conventions-0.37b0\n",
+            "  Attempting uninstall: opentelemetry-sdk\n",
+            "    Found existing installation: opentelemetry-sdk 1.16.0\n",
+            "    Uninstalling opentelemetry-sdk-1.16.0:\n",
+            "      Successfully uninstalled opentelemetry-sdk-1.16.0\n",
+            "Successfully installed PyPDF2-3.0.1 asgiref-3.8.1 backoff-2.2.1 bcrypt-4.2.0 build-1.2.2.post1 chroma-hnswlib-0.7.6 chromadb-0.5.15 coloredlogs-15.0.1 dataclasses-json-0.6.7 durationpy-0.9 educhain-0.3.2 fastapi-0.115.2 h11-0.14.0 httpcore-1.0.6 httptools-0.6.4 httpx-0.27.2 humanfriendly-10.0 importlib-metadata-8.4.0 jiter-0.6.1 jsonpatch-1.33 jsonpointer-3.0.0 kubernetes-31.0.0 langchain-0.3.4 langchain-community-0.3.3 langchain-core-0.3.12 langchain-openai-0.2.3 langchain-text-splitters-0.3.0 langsmith-0.1.136 marshmallow-3.23.0 mmh3-5.0.1 monotonic-1.6 mypy-extensions-1.0.0 onnxruntime-1.19.2 openai-1.52.0 opentelemetry-api-1.27.0 opentelemetry-exporter-otlp-proto-common-1.27.0 opentelemetry-exporter-otlp-proto-grpc-1.27.0 opentelemetry-instrumentation-0.48b0 opentelemetry-instrumentation-asgi-0.48b0 opentelemetry-instrumentation-fastapi-0.48b0 opentelemetry-proto-1.27.0 opentelemetry-sdk-1.27.0 opentelemetry-semantic-conventions-0.48b0 opentelemetry-util-http-0.48b0 orjson-3.10.9 overrides-7.7.0 posthog-3.7.0 pydantic-settings-2.6.0 pypika-0.48.9 pyproject_hooks-1.2.0 python-dotenv-1.0.1 reportlab-4.2.5 requests-toolbelt-1.0.0 starlette-0.40.0 tiktoken-0.8.0 typing-inspect-0.9.0 uvicorn-0.32.0 uvloop-0.21.0 watchfiles-0.24.0 websockets-13.1 youtube_transcript_api-0.6.2\n"
+          ]
+        }
+      ]
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "# Set up your OpenAI API key\n",
+        "import os\n",
+        "from google.colab import userdata\n",
+        "\n",
+        "os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY')"
+      ],
+      "metadata": {
+        "id": "KgLAsaAOTlR6"
+      },
+      "execution_count": 6,
+      "outputs": []
+    },
+    {
+      "cell_type": "markdown",
+      "source": [
+        "## Generate lesson plan"
+      ],
+      "metadata": {
+        "id": "rxw33I5IUpSa"
+      }
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "from educhain import Educhain\n",
+        "\n",
+        "client = Educhain()\n",
+        "\n",
+        "plan = client.content_engine.generate_lesson_plan(\n",
+        "    topic = \"Newton's Law of Motion\"\n",
+        "    )\n",
+        "\n",
+        "plan.show()"
+      ],
+      "metadata": {
+        "colab": {
+          "base_uri": "https://localhost:8080/"
+        },
+        "id": "vumbAeXHUhwc",
+        "outputId": "a6c2de90-5d4d-41b6-f4c1-398f6aa1eab9"
+      },
+      "execution_count": 9,
+      "outputs": [
+        {
+          "output_type": "stream",
+          "name": "stdout",
+          "text": [
+            "Raw output from LLM:\n",
+            "```json\n",
+            "{\n",
+            "  \"title\": \"Exploring Newton's Laws of Motion\",\n",
+            "  \"subject\": \"Physics\",\n",
+            "  \"learning_objectives\": [\n",
+            "    \"Understand and describe Newton's three laws of motion.\",\n",
+            "    \"Apply Newton's laws to solve real-world problems.\",\n",
+            "    \"Analyze and evaluate the impact of motion on everyday life.\"\n",
+            "  ],\n",
+            "  \"lesson_introduction\": \"Have you ever wondered why a soccer ball rolls further on a smooth surface than on a rough one? To grab our attention, let’s watch a short video demonstrating various objects in motion. How do forces influence their movement? Today, we’ll dive into Newton's Laws of Motion and discover their significance in our daily lives!\",\n",
+            "  \"main_topics\": [\n",
+            "    {\n",
+            "      \"title\": \"Newton's First Law: The Law of Inertia\",\n",
+            "      \"subtopics\": [\n",
+            "        {\n",
+            "          \"title\": \"Understanding Inertia\",\n",
+            "          \"key_concepts\": [\n",
+            "            {\n",
+            "              \"type\": \"definition\",\n",
+            "              \"content\": \"Inertia is the tendency of an object to resist changes in its state of motion.\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"type\": \"example\",\n",
+            "              \"content\": \"A stationary book will not move unless a force acts upon it.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"discussion_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"Can you think of an example in real life where you observe inertia?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"hands_on_activities\": [\n",
+            "            {\n",
+            "              \"title\": \"Inertia Demonstration\",\n",
+            "              \"description\": \"Use a toy car to demonstrate inertia by rolling it on different surfaces.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"reflective_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"Why is understanding inertia important in designing vehicles?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"assessment_ideas\": [\n",
+            "            {\n",
+            "              \"type\": \"quiz\",\n",
+            "              \"description\": \"A short quiz on identifying examples of inertia in everyday life.\"\n",
+            "            }\n",
+            "          ]\n",
+            "        },\n",
+            "        {\n",
+            "          \"title\": \"Applications of Inertia\",\n",
+            "          \"key_concepts\": [\n",
+            "            {\n",
+            "              \"type\": \"example\",\n",
+            "              \"content\": \"Seatbelts in cars are designed to counteract inertia.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"discussion_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"How do seatbelts relate to Newton's First Law?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"hands_on_activities\": [\n",
+            "            {\n",
+            "              \"title\": \"Seatbelt Safety Experiment\",\n",
+            "              \"description\": \"Create a simple crash test using a toy car and a barrier to see the effects of inertia.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"reflective_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"What would happen in a car crash without seatbelts?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"assessment_ideas\": [\n",
+            "            {\n",
+            "              \"type\": \"project\",\n",
+            "              \"description\": \"Create a visual presentation on the importance of seatbelt use.\"\n",
+            "            }\n",
+            "          ]\n",
+            "        }\n",
+            "      ]\n",
+            "    },\n",
+            "    {\n",
+            "      \"title\": \"Newton's Second Law: The Law of Acceleration\",\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\": \"Pushing a heavier box requires more force than pushing a lighter one.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"discussion_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"How can we apply this law to sports?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"hands_on_activities\": [\n",
+            "            {\n",
+            "              \"title\": \"Force and Mass Experiment\",\n",
+            "              \"description\": \"Use a spring scale to measure the force required to move objects of different masses.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"reflective_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"How does this law explain the motion of a rocket?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"assessment_ideas\": [\n",
+            "            {\n",
+            "              \"type\": \"written task\",\n",
+            "              \"description\": \"Write a short essay explaining how Newton's Second Law applies to a sport.\"\n",
+            "            }\n",
+            "          ]\n",
+            "        }\n",
+            "      ]\n",
+            "    },\n",
+            "    {\n",
+            "      \"title\": \"Newton's Third Law: Action and Reaction\",\n",
+            "      \"subtopics\": [\n",
+            "        {\n",
+            "          \"title\": \"Understanding Action and Reaction\",\n",
+            "          \"key_concepts\": [\n",
+            "            {\n",
+            "              \"type\": \"definition\",\n",
+            "              \"content\": \"For every action, there is an equal and opposite reaction.\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"type\": \"example\",\n",
+            "              \"content\": \"When you jump off a small boat, the boat moves in the opposite direction.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"discussion_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"Can you think of other examples where this law applies?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"hands_on_activities\": [\n",
+            "            {\n",
+            "              \"title\": \"Balloon Rocket Experiment\",\n",
+            "              \"description\": \"Create a balloon rocket to demonstrate action and reaction using a string and a balloon.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"reflective_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"How does this law explain how airplanes fly?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"assessment_ideas\": [\n",
+            "            {\n",
+            "              \"type\": \"project\",\n",
+            "              \"description\": \"Design a poster showing various examples of action and reaction in nature.\"\n",
+            "            }\n",
+            "          ]\n",
+            "        }\n",
+            "      ]\n",
+            "    }\n",
+            "  ],\n",
+            "  \"learning_adaptations\": \"Differentiate instruction by providing visual aids, hands-on demonstrations, and collaborative group work for varied learning styles.\",\n",
+            "  \"real_world_applications\": \"Understanding Newton's laws is essential for engineers, athletes, and scientists. Careers such as aerospace engineering, automotive design, and physics research all rely on these principles.\",\n",
+            "  \"ethical_considerations\": \"Discuss the importance of safety regulations in transportation and how understanding motion can lead to safer designs.\"\n",
+            "}\n",
+            "```\n",
+            "================================================================================\n",
+            "Lesson Plan: Exploring Newton's Laws of Motion\n",
+            "Subject: Physics\n",
+            "Learning Objectives: Understand and describe Newton's three laws of motion., Apply Newton's laws to solve real-world problems., Analyze and evaluate the impact of motion on everyday life.\n",
+            "Lesson Introduction: Have you ever wondered why a soccer ball rolls further on a smooth surface than on a rough one? To grab our attention, let’s watch a short video demonstrating various objects in motion. How do forces influence their movement? Today, we’ll dive into Newton's Laws of Motion and discover their significance in our daily lives!\n",
+            "================================================================================\n",
+            "\n",
+            "Main Topic 1: Newton's First Law: The Law of Inertia\n",
+            "\n",
+            "   Subtopic 1.1: Understanding Inertia\n",
+            "   Key Concepts:\n",
+            "      - Definition: Inertia is the tendency of an object to resist changes in its state of motion.\n",
+            "      - Example: A stationary book will not move unless a force acts upon it.\n",
+            "   Discussion Questions:\n",
+            "      - Can you think of an example in real life where you observe inertia?\n",
+            "   Hands-On Activities:\n",
+            "      - Inertia Demonstration: Use a toy car to demonstrate inertia by rolling it on different surfaces.\n",
+            "   Reflective Questions:\n",
+            "      - Why is understanding inertia important in designing vehicles?\n",
+            "   Assessment Ideas:\n",
+            "      - Quiz: A short quiz on identifying examples of inertia in everyday life.\n",
+            "\n",
+            "   Subtopic 1.2: Applications of Inertia\n",
+            "   Key Concepts:\n",
+            "      - Example: Seatbelts in cars are designed to counteract inertia.\n",
+            "   Discussion Questions:\n",
+            "      - How do seatbelts relate to Newton's First Law?\n",
+            "   Hands-On Activities:\n",
+            "      - Seatbelt Safety Experiment: Create a simple crash test using a toy car and a barrier to see the effects of inertia.\n",
+            "   Reflective Questions:\n",
+            "      - What would happen in a car crash without seatbelts?\n",
+            "   Assessment Ideas:\n",
+            "      - Project: Create a visual presentation on the importance of seatbelt use.\n",
+            "\n",
+            "Main Topic 2: Newton's Second Law: The Law of Acceleration\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: Pushing a heavier box requires more force than pushing a lighter one.\n",
+            "   Discussion Questions:\n",
+            "      - How can we apply this law to sports?\n",
+            "   Hands-On Activities:\n",
+            "      - Force and Mass Experiment: Use a spring scale to measure the force required to move objects of different masses.\n",
+            "   Reflective Questions:\n",
+            "      - How does this law explain the motion of a rocket?\n",
+            "   Assessment Ideas:\n",
+            "      - Written task: Write a short essay explaining how Newton's Second Law applies to a sport.\n",
+            "\n",
+            "Main Topic 3: Newton's Third Law: Action and Reaction\n",
+            "\n",
+            "   Subtopic 3.1: Understanding Action and Reaction\n",
+            "   Key Concepts:\n",
+            "      - Definition: For every action, there is an equal and opposite reaction.\n",
+            "      - Example: When you jump off a small boat, the boat moves in the opposite direction.\n",
+            "   Discussion Questions:\n",
+            "      - Can you think of other examples where this law applies?\n",
+            "   Hands-On Activities:\n",
+            "      - Balloon Rocket Experiment: Create a balloon rocket to demonstrate action and reaction using a string and a balloon.\n",
+            "   Reflective Questions:\n",
+            "      - How does this law explain how airplanes fly?\n",
+            "   Assessment Ideas:\n",
+            "      - Project: Design a poster showing various examples of action and reaction in nature.\n",
+            "\n",
+            "Learning Adaptations:  Differentiate instruction by providing visual aids, hands-on demonstrations, and collaborative group work for varied learning styles.\n",
+            "Real-World Applications:  Understanding Newton's laws is essential for engineers, athletes, and scientists. Careers such as aerospace engineering, automotive design, and physics research all rely on these principles.\n",
+            "Ethical Considerations:  Discuss the importance of safety regulations in transportation and how understanding motion can lead to safer designs.\n"
+          ]
+        }
+      ]
+    },
+    {
+      "cell_type": "markdown",
+      "source": [
+        "## Generate Lesson Plan with **custom instructions**"
+      ],
+      "metadata": {
+        "id": "1ee4iyMdVwD6"
+      }
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "from educhain import Educhain\n",
+        "\n",
+        "client = Educhain()\n",
+        "\n",
+        "plan = client.content_engine.generate_lesson_plan(\n",
+        "    topic = \"Newton's Law of Motion\",\n",
+        "    custom_instructions = \"Focus on hands-on activities and real-world examples.\"\n",
+        ")\n",
+        "\n",
+        "plan.show()"
+      ],
+      "metadata": {
+        "colab": {
+          "base_uri": "https://localhost:8080/"
+        },
+        "id": "O6P8t_rjUzXS",
+        "outputId": "7227848b-e4bb-434e-b926-e68fbcba83a2"
+      },
+      "execution_count": 10,
+      "outputs": [
+        {
+          "output_type": "stream",
+          "name": "stdout",
+          "text": [
+            "Raw output from LLM:\n",
+            "```json\n",
+            "{\n",
+            "  \"title\": \"Exploring Newton's Laws of Motion\",\n",
+            "  \"subject\": \"Physics\",\n",
+            "  \"learning_objectives\": [\n",
+            "    \"Students will be able to state and explain Newton's three laws of motion.\",\n",
+            "    \"Students will demonstrate understanding of the laws through real-world applications.\",\n",
+            "    \"Students will apply Newton's laws in hands-on experiments to observe motion.\"\n",
+            "  ],\n",
+            "  \"lesson_introduction\": \"To kick off our exploration of motion, imagine you're in a car that suddenly accelerates. What happens to your body? This real-world scenario highlights Newton's Laws of Motion. Today, we will uncover how these laws govern not only vehicles but also everything moving around us. What do you think would happen if there were no friction? Let’s find out!\",\n",
+            "  \"main_topics\": [\n",
+            "    {\n",
+            "      \"title\": \"Newton's First Law of Motion\",\n",
+            "      \"subtopics\": [\n",
+            "        {\n",
+            "          \"title\": \"Inertia\",\n",
+            "          \"key_concepts\": [\n",
+            "            {\n",
+            "              \"type\": \"definition\",\n",
+            "              \"content\": \"Inertia is the tendency of an object to resist a change in its state of motion.\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"type\": \"example\",\n",
+            "              \"content\": \"A stationary ball will stay stationary until someone kicks it.\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"type\": \"illustration\",\n",
+            "              \"content\": \"Visual representation of an object at rest and in motion.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"discussion_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"Can you think of a time when you felt the effects of inertia?\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"question\": \"How does inertia affect the safety features in cars?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"hands_on_activities\": [\n",
+            "            {\n",
+            "              \"title\": \"Inertia Experiment\",\n",
+            "              \"description\": \"Students will use a toy car and various surfaces to observe how inertia affects motion.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"reflective_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"How does understanding inertia help us in everyday life?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"assessment_ideas\": [\n",
+            "            {\n",
+            "              \"type\": \"quiz\",\n",
+            "              \"description\": \"A short quiz on the definition of inertia and examples.\"\n",
+            "            }\n",
+            "          ]\n",
+            "        },\n",
+            "        {\n",
+            "          \"title\": \"Applications of First Law\",\n",
+            "          \"key_concepts\": [\n",
+            "            {\n",
+            "              \"type\": \"example\",\n",
+            "              \"content\": \"Seatbelts help to counteract inertia during a sudden stop.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"discussion_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"Why do we need to wear seatbelts?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"hands_on_activities\": [\n",
+            "            {\n",
+            "              \"title\": \"Seatbelt Safety Test\",\n",
+            "              \"description\": \"Using a toy car and a ramp, students will simulate a crash to observe inertia.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"reflective_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"What did you learn about safety from this activity?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"assessment_ideas\": [\n",
+            "            {\n",
+            "              \"type\": \"project\",\n",
+            "              \"description\": \"Create a poster demonstrating the first law with real-world 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\": \"The second law states that Force equals Mass times Acceleration (F=ma).\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"type\": \"example\",\n",
+            "              \"content\": \"Pushing a car requires more force than pushing a bicycle.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"discussion_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"How can we increase the acceleration of an object?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"hands_on_activities\": [\n",
+            "            {\n",
+            "              \"title\": \"Force and Mass Experiment\",\n",
+            "              \"description\": \"Students will use weights and a spring scale to measure the force needed to move objects of different masses.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"reflective_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"What did you notice about the relationship between mass and acceleration?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"assessment_ideas\": [\n",
+            "            {\n",
+            "              \"type\": \"written task\",\n",
+            "              \"description\": \"Write a paragraph explaining how the second law applies to sports.\"\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\": \"For every action, there is an equal and opposite reaction.\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"type\": \"example\",\n",
+            "              \"content\": \"When you jump off a small boat, the boat moves backward.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"discussion_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"Can you think of other examples of action and reaction?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"hands_on_activities\": [\n",
+            "            {\n",
+            "              \"title\": \"Balloon Rocket Experiment\",\n",
+            "              \"description\": \"Students will create balloon rockets to observe action and reaction forces.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"reflective_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"How does understanding this law help us in our daily activities?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"assessment_ideas\": [\n",
+            "            {\n",
+            "              \"type\": \"project\",\n",
+            "              \"description\": \"Design an experiment demonstrating Newton's Third Law.\"\n",
+            "            }\n",
+            "          ]\n",
+            "        }\n",
+            "      ]\n",
+            "    }\n",
+            "  ],\n",
+            "  \"learning_adaptations\": \"For younger students, simplify concepts using visuals and physical models. For advanced learners, challenge them to derive equations related to the laws of motion.\",\n",
+            "  \"real_world_applications\": \"Understanding Newton's laws is essential for careers in engineering, physics, and aerospace. These principles are foundational in designing transportation systems, safety equipment, and athletic performance analysis.\",\n",
+            "  \"ethical_considerations\": \"Discussing the societal impact of motion laws can lead to conversations about vehicle safety regulations and environmental considerations in transportation.\"\n",
+            "}\n",
+            "```\n",
+            "================================================================================\n",
+            "Lesson Plan: Exploring Newton's Laws of Motion\n",
+            "Subject: Physics\n",
+            "Learning Objectives: Students will be able to state and explain Newton's three laws of motion., Students will demonstrate understanding of the laws through real-world applications., Students will apply Newton's laws in hands-on experiments to observe motion.\n",
+            "Lesson Introduction: To kick off our exploration of motion, imagine you're in a car that suddenly accelerates. What happens to your body? This real-world scenario highlights Newton's Laws of Motion. Today, we will uncover how these laws govern not only vehicles but also everything moving around us. What do you think would happen if there were no friction? Let’s find out!\n",
+            "================================================================================\n",
+            "\n",
+            "Main Topic 1: Newton's First Law of Motion\n",
+            "\n",
+            "   Subtopic 1.1: Inertia\n",
+            "   Key Concepts:\n",
+            "      - Definition: Inertia is the tendency of an object to resist a change in its state of motion.\n",
+            "      - Example: A stationary ball will stay stationary until someone kicks it.\n",
+            "      - Illustration: Visual representation of an object at rest and in motion.\n",
+            "   Discussion Questions:\n",
+            "      - Can you think of a time when you felt the effects of inertia?\n",
+            "      - How does inertia affect the safety features in cars?\n",
+            "   Hands-On Activities:\n",
+            "      - Inertia Experiment: Students will use a toy car and various surfaces to observe how inertia affects motion.\n",
+            "   Reflective Questions:\n",
+            "      - How does understanding inertia help us in everyday life?\n",
+            "   Assessment Ideas:\n",
+            "      - Quiz: A short quiz on the definition of inertia and examples.\n",
+            "\n",
+            "   Subtopic 1.2: Applications of First Law\n",
+            "   Key Concepts:\n",
+            "      - Example: Seatbelts help to counteract inertia during a sudden stop.\n",
+            "   Discussion Questions:\n",
+            "      - Why do we need to wear seatbelts?\n",
+            "   Hands-On Activities:\n",
+            "      - Seatbelt Safety Test: Using a toy car and a ramp, students will simulate a crash to observe inertia.\n",
+            "   Reflective Questions:\n",
+            "      - What did you learn about safety from this activity?\n",
+            "   Assessment Ideas:\n",
+            "      - Project: Create a poster demonstrating the first law with real-world 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: The second law states that Force equals Mass times Acceleration (F=ma).\n",
+            "      - Example: Pushing a car requires more force than pushing a bicycle.\n",
+            "   Discussion Questions:\n",
+            "      - How can we increase the acceleration of an object?\n",
+            "   Hands-On Activities:\n",
+            "      - Force and Mass Experiment: Students will use weights and a spring scale to measure the force needed to move objects of different masses.\n",
+            "   Reflective Questions:\n",
+            "      - What did you notice about the relationship between mass and acceleration?\n",
+            "   Assessment Ideas:\n",
+            "      - Written task: Write a paragraph explaining how the second law applies to sports.\n",
+            "\n",
+            "Main Topic 3: Newton's Third Law of Motion\n",
+            "\n",
+            "   Subtopic 3.1: Action and Reaction\n",
+            "   Key Concepts:\n",
+            "      - Definition: For every action, there is an equal and opposite reaction.\n",
+            "      - Example: When you jump off a small boat, the boat moves backward.\n",
+            "   Discussion Questions:\n",
+            "      - Can you think of other examples of action and reaction?\n",
+            "   Hands-On Activities:\n",
+            "      - Balloon Rocket Experiment: Students will create balloon rockets to observe action and reaction forces.\n",
+            "   Reflective Questions:\n",
+            "      - How does understanding this law help us in our daily activities?\n",
+            "   Assessment Ideas:\n",
+            "      - Project: Design an experiment demonstrating Newton's Third Law.\n",
+            "\n",
+            "Learning Adaptations:  For younger students, simplify concepts using visuals and physical models. For advanced learners, challenge them to derive equations related to the laws of motion.\n",
+            "Real-World Applications:  Understanding Newton's laws is essential for careers in engineering, physics, and aerospace. These principles are foundational in designing transportation systems, safety equipment, and athletic performance analysis.\n",
+            "Ethical Considerations:  Discussing the societal impact of motion laws can lead to conversations about vehicle safety regulations and environmental considerations in transportation.\n"
+          ]
+        }
+      ]
+    },
+    {
+      "cell_type": "markdown",
+      "source": [
+        "## Generate Lesson Plan using different models (eg: Gemini)"
+      ],
+      "metadata": {
+        "id": "BRxUTGPHWrEY"
+      }
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "!pip install langchain_google_genai"
+      ],
+      "metadata": {
+        "colab": {
+          "base_uri": "https://localhost:8080/"
+        },
+        "id": "jFxq50JwW30N",
+        "outputId": "523493d5-c831-4208-a700-136bd6ce14a6"
+      },
+      "execution_count": 11,
+      "outputs": [
+        {
+          "output_type": "stream",
+          "name": "stdout",
+          "text": [
+            "Collecting langchain_google_genai\n",
+            "  Downloading langchain_google_genai-2.0.1-py3-none-any.whl.metadata (3.9 kB)\n",
+            "Requirement already satisfied: google-generativeai<0.9.0,>=0.8.0 in /usr/local/lib/python3.10/dist-packages (from langchain_google_genai) (0.8.3)\n",
+            "Requirement already satisfied: langchain-core<0.4,>=0.3.0 in /usr/local/lib/python3.10/dist-packages (from langchain_google_genai) (0.3.12)\n",
+            "Requirement already satisfied: pydantic<3,>=2 in /usr/local/lib/python3.10/dist-packages (from langchain_google_genai) (2.9.2)\n",
+            "Requirement already satisfied: google-ai-generativelanguage==0.6.10 in /usr/local/lib/python3.10/dist-packages (from google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (0.6.10)\n",
+            "Requirement already satisfied: google-api-core in /usr/local/lib/python3.10/dist-packages (from google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (2.19.2)\n",
+            "Requirement already satisfied: google-api-python-client in /usr/local/lib/python3.10/dist-packages (from google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (2.137.0)\n",
+            "Requirement already satisfied: google-auth>=2.15.0 in /usr/local/lib/python3.10/dist-packages (from google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (2.27.0)\n",
+            "Requirement already satisfied: protobuf in /usr/local/lib/python3.10/dist-packages (from google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (3.20.3)\n",
+            "Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (4.66.5)\n",
+            "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (4.12.2)\n",
+            "Requirement already satisfied: proto-plus<2.0.0dev,>=1.22.3 in /usr/local/lib/python3.10/dist-packages (from google-ai-generativelanguage==0.6.10->google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (1.24.0)\n",
+            "Requirement already satisfied: PyYAML>=5.3 in /usr/local/lib/python3.10/dist-packages (from langchain-core<0.4,>=0.3.0->langchain_google_genai) (6.0.2)\n",
+            "Requirement already satisfied: jsonpatch<2.0,>=1.33 in /usr/local/lib/python3.10/dist-packages (from langchain-core<0.4,>=0.3.0->langchain_google_genai) (1.33)\n",
+            "Requirement already satisfied: langsmith<0.2.0,>=0.1.125 in /usr/local/lib/python3.10/dist-packages (from langchain-core<0.4,>=0.3.0->langchain_google_genai) (0.1.136)\n",
+            "Requirement already satisfied: packaging<25,>=23.2 in /usr/local/lib/python3.10/dist-packages (from langchain-core<0.4,>=0.3.0->langchain_google_genai) (24.1)\n",
+            "Requirement already satisfied: tenacity!=8.4.0,<10.0.0,>=8.1.0 in /usr/local/lib/python3.10/dist-packages (from langchain-core<0.4,>=0.3.0->langchain_google_genai) (9.0.0)\n",
+            "Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from pydantic<3,>=2->langchain_google_genai) (0.7.0)\n",
+            "Requirement already satisfied: pydantic-core==2.23.4 in /usr/local/lib/python3.10/dist-packages (from pydantic<3,>=2->langchain_google_genai) (2.23.4)\n",
+            "Requirement already satisfied: googleapis-common-protos<2.0.dev0,>=1.56.2 in /usr/local/lib/python3.10/dist-packages (from google-api-core->google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (1.65.0)\n",
+            "Requirement already satisfied: requests<3.0.0.dev0,>=2.18.0 in /usr/local/lib/python3.10/dist-packages (from google-api-core->google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (2.32.3)\n",
+            "Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from google-auth>=2.15.0->google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (5.5.0)\n",
+            "Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.10/dist-packages (from google-auth>=2.15.0->google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (0.4.1)\n",
+            "Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.10/dist-packages (from google-auth>=2.15.0->google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (4.9)\n",
+            "Requirement already satisfied: jsonpointer>=1.9 in /usr/local/lib/python3.10/dist-packages (from jsonpatch<2.0,>=1.33->langchain-core<0.4,>=0.3.0->langchain_google_genai) (3.0.0)\n",
+            "Requirement already satisfied: httpx<1,>=0.23.0 in /usr/local/lib/python3.10/dist-packages (from langsmith<0.2.0,>=0.1.125->langchain-core<0.4,>=0.3.0->langchain_google_genai) (0.27.2)\n",
+            "Requirement already satisfied: orjson<4.0.0,>=3.9.14 in /usr/local/lib/python3.10/dist-packages (from langsmith<0.2.0,>=0.1.125->langchain-core<0.4,>=0.3.0->langchain_google_genai) (3.10.9)\n",
+            "Requirement already satisfied: requests-toolbelt<2.0.0,>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from langsmith<0.2.0,>=0.1.125->langchain-core<0.4,>=0.3.0->langchain_google_genai) (1.0.0)\n",
+            "Requirement already satisfied: httplib2<1.dev0,>=0.19.0 in /usr/local/lib/python3.10/dist-packages (from google-api-python-client->google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (0.22.0)\n",
+            "Requirement already satisfied: google-auth-httplib2<1.0.0,>=0.2.0 in /usr/local/lib/python3.10/dist-packages (from google-api-python-client->google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (0.2.0)\n",
+            "Requirement already satisfied: uritemplate<5,>=3.0.1 in /usr/local/lib/python3.10/dist-packages (from google-api-python-client->google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (4.1.1)\n",
+            "Requirement already satisfied: grpcio<2.0dev,>=1.33.2 in /usr/local/lib/python3.10/dist-packages (from google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.1->google-ai-generativelanguage==0.6.10->google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (1.64.1)\n",
+            "Requirement already satisfied: grpcio-status<2.0.dev0,>=1.33.2 in /usr/local/lib/python3.10/dist-packages (from google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.1->google-ai-generativelanguage==0.6.10->google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (1.48.2)\n",
+            "Requirement already satisfied: pyparsing!=3.0.0,!=3.0.1,!=3.0.2,!=3.0.3,<4,>=2.4.2 in /usr/local/lib/python3.10/dist-packages (from httplib2<1.dev0,>=0.19.0->google-api-python-client->google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (3.2.0)\n",
+            "Requirement already satisfied: anyio in /usr/local/lib/python3.10/dist-packages (from httpx<1,>=0.23.0->langsmith<0.2.0,>=0.1.125->langchain-core<0.4,>=0.3.0->langchain_google_genai) (3.7.1)\n",
+            "Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx<1,>=0.23.0->langsmith<0.2.0,>=0.1.125->langchain-core<0.4,>=0.3.0->langchain_google_genai) (2024.8.30)\n",
+            "Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.10/dist-packages (from httpx<1,>=0.23.0->langsmith<0.2.0,>=0.1.125->langchain-core<0.4,>=0.3.0->langchain_google_genai) (1.0.6)\n",
+            "Requirement already satisfied: idna in /usr/local/lib/python3.10/dist-packages (from httpx<1,>=0.23.0->langsmith<0.2.0,>=0.1.125->langchain-core<0.4,>=0.3.0->langchain_google_genai) (3.10)\n",
+            "Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx<1,>=0.23.0->langsmith<0.2.0,>=0.1.125->langchain-core<0.4,>=0.3.0->langchain_google_genai) (1.3.1)\n",
+            "Requirement already satisfied: h11<0.15,>=0.13 in /usr/local/lib/python3.10/dist-packages (from httpcore==1.*->httpx<1,>=0.23.0->langsmith<0.2.0,>=0.1.125->langchain-core<0.4,>=0.3.0->langchain_google_genai) (0.14.0)\n",
+            "Requirement already satisfied: pyasn1<0.7.0,>=0.4.6 in /usr/local/lib/python3.10/dist-packages (from pyasn1-modules>=0.2.1->google-auth>=2.15.0->google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (0.6.1)\n",
+            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests<3.0.0.dev0,>=2.18.0->google-api-core->google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (3.4.0)\n",
+            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests<3.0.0.dev0,>=2.18.0->google-api-core->google-generativeai<0.9.0,>=0.8.0->langchain_google_genai) (2.2.3)\n",
+            "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio->httpx<1,>=0.23.0->langsmith<0.2.0,>=0.1.125->langchain-core<0.4,>=0.3.0->langchain_google_genai) (1.2.2)\n",
+            "Downloading langchain_google_genai-2.0.1-py3-none-any.whl (40 kB)\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m40.4/40.4 kB\u001b[0m \u001b[31m1.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[?25hInstalling collected packages: langchain_google_genai\n",
+            "Successfully installed langchain_google_genai-2.0.1\n"
+          ]
+        }
+      ]
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "from langchain_google_genai import ChatGoogleGenerativeAI\n",
+        "from educhain import Educhain, LLMConfig\n",
+        "\n",
+        "gemini_flash = ChatGoogleGenerativeAI(\n",
+        "    model=\"gemini-1.5-flash-exp-0827\",\n",
+        "    google_api_key=userdata.get(\"GOOGLE_API_KEY\"))\n",
+        "\n",
+        "flash_config = LLMConfig(custom_model=gemini_flash)\n",
+        "client = Educhain(flash_config) #using gemini model with educhain\n",
+        "\n",
+        "plan = client.content_engine.generate_lesson_plan(\n",
+        "    topic = \"Newton's Law of Motion\"\n",
+        ")\n",
+        "\n",
+        "plan.show()"
+      ],
+      "metadata": {
+        "colab": {
+          "base_uri": "https://localhost:8080/"
+        },
+        "id": "0o1gTnHLWWmC",
+        "outputId": "515a81ba-c22d-4185-b218-6589f72ec9c9"
+      },
+      "execution_count": 22,
+      "outputs": [
+        {
+          "output_type": "stream",
+          "name": "stdout",
+          "text": [
+            "Raw output from LLM:\n",
+            "```json\n",
+            "{\n",
+            "  \"title\": \"Newton's Laws of Motion: Understanding the Forces Around Us\",\n",
+            "  \"subject\": \"Physics/Science\",\n",
+            "  \"learning_objectives\": [\n",
+            "    \"Students will be able to define Newton's three laws of motion and provide examples of each.\",\n",
+            "    \"Students will be able to apply Newton's laws to solve basic problems involving force, mass, and acceleration.\",\n",
+            "    \"Students will be able to analyze real-world scenarios and identify the forces at play using Newton's laws.\",\n",
+            "    \"Students will be able to evaluate the impact of Newton's laws on various technological advancements.\" \n",
+            "  ],\n",
+            "  \"lesson_introduction\": \"Have you ever wondered why a ball thrown upwards eventually falls back down? Or how a rocket propels itself into space? These phenomena are all explained by a set of fundamental principles known as Newton's Laws of Motion. These laws govern the motion of everything around us, from the smallest particles to the largest celestial bodies.  In this lesson, we will explore these laws and discover how they shape our understanding of the universe.\",\n",
+            "  \"main_topics\": [\n",
+            "    {\n",
+            "      \"title\": \"Newton's First Law of Motion: Inertia\",\n",
+            "      \"subtopics\": [\n",
+            "        {\n",
+            "          \"title\": \"Understanding Inertia\",\n",
+            "          \"key_concepts\": [\n",
+            "            {\n",
+            "              \"type\": \"definition\",\n",
+            "              \"content\": \"Inertia is the tendency of an object to resist changes in its state of motion. An object at rest will stay at rest, and an object in motion will stay in motion with the same speed and direction unless acted upon by an unbalanced force.\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"type\": \"example\",\n",
+            "              \"content\": \"A book resting on a table will remain there until someone pushes or pulls it. A car moving at a constant speed will continue moving at that speed until the brakes are applied.\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"type\": \"illustration\",\n",
+            "              \"content\": \"Show a visual of a book on a table and a car moving at constant speed, then show the external forces acting on them (push, brake).\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"discussion_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"Why do you feel a force pushing you back when a car accelerates?\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"question\": \"How does the mass of an object affect its inertia?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"hands_on_activities\": [\n",
+            "            {\n",
+            "              \"title\": \"Inertia Challenge\",\n",
+            "              \"description\": \"Students will participate in a series of activities demonstrating inertia, like pulling a tablecloth from under a set of dishes or trying to quickly stop a moving toy car.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"reflective_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"How does the concept of inertia explain why seatbelts are important in cars?\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"question\": \"Can you think of other examples of inertia in everyday life?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"assessment_ideas\": [\n",
+            "            {\n",
+            "              \"type\": \"quiz\",\n",
+            "              \"description\": \"A short quiz on definitions and examples related to inertia.\"\n",
+            "            }\n",
+            "          ]\n",
+            "        },\n",
+            "        {\n",
+            "          \"title\": \"Balanced and Unbalanced Forces\",\n",
+            "          \"key_concepts\": [\n",
+            "            {\n",
+            "              \"type\": \"definition\",\n",
+            "              \"content\": \"Balanced forces are forces that cancel each other out, resulting in no change in motion. Unbalanced forces cause a change in an object's motion (either starting, stopping, or changing direction/speed).\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"type\": \"example\",\n",
+            "              \"content\": \"Two people pushing a box with equal force in opposite directions (balanced). One person pushing a box (unbalanced).\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"type\": \"multimedia\",\n",
+            "              \"content\": \"Use a simulation or video to demonstrate the effects of balanced and unbalanced forces on an object's motion.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"discussion_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"What happens to an object when the forces acting on it are balanced?\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"question\": \"How can you tell if a force is balanced or unbalanced?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"hands_on_activities\": [\n",
+            "            {\n",
+            "              \"title\": \"Force and Motion Simulation\",\n",
+            "              \"description\": \"Students will use a physics simulation software to explore how different forces affect the motion of an object, observing the effects of balanced and unbalanced forces.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"reflective_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"How does the concept of balanced and unbalanced forces relate to Newton's First Law?\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"question\": \"Can you think of a real-world example where understanding balanced and unbalanced forces is crucial?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"assessment_ideas\": [\n",
+            "            {\n",
+            "              \"type\": \"written task\",\n",
+            "              \"description\": \"Students will describe a scenario with balanced and unbalanced forces and explain the resulting motion.\"\n",
+            "            }\n",
+            "          ]\n",
+            "        }\n",
+            "      ]\n",
+            "    },\n",
+            "    {\n",
+            "      \"title\": \"Newton's Second Law of Motion: Force, Mass, and Acceleration\",\n",
+            "      \"subtopics\": [\n",
+            "        {\n",
+            "          \"title\": \"The Relationship Between Force, Mass, and Acceleration\",\n",
+            "          \"key_concepts\": [\n",
+            "            {\n",
+            "              \"type\": \"definition\",\n",
+            "              \"content\": \"Newton's Second Law states that the acceleration of an object is directly proportional to the net force acting on it and inversely proportional to its mass.  (F = ma)\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"type\": \"example\",\n",
+            "              \"content\": \"Pushing a heavier object requires more force to achieve the same acceleration as a lighter object.\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"type\": \"illustration\",\n",
+            "              \"content\": \"Visualize a graph showing the relationship between force, mass, and acceleration.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"discussion_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"How does the mass of an object affect its acceleration when a constant force is applied?\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"question\": \"If you double the force acting on an object, what happens to its acceleration?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"hands_on_activities\": [\n",
+            "            {\n",
+            "              \"title\": \"Force and Acceleration Experiment\",\n",
+            "              \"description\": \"Students will design and conduct an experiment to investigate how changing the force or mass of an object affects its acceleration using toy cars, ramps, and weights.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"reflective_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"How can you use Newton's Second Law to explain the motion of a rocket?\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"question\": \"How does this law apply to sports, such as hitting a baseball or kicking a soccer ball?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"assessment_ideas\": [\n",
+            "            {\n",
+            "              \"type\": \"project\",\n",
+            "              \"description\": \"Students will design a roller coaster and calculate the forces and accelerations involved at different points.\"\n",
+            "            }\n",
+            "          ]\n",
+            "        },\n",
+            "        {\n",
+            "          \"title\": \"Calculating Force, Mass, and Acceleration\",\n",
+            "          \"key_concepts\": [\n",
+            "            {\n",
+            "              \"type\": \"example\",\n",
+            "              \"content\": \"A 10 kg object is pushed with a force of 50 N. Calculate the acceleration of the object. (F=ma, so a = F/m = 50N/10kg = 5 m/s²).\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"type\": \"content\",\n",
+            "              \"content\": \"Explain how to solve problems using the formula F=ma, emphasizing the importance of units.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"discussion_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"How do the units of force, mass, and acceleration relate to each other?\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"question\": \"What are some common mistakes students make when applying the formula F=ma?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"hands_on_activities\": [\n",
+            "            {\n",
+            "              \"title\": \"Force Problem-Solving Workshop\",\n",
+            "              \"description\": \"Students will work in groups to solve a variety of word problems related to Newton's Second Law, using the formula F=ma.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"reflective_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"How confident are you in your ability to apply the formula F=ma to solve problems?\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"question\": \"What are some challenges you faced when solving force problems?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"assessment_ideas\": [\n",
+            "            {\n",
+            "              \"type\": \"quiz\",\n",
+            "              \"description\": \"A quiz with multiple-choice and short-answer questions focusing on applying the formula F=ma.\"\n",
+            "            }\n",
+            "          ]\n",
+            "        }\n",
+            "      ]\n",
+            "    },\n",
+            "    {\n",
+            "      \"title\": \"Newton's Third Law of Motion: Action and Reaction\",\n",
+            "      \"subtopics\": [\n",
+            "        {\n",
+            "          \"title\": \"Understanding Action and Reaction Pairs\",\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. When one object exerts a force on another object, the second object exerts an equal and opposite force back on the first.\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"type\": \"example\",\n",
+            "              \"content\": \"When you jump, you push down on the ground (action), and the ground pushes you up (reaction).\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"type\": \"illustration\",\n",
+            "              \"content\": \"Show a visual of a person jumping, illustrating the action-reaction forces.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"discussion_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"Why do you feel a force pushing back on you when you push against a wall?\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"question\": \"How does the action-reaction force pair explain how a rocket launches?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"hands_on_activities\": [\n",
+            "            {\n",
+            "              \"title\": \"Balloon Rocket Challenge\",\n",
+            "              \"description\": \"Students will design and build balloon-powered rockets to demonstrate action-reaction forces. They will analyze how the force of the air escaping the balloon propels the rocket forward.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"reflective_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"How does Newton's Third Law explain how a swimmer propels themselves through the water?\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"question\": \"Can you think of other examples where action-reaction forces are at play?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"assessment_ideas\": [\n",
+            "            {\n",
+            "              \"type\": \"written task\",\n",
+            "              \"description\": \"Students will create a comic strip or storyboard illustrating several examples of action-reaction force pairs.\"\n",
+            "            }\n",
+            "          ]\n",
+            "        },\n",
+            "        {\n",
+            "          \"title\": \"Applications of Action-Reaction in Technology\",\n",
+            "          \"key_concepts\": [\n",
+            "            {\n",
+            "              \"type\": \"content\",\n",
+            "              \"content\": \"Discuss how Newton's Third Law is applied in various technologies like jet engines, rockets, and even walking.\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"type\": \"multimedia\",\n",
+            "              \"content\": \"Show videos or animations of different technologies that utilize action-reaction forces.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"discussion_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"How does a jet engine use Newton's Third Law to generate thrust?\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"question\": \"Can you think of other technologies that rely on action-reaction forces?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"hands_on_activities\": [\n",
+            "            {\n",
+            "              \"title\": \"Technology Design Challenge\",\n",
+            "              \"description\": \"Students will work in teams to design a new technology that utilizes Newton's Third Law to solve a specific problem. They will present their designs and explain how the action-reaction forces are involved.\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"reflective_questions\": [\n",
+            "            {\n",
+            "              \"question\": \"How has the understanding of action-reaction forces impacted technological advancements?\"\n",
+            "            },\n",
+            "            {\n",
+            "              \"question\": \"What are some potential future applications of Newton's Third Law?\"\n",
+            "            }\n",
+            "          ],\n",
+            "          \"assessment_ideas\": [\n",
+            "            {\n",
+            "              \"type\": \"project\",\n",
+            "              \"description\": \"Students will create a presentation or model demonstrating a real-world application of Newton's Third Law, explaining the action-reaction forces involved.\"\n",
+            "            }\n",
+            "          ]\n",
+            "        }\n",
+            "      ]\n",
+            "    }\n",
+            "  ],\n",
+            "  \"learning_adaptations\": \"For younger students (elementary/middle school), the focus can be on understanding the basic concepts of inertia, force, and motion through simple demonstrations and activities. The mathematical aspects of Newton's Second Law can be introduced gradually as students develop a stronger foundation in math and science. For older students (high school), the lesson can delve deeper into the mathematical applications of Newton's laws, including solving complex problems and exploring more advanced topics like momentum and impulse.\",\n",
+            "  \"real_world_applications\": \"Understanding Newton's Laws of Motion is crucial in a variety of fields, including engineering, aerospace, sports, and transportation. Careers that rely on these principles include aerospace engineers, mechanical engineers, physicists, sports scientists, and automotive engineers. Further learning paths could involve studying advanced physics, engineering, or related fields.\",\n",
+            "  \"ethical_considerations\": \"The application of Newton's Laws can have both positive and negative impacts on society. For example, advancements in transportation and technology have improved our lives, but they have also contributed to environmental challenges. It's important for students to consider the ethical implications of applying scientific principles and to strive for responsible innovation.\"\n",
+            "}\n",
+            "```\n",
+            "================================================================================\n",
+            "Lesson Plan: Newton's Laws of Motion: Understanding the Forces Around Us\n",
+            "Subject: Physics/Science\n",
+            "Learning Objectives: Students will be able to define Newton's three laws of motion and provide examples of each., Students will be able to apply Newton's laws to solve basic problems involving force, mass, and acceleration., Students will be able to analyze real-world scenarios and identify the forces at play using Newton's laws., Students will be able to evaluate the impact of Newton's laws on various technological advancements.\n",
+            "Lesson Introduction: Have you ever wondered why a ball thrown upwards eventually falls back down? Or how a rocket propels itself into space? These phenomena are all explained by a set of fundamental principles known as Newton's Laws of Motion. These laws govern the motion of everything around us, from the smallest particles to the largest celestial bodies.  In this lesson, we will explore these laws and discover how they shape our understanding of the universe.\n",
+            "================================================================================\n",
+            "\n",
+            "Main Topic 1: Newton's First Law of Motion: Inertia\n",
+            "\n",
+            "   Subtopic 1.1: Understanding Inertia\n",
+            "   Key Concepts:\n",
+            "      - Definition: Inertia is the tendency of an object to resist changes in its state of motion. An object at rest will stay at rest, and an object in motion will stay in motion with the same speed and direction unless acted upon by an unbalanced force.\n",
+            "      - Example: A book resting on a table will remain there until someone pushes or pulls it. A car moving at a constant speed will continue moving at that speed until the brakes are applied.\n",
+            "      - Illustration: Show a visual of a book on a table and a car moving at constant speed, then show the external forces acting on them (push, brake).\n",
+            "   Discussion Questions:\n",
+            "      - Why do you feel a force pushing you back when a car accelerates?\n",
+            "      - How does the mass of an object affect its inertia?\n",
+            "   Hands-On Activities:\n",
+            "      - Inertia Challenge: Students will participate in a series of activities demonstrating inertia, like pulling a tablecloth from under a set of dishes or trying to quickly stop a moving toy car.\n",
+            "   Reflective Questions:\n",
+            "      - How does the concept of inertia explain why seatbelts are important in cars?\n",
+            "      - Can you think of other examples of inertia in everyday life?\n",
+            "   Assessment Ideas:\n",
+            "      - Quiz: A short quiz on definitions and examples related to inertia.\n",
+            "\n",
+            "   Subtopic 1.2: Balanced and Unbalanced Forces\n",
+            "   Key Concepts:\n",
+            "      - Definition: Balanced forces are forces that cancel each other out, resulting in no change in motion. Unbalanced forces cause a change in an object's motion (either starting, stopping, or changing direction/speed).\n",
+            "      - Example: Two people pushing a box with equal force in opposite directions (balanced). One person pushing a box (unbalanced).\n",
+            "      - Multimedia: Use a simulation or video to demonstrate the effects of balanced and unbalanced forces on an object's motion.\n",
+            "   Discussion Questions:\n",
+            "      - What happens to an object when the forces acting on it are balanced?\n",
+            "      - How can you tell if a force is balanced or unbalanced?\n",
+            "   Hands-On Activities:\n",
+            "      - Force and Motion Simulation: Students will use a physics simulation software to explore how different forces affect the motion of an object, observing the effects of balanced and unbalanced forces.\n",
+            "   Reflective Questions:\n",
+            "      - How does the concept of balanced and unbalanced forces relate to Newton's First Law?\n",
+            "      - Can you think of a real-world example where understanding balanced and unbalanced forces is crucial?\n",
+            "   Assessment Ideas:\n",
+            "      - Written task: Students will describe a scenario with balanced and unbalanced forces and explain the resulting motion.\n",
+            "\n",
+            "Main Topic 2: Newton's Second Law of Motion: Force, Mass, and Acceleration\n",
+            "\n",
+            "   Subtopic 2.1: The Relationship Between Force, Mass, and Acceleration\n",
+            "   Key Concepts:\n",
+            "      - Definition: Newton's Second Law states that the acceleration of an object is directly proportional to the net force acting on it and inversely proportional to its mass.  (F = ma)\n",
+            "      - Example: Pushing a heavier object requires more force to achieve the same acceleration as a lighter object.\n",
+            "      - Illustration: Visualize a graph showing the relationship between force, mass, and acceleration.\n",
+            "   Discussion Questions:\n",
+            "      - How does the mass of an object affect its acceleration when a constant force is applied?\n",
+            "      - If you double the force acting on an object, what happens to its acceleration?\n",
+            "   Hands-On Activities:\n",
+            "      - Force and Acceleration Experiment: Students will design and conduct an experiment to investigate how changing the force or mass of an object affects its acceleration using toy cars, ramps, and weights.\n",
+            "   Reflective Questions:\n",
+            "      - How can you use Newton's Second Law to explain the motion of a rocket?\n",
+            "      - How does this law apply to sports, such as hitting a baseball or kicking a soccer ball?\n",
+            "   Assessment Ideas:\n",
+            "      - Project: Students will design a roller coaster and calculate the forces and accelerations involved at different points.\n",
+            "\n",
+            "   Subtopic 2.2: Calculating Force, Mass, and Acceleration\n",
+            "   Key Concepts:\n",
+            "      - Example: A 10 kg object is pushed with a force of 50 N. Calculate the acceleration of the object. (F=ma, so a = F/m = 50N/10kg = 5 m/s²).\n",
+            "      - Content: Explain how to solve problems using the formula F=ma, emphasizing the importance of units.\n",
+            "   Discussion Questions:\n",
+            "      - How do the units of force, mass, and acceleration relate to each other?\n",
+            "      - What are some common mistakes students make when applying the formula F=ma?\n",
+            "   Hands-On Activities:\n",
+            "      - Force Problem-Solving Workshop: Students will work in groups to solve a variety of word problems related to Newton's Second Law, using the formula F=ma.\n",
+            "   Reflective Questions:\n",
+            "      - How confident are you in your ability to apply the formula F=ma to solve problems?\n",
+            "      - What are some challenges you faced when solving force problems?\n",
+            "   Assessment Ideas:\n",
+            "      - Quiz: A quiz with multiple-choice and short-answer questions focusing on applying the formula F=ma.\n",
+            "\n",
+            "Main Topic 3: Newton's Third Law of Motion: Action and Reaction\n",
+            "\n",
+            "   Subtopic 3.1: Understanding Action and Reaction Pairs\n",
+            "   Key Concepts:\n",
+            "      - Definition: Newton's Third Law states that for every action, there is an equal and opposite reaction. When one object exerts a force on another object, the second object exerts an equal and opposite force back on the first.\n",
+            "      - Example: When you jump, you push down on the ground (action), and the ground pushes you up (reaction).\n",
+            "      - Illustration: Show a visual of a person jumping, illustrating the action-reaction forces.\n",
+            "   Discussion Questions:\n",
+            "      - Why do you feel a force pushing back on you when you push against a wall?\n",
+            "      - How does the action-reaction force pair explain how a rocket launches?\n",
+            "   Hands-On Activities:\n",
+            "      - Balloon Rocket Challenge: Students will design and build balloon-powered rockets to demonstrate action-reaction forces. They will analyze how the force of the air escaping the balloon propels the rocket forward.\n",
+            "   Reflective Questions:\n",
+            "      - How does Newton's Third Law explain how a swimmer propels themselves through the water?\n",
+            "      - Can you think of other examples where action-reaction forces are at play?\n",
+            "   Assessment Ideas:\n",
+            "      - Written task: Students will create a comic strip or storyboard illustrating several examples of action-reaction force pairs.\n",
+            "\n",
+            "   Subtopic 3.2: Applications of Action-Reaction in Technology\n",
+            "   Key Concepts:\n",
+            "      - Content: Discuss how Newton's Third Law is applied in various technologies like jet engines, rockets, and even walking.\n",
+            "      - Multimedia: Show videos or animations of different technologies that utilize action-reaction forces.\n",
+            "   Discussion Questions:\n",
+            "      - How does a jet engine use Newton's Third Law to generate thrust?\n",
+            "      - Can you think of other technologies that rely on action-reaction forces?\n",
+            "   Hands-On Activities:\n",
+            "      - Technology Design Challenge: Students will work in teams to design a new technology that utilizes Newton's Third Law to solve a specific problem. They will present their designs and explain how the action-reaction forces are involved.\n",
+            "   Reflective Questions:\n",
+            "      - How has the understanding of action-reaction forces impacted technological advancements?\n",
+            "      - What are some potential future applications of Newton's Third Law?\n",
+            "   Assessment Ideas:\n",
+            "      - Project: Students will create a presentation or model demonstrating a real-world application of Newton's Third Law, explaining the action-reaction forces involved.\n",
+            "\n",
+            "Learning Adaptations:  For younger students (elementary/middle school), the focus can be on understanding the basic concepts of inertia, force, and motion through simple demonstrations and activities. The mathematical aspects of Newton's Second Law can be introduced gradually as students develop a stronger foundation in math and science. For older students (high school), the lesson can delve deeper into the mathematical applications of Newton's laws, including solving complex problems and exploring more advanced topics like momentum and impulse.\n",
+            "Real-World Applications:  Understanding Newton's Laws of Motion is crucial in a variety of fields, including engineering, aerospace, sports, and transportation. Careers that rely on these principles include aerospace engineers, mechanical engineers, physicists, sports scientists, and automotive engineers. Further learning paths could involve studying advanced physics, engineering, or related fields.\n",
+            "Ethical Considerations:  The application of Newton's Laws can have both positive and negative impacts on society. For example, advancements in transportation and technology have improved our lives, but they have also contributed to environmental challenges. It's important for students to consider the ethical implications of applying scientific principles and to strive for responsible innovation.\n"
+          ]
+        }
+      ]
+    },
+    {
+      "cell_type": "code",
+      "source": [],
+      "metadata": {
+        "id": "n-f6QcQkX8JV"
+      },
+      "execution_count": null,
+      "outputs": []
+    }
+  ]
+}
\ No newline at end of file
diff --git a/cookbook/educhain_generate_mcqs_from_data.ipynb b/cookbook/educhain_generate_mcqs_from_data.ipynb
index c0f290e..4f3b345 100644
--- a/cookbook/educhain_generate_mcqs_from_data.ipynb
+++ b/cookbook/educhain_generate_mcqs_from_data.ipynb
@@ -1,30 +1,19 @@
 {
-  "nbformat": 4,
-  "nbformat_minor": 0,
-  "metadata": {
-    "colab": {
-      "provenance": []
-    },
-    "kernelspec": {
-      "name": "python3",
-      "display_name": "Python 3"
-    },
-    "language_info": {
-      "name": "python"
-    }
-  },
   "cells": [
     {
       "cell_type": "markdown",
-      "source": [
-        "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1D_1eC7cZ9LrWx9TifsxYk7tnzW_K7UgO?usp=sharing)"
-      ],
       "metadata": {
         "id": "KzHK2RLHcw_E"
-      }
+      },
+      "source": [
+        "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1D_1eC7cZ9LrWx9TifsxYk7tnzW_K7UgO?usp=sharing)"
+      ]
     },
     {
       "cell_type": "markdown",
+      "metadata": {
+        "id": "Eh0egNoRdb6F"
+      },
       "source": [
         "## Generate MCQs from Data using [Educhain](https://github.com/satvik314/educhain)\n",
         "\n",
@@ -39,17 +28,11 @@
         "\n",
         "Perfect for educators, content creators, and e-learning developers looking to automate and enhance their question creation process. Dive in to revolutionize your approach to educational content generation!\n",
         "\n"
-      ],
-      "metadata": {
-        "id": "Eh0egNoRdb6F"
-      }
+      ]
     },
     {
       "cell_type": "code",
-      "source": [
-        "# First, install the Educhain package\n",
-        "!pip install -qU educhain"
-      ],
+      "execution_count": 1,
       "metadata": {
         "colab": {
           "base_uri": "https://localhost:8080/"
@@ -57,11 +40,10 @@
         "id": "iVsx0ZrTcw08",
         "outputId": "68741050-c02d-4d8d-8156-ce24a4086f57"
       },
-      "execution_count": 1,
       "outputs": [
         {
-          "output_type": "stream",
           "name": "stdout",
+          "output_type": "stream",
           "text": [
             "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m987.6/987.6 kB\u001b[0m \u001b[31m8.3 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[31m14.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
@@ -80,6 +62,10 @@
             "\u001b[?25h"
           ]
         }
+      ],
+      "source": [
+        "# First, install the Educhain package\n",
+        "!pip install -qU educhain"
       ]
     },
     {
@@ -99,28 +85,16 @@
     },
     {
       "cell_type": "markdown",
-      "source": [
-        "### Generating MCQs from a URL"
-      ],
       "metadata": {
         "id": "yp_m4RPcfBz8"
-      }
+      },
+      "source": [
+        "### Generating MCQs from a URL"
+      ]
     },
     {
       "cell_type": "code",
-      "source": [
-        "from educhain import qna_engine\n",
-        "\n",
-        "url_mcqs = qna_engine.generate_mcqs_from_data(\n",
-        "        source=\"https://www.buildfastwithai.com/genai-course\",\n",
-        "        source_type=\"url\",\n",
-        "        num=5,\n",
-        "        learning_objective=\"schedule of the course\",\n",
-        "        difficulty_level=\"Easy\"\n",
-        "    )\n",
-        "\n",
-        "url_mcqs.show()"
-      ],
+      "execution_count": 4,
       "metadata": {
         "colab": {
           "base_uri": "https://localhost:8080/"
@@ -128,11 +102,10 @@
         "id": "kib91XW-dlja",
         "outputId": "5689e535-498a-45be-b0b9-0d18feb25a03"
       },
-      "execution_count": 4,
       "outputs": [
         {
-          "output_type": "stream",
           "name": "stdout",
+          "output_type": "stream",
           "text": [
             "Question 1:\n",
             "Question: When does the 5th Cohort of the Crash Course on Generative AI start?\n",
@@ -191,22 +164,24 @@
             "\n"
           ]
         }
-      ]
-    },
-    {
-      "cell_type": "code",
+      ],
       "source": [
         "from educhain import qna_engine\n",
         "\n",
-        "mcqs_from_url = qna_engine.generate_mcqs_from_data(\n",
-        "        source=\"https://en.wikipedia.org/wiki/Butterfly_effect\",\n",
+        "url_mcqs = qna_engine.generate_mcqs_from_data(\n",
+        "        source=\"https://www.buildfastwithai.com/genai-course\",\n",
         "        source_type=\"url\",\n",
-        "        num=3,\n",
-        "        learning_objective=\"Impact of the Butterfly Effect\",\n",
+        "        num=5,\n",
+        "        learning_objective=\"schedule of the course\",\n",
+        "        difficulty_level=\"Easy\"\n",
         "    )\n",
         "\n",
-        "mcqs_from_url.show()"
-      ],
+        "url_mcqs.show()"
+      ]
+    },
+    {
+      "cell_type": "code",
+      "execution_count": 27,
       "metadata": {
         "colab": {
           "base_uri": "https://localhost:8080/"
@@ -214,11 +189,10 @@
         "id": "lmfAoZ2vjx25",
         "outputId": "e1feed0b-b94d-4fe6-cd64-ce7e7e326abf"
       },
-      "execution_count": 27,
       "outputs": [
         {
-          "output_type": "stream",
           "name": "stdout",
+          "output_type": "stream",
           "text": [
             "Question 1:\n",
             "Question: Who is closely associated with the concept of the butterfly effect?\n",
@@ -255,37 +229,32 @@
             "\n"
           ]
         }
+      ],
+      "source": [
+        "from educhain import qna_engine\n",
+        "\n",
+        "mcqs_from_url = qna_engine.generate_mcqs_from_data(\n",
+        "        source=\"https://en.wikipedia.org/wiki/Butterfly_effect\",\n",
+        "        source_type=\"url\",\n",
+        "        num=3,\n",
+        "        learning_objective=\"Impact of the Butterfly Effect\",\n",
+        "    )\n",
+        "\n",
+        "mcqs_from_url.show()"
       ]
     },
     {
       "cell_type": "markdown",
-      "source": [
-        "### Generate MCQs from Text"
-      ],
       "metadata": {
         "id": "KD6DXFfQfDsl"
-      }
+      },
+      "source": [
+        "### Generate MCQs from Text"
+      ]
     },
     {
       "cell_type": "code",
-      "source": [
-        "text_content = \"\"\"\n",
-        "    The Big Mac Index, introduced by The Economist in 1986, is a lighthearted way to measure purchasing power parity (PPP) between different currencies.\n",
-        "    It compares the price of a McDonald's Big Mac burger across various countries, using the idea that a widely available, uniform product should cost the same in different nations when adjusted for exchange rates.\n",
-        "    This index suggests that, in the long run, exchange rates should adjust so that a basket of goods (represented by the Big Mac) costs the same in different countries.\n",
-        "    While not a precise economic tool, the Big Mac Index has gained popularity for its simplicity in explaining complex economic concepts.\n",
-        "    It's often used as a starting point for discussions about currency valuation and economic disparities between nations.\n",
-        "    The index has even inspired similar comparisons using other products, like the \"iPad index\" or the \"Starbucks latte index\".\n",
-        "    \"\"\"\n",
-        "\n",
-        "text_mcqs = qna_engine.generate_mcqs_from_data(\n",
-        "        source=text_content,\n",
-        "        source_type=\"text\",\n",
-        "        num=3,\n",
-        "    )\n",
-        "\n",
-        "text_mcqs.show()"
-      ],
+      "execution_count": 5,
       "metadata": {
         "colab": {
           "base_uri": "https://localhost:8080/"
@@ -293,11 +262,10 @@
         "id": "LFADd9hQdv7r",
         "outputId": "adb2943d-60a9-4b63-ea81-bba6461174e4"
       },
-      "execution_count": 5,
       "outputs": [
         {
-          "output_type": "stream",
           "name": "stdout",
+          "output_type": "stream",
           "text": [
             "Question 1:\n",
             "Question: What is the main purpose of the Big Mac Index?\n",
@@ -334,37 +302,47 @@
             "\n"
           ]
         }
+      ],
+      "source": [
+        "text_content = \"\"\"\n",
+        "    The Big Mac Index, introduced by The Economist in 1986, is a lighthearted way to measure purchasing power parity (PPP) between different currencies.\n",
+        "    It compares the price of a McDonald's Big Mac burger across various countries, using the idea that a widely available, uniform product should cost the same in different nations when adjusted for exchange rates.\n",
+        "    This index suggests that, in the long run, exchange rates should adjust so that a basket of goods (represented by the Big Mac) costs the same in different countries.\n",
+        "    While not a precise economic tool, the Big Mac Index has gained popularity for its simplicity in explaining complex economic concepts.\n",
+        "    It's often used as a starting point for discussions about currency valuation and economic disparities between nations.\n",
+        "    The index has even inspired similar comparisons using other products, like the \"iPad index\" or the \"Starbucks latte index\".\n",
+        "    \"\"\"\n",
+        "\n",
+        "text_mcqs = qna_engine.generate_mcqs_from_data(\n",
+        "        source=text_content,\n",
+        "        source_type=\"text\",\n",
+        "        num=3,\n",
+        "    )\n",
+        "\n",
+        "text_mcqs.show()"
       ]
     },
     {
       "cell_type": "code",
-      "source": [],
+      "execution_count": null,
       "metadata": {
         "id": "bhTPAyfQsmqp"
       },
-      "execution_count": null,
-      "outputs": []
+      "outputs": [],
+      "source": []
     },
     {
       "cell_type": "markdown",
-      "source": [
-        "### Generate MCQs from PDF"
-      ],
       "metadata": {
         "id": "SVfBmvyUfJSK"
-      }
+      },
+      "source": [
+        "### Generate MCQs from PDF"
+      ]
     },
     {
       "cell_type": "code",
-      "source": [
-        "pdf_mcqs = qna_engine.generate_mcqs_from_data(\n",
-        "        source=\"/content/CrashCourse_Info_Cohort5.pdf\",\n",
-        "        source_type=\"pdf\",\n",
-        "        num=5\n",
-        "    )\n",
-        "\n",
-        "pdf_mcqs.show()"
-      ],
+      "execution_count": 6,
       "metadata": {
         "colab": {
           "base_uri": "https://localhost:8080/"
@@ -372,11 +350,10 @@
         "id": "j3NEVgP9erEj",
         "outputId": "45e4e534-e0da-4994-f269-eafef2ff4662"
       },
-      "execution_count": 6,
       "outputs": [
         {
-          "output_type": "stream",
           "name": "stdout",
+          "output_type": "stream",
           "text": [
             "Question 1:\n",
             "Question: Who is the lead mentor for the course?\n",
@@ -435,22 +412,29 @@
             "\n"
           ]
         }
+      ],
+      "source": [
+        "pdf_mcqs = qna_engine.generate_mcqs_from_data(\n",
+        "        source=\"/content/CrashCourse_Info_Cohort5.pdf\",\n",
+        "        source_type=\"pdf\",\n",
+        "        num=5\n",
+        "    )\n",
+        "\n",
+        "pdf_mcqs.show()"
       ]
     },
     {
       "cell_type": "markdown",
-      "source": [
-        "### Using different models"
-      ],
       "metadata": {
         "id": "X02r9d95gKDu"
-      }
+      },
+      "source": [
+        "### Using different models"
+      ]
     },
     {
       "cell_type": "code",
-      "source": [
-        "!pip install -qU langchain-google-genai"
-      ],
+      "execution_count": 7,
       "metadata": {
         "colab": {
           "base_uri": "https://localhost:8080/"
@@ -458,21 +442,28 @@
         "id": "2g08bo-hgJsx",
         "outputId": "309bb808-8a0e-4b3c-c282-8d5896a9845d"
       },
-      "execution_count": 7,
       "outputs": [
         {
-          "output_type": "stream",
           "name": "stdout",
+          "output_type": "stream",
           "text": [
             "\u001b[?25l     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/164.2 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m164.2/164.2 kB\u001b[0m \u001b[31m5.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
             "\u001b[?25h\u001b[?25l     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/718.3 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m718.3/718.3 kB\u001b[0m \u001b[31m20.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
             "\u001b[?25h"
           ]
         }
+      ],
+      "source": [
+        "!pip install -qU langchain-google-genai"
       ]
     },
     {
       "cell_type": "code",
+      "execution_count": 17,
+      "metadata": {
+        "id": "yMNmP676gGed"
+      },
+      "outputs": [],
       "source": [
         "from langchain_google_genai import ChatGoogleGenerativeAI\n",
         "from google.colab import userdata\n",
@@ -485,28 +476,11 @@
         "gemini_pro = ChatGoogleGenerativeAI(model = \"gemini-1.5-pro-latest\",\n",
         "                                      google_api_key=userdata.get('GOOGLE_API_KEY')\n",
         "                                      )"
-      ],
-      "metadata": {
-        "id": "yMNmP676gGed"
-      },
-      "execution_count": 17,
-      "outputs": []
+      ]
     },
     {
       "cell_type": "code",
-      "source": [
-        "from educhain import qna_engine\n",
-        "\n",
-        "url_mcqs = qna_engine.generate_mcqs_from_data(\n",
-        "        source=\"https://en.wikipedia.org/wiki/Butterfly_effect\",\n",
-        "        source_type=\"url\",\n",
-        "        num=3,\n",
-        "        learning_objective=\"real life examples\",\n",
-        "        llm = gemini_flash\n",
-        "    )\n",
-        "\n",
-        "url_mcqs.show()"
-      ],
+      "execution_count": 23,
       "metadata": {
         "colab": {
           "base_uri": "https://localhost:8080/"
@@ -514,11 +488,10 @@
         "id": "1T91bnJ3i54f",
         "outputId": "e9fd2e79-39db-4bbc-d76c-8adf5716b7b6"
       },
-      "execution_count": 23,
       "outputs": [
         {
-          "output_type": "stream",
           "name": "stdout",
+          "output_type": "stream",
           "text": [
             "Error parsing output: Expecting value: line 1 column 1 (char 0)\n",
             "Raw output:\n",
@@ -562,23 +535,24 @@
             "```\n"
           ]
         }
-      ]
-    },
-    {
-      "cell_type": "code",
+      ],
       "source": [
         "from educhain import qna_engine\n",
         "\n",
         "url_mcqs = qna_engine.generate_mcqs_from_data(\n",
-        "        source=\"https://en.wikipedia.org/wiki/List_of_cognitive_biases\",\n",
+        "        source=\"https://en.wikipedia.org/wiki/Butterfly_effect\",\n",
         "        source_type=\"url\",\n",
         "        num=3,\n",
-        "        learning_objective=\"Types of Biases\",\n",
+        "        learning_objective=\"real life examples\",\n",
         "        llm = gemini_flash\n",
         "    )\n",
         "\n",
         "url_mcqs.show()"
-      ],
+      ]
+    },
+    {
+      "cell_type": "code",
+      "execution_count": 19,
       "metadata": {
         "colab": {
           "base_uri": "https://localhost:8080/"
@@ -586,11 +560,10 @@
         "id": "B1AHlDDLggfx",
         "outputId": "0ac03e78-e09b-42e3-c5fd-8c5cfa5626ba"
       },
-      "execution_count": 19,
       "outputs": [
         {
-          "output_type": "stream",
           "name": "stdout",
+          "output_type": "stream",
           "text": [
             "Error parsing output: Expecting value: line 1 column 1 (char 0)\n",
             "Raw output:\n",
@@ -635,10 +608,28 @@
             "```\n"
           ]
         }
+      ],
+      "source": [
+        "from educhain import qna_engine\n",
+        "\n",
+        "url_mcqs = qna_engine.generate_mcqs_from_data(\n",
+        "        source=\"https://en.wikipedia.org/wiki/List_of_cognitive_biases\",\n",
+        "        source_type=\"url\",\n",
+        "        num=3,\n",
+        "        learning_objective=\"Types of Biases\",\n",
+        "        llm = gemini_flash\n",
+        "    )\n",
+        "\n",
+        "url_mcqs.show()"
       ]
     },
     {
       "cell_type": "code",
+      "execution_count": 24,
+      "metadata": {
+        "id": "Eoac9tDSisTk"
+      },
+      "outputs": [],
       "source": [
         "# Deepseek Model\n",
         "from langchain_openai import ChatOpenAI\n",
@@ -648,28 +639,11 @@
         "                      openai_api_base = \"https://openrouter.ai/api/v1\"\n",
         "\n",
         ")"
-      ],
-      "metadata": {
-        "id": "Eoac9tDSisTk"
-      },
-      "execution_count": 24,
-      "outputs": []
+      ]
     },
     {
       "cell_type": "code",
-      "source": [
-        "from educhain import qna_engine\n",
-        "\n",
-        "url_mcqs = qna_engine.generate_mcqs_from_data(\n",
-        "        source=\"https://en.wikipedia.org/wiki/List_of_cognitive_biases\",\n",
-        "        source_type=\"url\",\n",
-        "        num=3,\n",
-        "        learning_objective=\"Types of Biases\",\n",
-        "        llm = deepseek\n",
-        "    )\n",
-        "\n",
-        "url_mcqs.show()"
-      ],
+      "execution_count": 25,
       "metadata": {
         "colab": {
           "base_uri": "https://localhost:8080/"
@@ -677,11 +651,10 @@
         "id": "4H7NfNiqjbtG",
         "outputId": "71fd6fc1-3c99-44ff-8b2c-c9b756b47338"
       },
-      "execution_count": 25,
       "outputs": [
         {
-          "output_type": "stream",
           "name": "stdout",
+          "output_type": "stream",
           "text": [
             "Error parsing output: Expecting value: line 1 column 1 (char 0)\n",
             "Raw output:\n",
@@ -737,21 +710,24 @@
             "```\n"
           ]
         }
-      ]
-    },
-    {
-      "cell_type": "code",
+      ],
       "source": [
         "from educhain import qna_engine\n",
         "\n",
-        "mcqs_from_url = qna_engine.generate_mcqs_from_data(\n",
-        "        source=\"https://en.wikipedia.org/wiki/Butterfly_effect\",\n",
+        "url_mcqs = qna_engine.generate_mcqs_from_data(\n",
+        "        source=\"https://en.wikipedia.org/wiki/List_of_cognitive_biases\",\n",
         "        source_type=\"url\",\n",
-        "        num=5\n",
+        "        num=3,\n",
+        "        learning_objective=\"Types of Biases\",\n",
+        "        llm = deepseek\n",
         "    )\n",
         "\n",
-        "mcqs_from_url.show()"
-      ],
+        "url_mcqs.show()"
+      ]
+    },
+    {
+      "cell_type": "code",
+      "execution_count": 31,
       "metadata": {
         "colab": {
           "base_uri": "https://localhost:8080/"
@@ -759,11 +735,10 @@
         "id": "1NH5JnZBjf2z",
         "outputId": "2b1de30a-65fb-41c7-accd-9a944b79deea"
       },
-      "execution_count": 31,
       "outputs": [
         {
-          "output_type": "stream",
           "name": "stdout",
+          "output_type": "stream",
           "text": [
             "Question 1:\n",
             "Question: Who is closely associated with the concept of the butterfly effect?\n",
@@ -822,16 +797,41 @@
             "\n"
           ]
         }
+      ],
+      "source": [
+        "from educhain import qna_engine\n",
+        "\n",
+        "mcqs_from_url = qna_engine.generate_mcqs_from_data(\n",
+        "        source=\"https://en.wikipedia.org/wiki/Butterfly_effect\",\n",
+        "        source_type=\"url\",\n",
+        "        num=5\n",
+        "    )\n",
+        "\n",
+        "mcqs_from_url.show()"
       ]
     },
     {
       "cell_type": "code",
-      "source": [],
+      "execution_count": null,
       "metadata": {
         "id": "2Zx_KOf9kvks"
       },
-      "execution_count": null,
-      "outputs": []
+      "outputs": [],
+      "source": []
+    }
+  ],
+  "metadata": {
+    "colab": {
+      "provenance": []
+    },
+    "kernelspec": {
+      "display_name": "Python 3",
+      "name": "python3"
+    },
+    "language_info": {
+      "name": "python"
     }
-  ]
+  },
+  "nbformat": 4,
+  "nbformat_minor": 0
 }
diff --git a/cookbook/generate_flashcard_usecase_examples.ipynb b/cookbook/generate_flashcard_usecase_examples.ipynb
new file mode 100644
index 0000000..3b3d4d2
--- /dev/null
+++ b/cookbook/generate_flashcard_usecase_examples.ipynb
@@ -0,0 +1,709 @@
+{
+  "nbformat": 4,
+  "nbformat_minor": 0,
+  "metadata": {
+    "colab": {
+      "provenance": []
+    },
+    "kernelspec": {
+      "name": "python3",
+      "display_name": "Python 3"
+    },
+    "language_info": {
+      "name": "python"
+    }
+  },
+  "cells": [
+    {
+      "cell_type": "markdown",
+      "source": [
+        "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1hayElw8s0jGKGWZ-a6L_VjdQMkzeEu2v?usp=sharing)"
+      ],
+      "metadata": {
+        "id": "08OmChpTl3FV"
+      }
+    },
+    {
+      "cell_type": "markdown",
+      "source": [
+        "#🎯 Advanced Flashcard Generator System\n",
+        "\n",
+        "🌟 Overview\n",
+        "\n",
+        "An intelligent educational tool that creates dynamic, interactive flashcards with advanced customization options and learning analytics."
+      ],
+      "metadata": {
+        "id": "OwWEgz7-lYEw"
+      }
+    },
+    {
+      "cell_type": "code",
+      "execution_count": 1,
+      "metadata": {
+        "colab": {
+          "base_uri": "https://localhost:8080/"
+        },
+        "id": "0t5I9GAokUqH",
+        "outputId": "3174ebff-4210-4d93-d333-4598f1667c6f"
+      },
+      "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[31m1.9 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[32m50.6/50.6 kB\u001b[0m \u001b[31m1.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m607.0/607.0 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[32m2.4/2.4 MB\u001b[0m \u001b[31m46.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.0/1.0 MB\u001b[0m \u001b[31m45.1 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[31m62.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.9/49.9 kB\u001b[0m \u001b[31m3.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m386.9/386.9 kB\u001b[0m \u001b[31m22.3 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.9 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[31m43.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m273.8/273.8 kB\u001b[0m \u001b[31m17.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m94.7/94.7 kB\u001b[0m \u001b[31m7.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m76.4/76.4 kB\u001b[0m \u001b[31m5.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m78.0/78.0 kB\u001b[0m \u001b[31m4.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m325.2/325.2 kB\u001b[0m \u001b[31m21.5 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[31m50.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m408.0/408.0 kB\u001b[0m \u001b[31m25.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m296.9/296.9 kB\u001b[0m \u001b[31m19.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m93.2/93.2 kB\u001b[0m \u001b[31m6.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m13.2/13.2 MB\u001b[0m \u001b[31m83.6 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.4 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.8 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.5 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.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m144.5/144.5 kB\u001b[0m \u001b[31m10.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m54.4/54.4 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[32m1.2/1.2 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[32m63.7/63.7 kB\u001b[0m \u001b[31m4.7 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[31m4.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m442.1/442.1 kB\u001b[0m \u001b[31m27.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.5/49.5 kB\u001b[0m \u001b[31m3.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m54.5/54.5 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[32m73.3/73.3 kB\u001b[0m \u001b[31m5.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.8/3.8 MB\u001b[0m \u001b[31m75.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m425.7/425.7 kB\u001b[0m \u001b[31m12.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m164.1/164.1 kB\u001b[0m \u001b[31m10.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.2 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.2 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"
+          ]
+        }
+      ],
+      "source": [
+        "!pip install -U educhain --quiet"
+      ]
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "from langchain_openai import ChatOpenAI\n",
+        "import os\n",
+        "from google.colab import userdata\n",
+        "os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY')\n"
+      ],
+      "metadata": {
+        "id": "KYilRkbfkch2"
+      },
+      "execution_count": null,
+      "outputs": []
+    },
+    {
+      "cell_type": "markdown",
+      "source": [
+        "\n",
+        "ContentEngine Cookbook\n",
+        "=======================\n",
+        "Simplified example demonstrating the practical use of ContentEngine\n",
+        "for generating flashcards for medical education and technical certification preparation.\n",
+        "\n"
+      ],
+      "metadata": {
+        "id": "CG62jDMBnXqD"
+      }
+    },
+    {
+      "cell_type": "markdown",
+      "source": [
+        "### Medical Exams Flashcards 🏥"
+      ],
+      "metadata": {
+        "id": "fsAULwccnb6R"
+      }
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "\n",
+        "import json\n",
+        "from educhain import Educhain\n",
+        "\n",
+        "client = Educhain()\n",
+        "\n",
+        "# Generate flashcards for a given topic\n",
+        "def generate_medical_flashcards(topic: str):\n",
+        "    content_engine = client.content_engine\n",
+        "\n",
+        "    flashcards = content_engine.generate_flashcards(\n",
+        "        topic=topic,\n",
+        "        num=5,  # Generate 10 flashcards\n",
+        "        custom_instructions=\"\"\"\n",
+        "        Create flashcards with:\n",
+        "        1. High-yield medical facts\n",
+        "        2. Diagnostic criteria\n",
+        "        3. Treatment protocols\n",
+        "        4. Key clinical pearls\n",
+        "        Include references to the latest research where relevant.\n",
+        "        \"\"\"\n",
+        "    )\n",
+        "\n",
+        "    # Print the flashcards\n",
+        "    print(f\"Flashcards for {topic}:\\n\")\n",
+        "    print(json.dumps(flashcards.dict(), indent=2))\n",
+        "\n",
+        "\n",
+        "\n"
+      ],
+      "metadata": {
+        "id": "vVGXTLsol99b"
+      },
+      "execution_count": null,
+      "outputs": []
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "generate_medical_flashcards(topic=\"Acute Coronary Syndromes\")"
+      ],
+      "metadata": {
+        "colab": {
+          "base_uri": "https://localhost:8080/"
+        },
+        "id": "zTvKC_CFm6JA",
+        "outputId": "ba78731b-ef03-4d67-a676-83f6b50ac25a"
+      },
+      "execution_count": null,
+      "outputs": [
+        {
+          "output_type": "stream",
+          "name": "stdout",
+          "text": [
+            "Flashcards for Acute Coronary Syndromes:\n",
+            "\n",
+            "{\n",
+            "  \"title\": \"Acute Coronary Syndromes\",\n",
+            "  \"flashcards\": [\n",
+            "    {\n",
+            "      \"front\": \"What are the types of Acute Coronary Syndromes (ACS)?\",\n",
+            "      \"back\": \"The three main types of ACS are Unstable Angina, Non-ST-Elevation Myocardial Infarction (NSTEMI), and ST-Elevation Myocardial Infarction (STEMI).\",\n",
+            "      \"explanation\": \"ACS encompasses a range of conditions associated with sudden reduced blood flow to the heart. Differentiating between these types is crucial for determining the appropriate management and treatment.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What is the diagnostic criterion for NSTEMI?\",\n",
+            "      \"back\": \"NSTEMI is diagnosed based on elevated cardiac biomarkers (like troponins) and persistent chest pain, without ST-segment elevation on the ECG.\",\n",
+            "      \"explanation\": \"Troponin elevation indicates myocardial injury, which is a key factor in diagnosing NSTEMI. Immediate treatment is necessary to reduce the risk of further heart damage.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What is the first-line treatment for STEMI?\",\n",
+            "      \"back\": \"The first-line treatment for STEMI is reperfusion therapy, which can be achieved through percutaneous coronary intervention (PCI) or thrombolytic therapy.\",\n",
+            "      \"explanation\": \"Timely reperfusion is critical in STEMI management to restore blood flow and minimize myocardial necrosis. PCI is preferred when available and can often be performed within a few hours of symptom onset.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What are common risk factors for Acute Coronary Syndromes?\",\n",
+            "      \"back\": \"Common risk factors include hypertension, hyperlipidemia, smoking, diabetes mellitus, obesity, and a sedentary lifestyle.\",\n",
+            "      \"explanation\": \"Understanding these risk factors can aid in prevention strategies and early intervention to reduce the incidence of ACS.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What is the role of antiplatelet therapy in ACS management?\",\n",
+            "      \"back\": \"Antiplatelet therapy, such as aspirin and P2Y12 inhibitors (e.g., clopidogrel), is crucial in reducing thrombus formation and preventing further cardiovascular events.\",\n",
+            "      \"explanation\": \"These medications are typically initiated as soon as ACS is suspected to improve outcomes and are often part of long-term management post-event.\"\n",
+            "    }\n",
+            "  ]\n",
+            "}\n"
+          ]
+        }
+      ]
+    },
+    {
+      "cell_type": "markdown",
+      "source": [
+        "## Interactive Flashcards with custom topic and accessiblity 🆒"
+      ],
+      "metadata": {
+        "id": "4b5KRlAWl6Y6"
+      }
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "import json\n",
+        "from educhain import Educhain\n",
+        "from typing import Dict, Any\n",
+        "import os\n",
+        "\n",
+        "class InteractiveFlashcards:\n",
+        "    def __init__(self):\n",
+        "        self.client = Educhain()\n",
+        "        self.current_flashcards = None\n",
+        "        self.shown_cards = set()\n",
+        "\n",
+        "    def generate_medical_flashcards(self, topic: str):\n",
+        "        \"\"\"Generate medical flashcards for a given topic.\"\"\"\n",
+        "        content_engine = self.client.content_engine\n",
+        "\n",
+        "        self.current_flashcards = content_engine.generate_flashcards(\n",
+        "            topic=topic,\n",
+        "            num=5,\n",
+        "            custom_instructions=\"\"\"\n",
+        "            Create flashcards with:\n",
+        "            1. High-yield medical facts\n",
+        "            2. Diagnostic criteria\n",
+        "            3. Treatment protocols\n",
+        "            4. Key clinical pearls\n",
+        "            Include references to the latest research where relevant.\n",
+        "            \"\"\"\n",
+        "        )\n",
+        "        self.shown_cards = set()\n",
+        "        self.display_fronts()\n",
+        "\n",
+        "    def display_fronts(self):\n",
+        "        \"\"\"Display only the front of all flashcards.\"\"\"\n",
+        "        if not self.current_flashcards:\n",
+        "            print(\"No flashcards generated yet!\")\n",
+        "            return\n",
+        "\n",
+        "        print(f\"\\nFlashcards Topic: {self.current_flashcards.title}\")\n",
+        "        print(\"\\nAvailable cards (showing front side only):\")\n",
+        "        print(\"-\" * 50)\n",
+        "\n",
+        "        for idx, card in enumerate(self.current_flashcards.flashcards, 1):\n",
+        "            print(f\"\\nCard {idx}:\")\n",
+        "            print(f\"Front: {card.front}\")\n",
+        "            print(\"-\" * 50)\n",
+        "\n",
+        "        self._show_menu()\n",
+        "\n",
+        "    def reveal_card(self, card_number: int):\n",
+        "        \"\"\"Reveal the back of a specific card.\"\"\"\n",
+        "        if not self.current_flashcards:\n",
+        "            print(\"No flashcards generated yet!\")\n",
+        "            return\n",
+        "\n",
+        "        if not 1 <= card_number <= len(self.current_flashcards.flashcards):\n",
+        "            print(\"Invalid card number!\")\n",
+        "            return\n",
+        "\n",
+        "        card = self.current_flashcards.flashcards[card_number - 1]\n",
+        "        print(f\"\\nCard {card_number}:\")\n",
+        "        print(f\"Front: {card.front}\")\n",
+        "        print(f\"Back: {card.back}\")\n",
+        "        if card.explanation:\n",
+        "            print(f\"Explanation: {card.explanation}\")\n",
+        "        print(\"-\" * 50)\n",
+        "\n",
+        "        self.shown_cards.add(card_number)\n",
+        "        self._show_menu()\n",
+        "\n",
+        "    def _show_menu(self):\n",
+        "        \"\"\"Display the interactive menu.\"\"\"\n",
+        "        print(\"\\nOptions:\")\n",
+        "        print(\"- Enter a card number (1-5) to reveal its back\")\n",
+        "        print(\"- Enter 'r' to refresh/show fronts only\")\n",
+        "        print(\"- Enter 'q' to quit\")\n",
+        "        print(\"\\nYour choice: \", end=\"\")\n",
+        "\n",
+        "    def handle_input(self, user_input: str):\n",
+        "        \"\"\"Handle user input for the interactive menu.\"\"\"\n",
+        "        if user_input.lower() == 'q':\n",
+        "            return False\n",
+        "        elif user_input.lower() == 'r':\n",
+        "            self.display_fronts()\n",
+        "        else:\n",
+        "            try:\n",
+        "                card_num = int(user_input)\n",
+        "                self.reveal_card(card_num)\n",
+        "            except ValueError:\n",
+        "                print(\"Invalid input! Please try again.\")\n",
+        "                self._show_menu()\n",
+        "        return True\n",
+        "\n",
+        "def main():\n",
+        "    flashcard_system = InteractiveFlashcards()\n",
+        "\n",
+        "    # Get the topic from user\n",
+        "    topic = input(\"Enter medical topic for flashcards: \")\n",
+        "\n",
+        "    # Generate initial flashcards\n",
+        "    flashcard_system.generate_medical_flashcards(topic)\n",
+        "\n",
+        "    # Interactive loop\n",
+        "    while True:\n",
+        "        user_input = input()\n",
+        "        if not flashcard_system.handle_input(user_input):\n",
+        "            break\n",
+        "\n",
+        "if __name__ == \"__main__\":\n",
+        "    main()"
+      ],
+      "metadata": {
+        "colab": {
+          "base_uri": "https://localhost:8080/"
+        },
+        "id": "C0Uguc8qk_Go",
+        "outputId": "ef7e5074-e37e-4ec3-c982-8749f2627b87"
+      },
+      "execution_count": null,
+      "outputs": [
+        {
+          "name": "stdout",
+          "output_type": "stream",
+          "text": [
+            "Enter medical topic for flashcards: Machine Learning\n",
+            "\n",
+            "Flashcards Topic: Machine Learning\n",
+            "\n",
+            "Available cards (showing front side only):\n",
+            "--------------------------------------------------\n",
+            "\n",
+            "Card 1:\n",
+            "Front: What is supervised learning?\n",
+            "--------------------------------------------------\n",
+            "\n",
+            "Card 2:\n",
+            "Front: Define overfitting in machine learning.\n",
+            "--------------------------------------------------\n",
+            "\n",
+            "Card 3:\n",
+            "Front: What is a confusion matrix?\n",
+            "--------------------------------------------------\n",
+            "\n",
+            "Card 4:\n",
+            "Front: What is the purpose of cross-validation?\n",
+            "--------------------------------------------------\n",
+            "\n",
+            "Card 5:\n",
+            "Front: Explain the term 'feature engineering'.\n",
+            "--------------------------------------------------\n",
+            "\n",
+            "Options:\n",
+            "- Enter a card number (1-5) to reveal its back\n",
+            "- Enter 'r' to refresh/show fronts only\n",
+            "- Enter 'q' to quit\n",
+            "\n",
+            "Your choice: 5\n",
+            "\n",
+            "Card 5:\n",
+            "Front: Explain the term 'feature engineering'.\n",
+            "Back: The process of selecting, modifying, or creating features in a dataset to improve the performance of a machine learning model.\n",
+            "Explanation: Effective feature engineering can dramatically improve model performance. It involves domain knowledge to create meaningful features that enhance the model's ability to learn from the data.\n",
+            "--------------------------------------------------\n",
+            "\n",
+            "Options:\n",
+            "- Enter a card number (1-5) to reveal its back\n",
+            "- Enter 'r' to refresh/show fronts only\n",
+            "- Enter 'q' to quit\n",
+            "\n",
+            "Your choice: 2\n",
+            "\n",
+            "Card 2:\n",
+            "Front: Define overfitting in machine learning.\n",
+            "Back: Overfitting occurs when a model learns the training data too well, capturing noise along with the underlying patterns.\n",
+            "Explanation: An overfit model performs well on training data but poorly on unseen data. Techniques to prevent overfitting include cross-validation, pruning, and regularization.\n",
+            "--------------------------------------------------\n",
+            "\n",
+            "Options:\n",
+            "- Enter a card number (1-5) to reveal its back\n",
+            "- Enter 'r' to refresh/show fronts only\n",
+            "- Enter 'q' to quit\n",
+            "\n",
+            "Your choice: r\n",
+            "\n",
+            "Flashcards Topic: Machine Learning\n",
+            "\n",
+            "Available cards (showing front side only):\n",
+            "--------------------------------------------------\n",
+            "\n",
+            "Card 1:\n",
+            "Front: What is supervised learning?\n",
+            "--------------------------------------------------\n",
+            "\n",
+            "Card 2:\n",
+            "Front: Define overfitting in machine learning.\n",
+            "--------------------------------------------------\n",
+            "\n",
+            "Card 3:\n",
+            "Front: What is a confusion matrix?\n",
+            "--------------------------------------------------\n",
+            "\n",
+            "Card 4:\n",
+            "Front: What is the purpose of cross-validation?\n",
+            "--------------------------------------------------\n",
+            "\n",
+            "Card 5:\n",
+            "Front: Explain the term 'feature engineering'.\n",
+            "--------------------------------------------------\n",
+            "\n",
+            "Options:\n",
+            "- Enter a card number (1-5) to reveal its back\n",
+            "- Enter 'r' to refresh/show fronts only\n",
+            "- Enter 'q' to quit\n",
+            "\n",
+            "Your choice: q\n"
+          ]
+        }
+      ]
+    },
+    {
+      "cell_type": "markdown",
+      "source": [
+        "## Technical flashcards 🧑"
+      ],
+      "metadata": {
+        "id": "3OtfTzq7ngBS"
+      }
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "# Generate technical flashcards for a certification domain\n",
+        "def generate_technical_flashcards(certification: str, domain: str):\n",
+        "    content_engine = client.content_engine\n",
+        "\n",
+        "    flashcards = content_engine.generate_flashcards(\n",
+        "        topic=f\"{certification} - {domain}\",\n",
+        "        num=5,  # Generate 10 flashcards\n",
+        "        custom_instructions=\"\"\"\n",
+        "        Create technical flashcards with:\n",
+        "        1. Key terms and concepts from official exam objectives\n",
+        "        2. Practical examples and scenarios\n",
+        "        3. Best practices and common exam pitfalls\n",
+        "        Include references to relevant technical documentation.\n",
+        "        \"\"\"\n",
+        "    )\n",
+        "\n",
+        "    # Print the flashcards\n",
+        "    print(f\"Flashcards for {certification} - {domain}:\\n\")\n",
+        "    print(json.dumps(flashcards.dict(), indent=2))"
+      ],
+      "metadata": {
+        "id": "QbZsqdN_l-Tg"
+      },
+      "execution_count": null,
+      "outputs": []
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "generate_technical_flashcards(certification=\"AWS Solutions Architect\", domain=\"Design Resilient Architectures\")\n"
+      ],
+      "metadata": {
+        "colab": {
+          "base_uri": "https://localhost:8080/"
+        },
+        "id": "hw46Z6rFm9yT",
+        "outputId": "8fafd407-35dd-4dc8-9d92-bbdd5d30ef5d"
+      },
+      "execution_count": null,
+      "outputs": [
+        {
+          "output_type": "stream",
+          "name": "stdout",
+          "text": [
+            "Flashcards for AWS Solutions Architect - Design Resilient Architectures:\n",
+            "\n",
+            "{\n",
+            "  \"title\": \"AWS Solutions Architect - Design Resilient Architectures\",\n",
+            "  \"flashcards\": [\n",
+            "    {\n",
+            "      \"front\": \"What is High Availability (HA)?\",\n",
+            "      \"back\": \"High Availability (HA) refers to a system's ability to remain operational and accessible for a high percentage of time, minimizing downtime.\",\n",
+            "      \"explanation\": \"In AWS, HA can be achieved through the use of multiple availability zones (AZs) and load balancers to distribute traffic and resources across different zones, thus reducing the risk of a single point of failure.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What are Availability Zones (AZs)?\",\n",
+            "      \"back\": \"Availability Zones are isolated locations within a region designed to be independent from failures in other zones, providing fault tolerance.\",\n",
+            "      \"explanation\": \"AZs allow you to build applications that are more resilient. By deploying resources across multiple AZs, you can ensure that if one AZ goes down, the others can continue to serve traffic.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"Define Elastic Load Balancing (ELB).\",\n",
+            "      \"back\": \"Elastic Load Balancing (ELB) automatically distributes incoming application traffic across multiple targets, such as EC2 instances.\",\n",
+            "      \"explanation\": \"ELB enhances the availability and fault tolerance of your applications by routing traffic only to healthy instances, and it can scale automatically in response to incoming traffic.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What is the purpose of AWS Auto Scaling?\",\n",
+            "      \"back\": \"AWS Auto Scaling automatically adjusts the number of EC2 instances in response to changing traffic patterns, ensuring optimal performance and cost efficiency.\",\n",
+            "      \"explanation\": \"By setting scaling policies based on CloudWatch metrics, you can maintain application performance during traffic spikes while minimizing costs during low-traffic periods.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What is the significance of Route 53 in designing resilient architectures?\",\n",
+            "      \"back\": \"Amazon Route 53 is a scalable Domain Name System (DNS) web service that provides highly reliable and cost-effective domain registration, DNS routing, and health checking.\",\n",
+            "      \"explanation\": \"Route 53 can route traffic to healthy endpoints and even perform geo-routing, which helps ensure that users are directed to the closest and most responsive resources, enhancing overall application resilience.\"\n",
+            "    }\n",
+            "  ]\n",
+            "}\n"
+          ]
+        }
+      ]
+    },
+    {
+      "cell_type": "code",
+      "source": [
+        "# Usage examples\n",
+        "def run_examples():\n",
+        "    # Medical education flashcards\n",
+        "    generate_medical_flashcards(topic=\"Acute Coronary Syndromes\")\n",
+        "\n",
+        "    # Technical certification flashcards\n",
+        "    generate_technical_flashcards(certification=\"AWS Solutions Architect\", domain=\"Design Resilient Architectures\")\n",
+        "\n",
+        "if __name__ == \"__main__\":\n",
+        "    run_examples()\n"
+      ],
+      "metadata": {
+        "colab": {
+          "base_uri": "https://localhost:8080/"
+        },
+        "id": "oDCCKQxGm2me",
+        "outputId": "bb686c94-fb28-493f-877f-5c1ab486c24d"
+      },
+      "execution_count": null,
+      "outputs": [
+        {
+          "output_type": "stream",
+          "name": "stdout",
+          "text": [
+            "Flashcards for Acute Coronary Syndromes:\n",
+            "\n",
+            "{\n",
+            "  \"title\": \"Acute Coronary Syndromes\",\n",
+            "  \"flashcards\": [\n",
+            "    {\n",
+            "      \"front\": \"What is Acute Coronary Syndrome (ACS)?\",\n",
+            "      \"back\": \"ACS is a term used to describe a range of conditions associated with sudden reduced blood flow to the heart.\",\n",
+            "      \"explanation\": \"This includes unstable angina, non-ST elevation myocardial infarction (NSTEMI), and ST elevation myocardial infarction (STEMI).\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What are the classic symptoms of ACS?\",\n",
+            "      \"back\": \"Typical symptoms include chest pain or discomfort, shortness of breath, nausea, and sweating.\",\n",
+            "      \"explanation\": \"Symptoms may vary between men and women, with women often experiencing atypical symptoms.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What is the role of troponin in diagnosing ACS?\",\n",
+            "      \"back\": \"Troponin is a cardiac biomarker that indicates myocardial injury; elevated levels suggest a heart attack.\",\n",
+            "      \"explanation\": \"Troponin tests are key in differentiating between NSTEMI and unstable angina.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What are the ECG changes associated with STEMI?\",\n",
+            "      \"back\": \"ECG findings typically include ST-segment elevation in the leads corresponding to the affected myocardial area.\",\n",
+            "      \"explanation\": \"These changes are critical for diagnosing STEMI and guiding treatment decisions.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What is the initial management for suspected ACS?\",\n",
+            "      \"back\": \"Initial management includes oxygen, nitroglycerin, aspirin, and morphine as needed.\",\n",
+            "      \"explanation\": \"These interventions aim to relieve pain and improve blood flow while preparing for further evaluation.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What is the difference between NSTEMI and unstable angina?\",\n",
+            "      \"back\": \"NSTEMI is characterized by elevated troponin levels indicating myocardial injury, while unstable angina does not show elevated troponin.\",\n",
+            "      \"explanation\": \"Both conditions require urgent medical evaluation and treatment, but NSTEMI indicates more severe heart damage.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What is the preferred reperfusion therapy for STEMI?\",\n",
+            "      \"back\": \"Primary percutaneous coronary intervention (PCI) is the preferred reperfusion therapy for STEMI.\",\n",
+            "      \"explanation\": \"If PCI cannot be performed within the optimal time frame, thrombolytic therapy may be considered.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What are the common long-term management strategies for patients with ACS?\",\n",
+            "      \"back\": \"Long-term management includes antiplatelet therapy, beta-blockers, ACE inhibitors, statins, and lifestyle modifications.\",\n",
+            "      \"explanation\": \"These strategies aim to reduce the risk of future cardiovascular events.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What is the significance of the TIMI score in ACS?\",\n",
+            "      \"back\": \"The TIMI score helps assess the risk of cardiac events in patients with unstable angina or NSTEMI.\",\n",
+            "      \"explanation\": \"It guides treatment decisions and helps in determining the need for invasive procedures.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What lifestyle changes are recommended for preventing future ACS events?\",\n",
+            "      \"back\": \"Recommended changes include smoking cessation, a heart-healthy diet, regular exercise, and weight management.\",\n",
+            "      \"explanation\": \"These changes help reduce cardiovascular risk factors and improve overall heart health.\"\n",
+            "    }\n",
+            "  ]\n",
+            "}\n",
+            "Flashcards for AWS Solutions Architect - Design Resilient Architectures:\n",
+            "\n",
+            "{\n",
+            "  \"title\": \"AWS Solutions Architect - Design Resilient Architectures\",\n",
+            "  \"flashcards\": [\n",
+            "    {\n",
+            "      \"front\": \"What is High Availability (HA)?\",\n",
+            "      \"back\": \"A design approach that ensures a system is continuously operational for a long period of time.\",\n",
+            "      \"explanation\": \"HA is achieved by eliminating single points of failure and using redundant components. AWS services like ELB and Auto Scaling help implement HA.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"Define Fault Tolerance.\",\n",
+            "      \"back\": \"The ability of a system to continue operating properly in the event of the failure of some of its components.\",\n",
+            "      \"explanation\": \"Fault tolerance can be achieved through redundancy and replication in AWS, such as using multiple Availability Zones.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What is Disaster Recovery (DR)?\",\n",
+            "      \"back\": \"A set of policies and procedures to enable the recovery of technology infrastructure after a natural or human-induced disaster.\",\n",
+            "      \"explanation\": \"AWS provides various DR strategies such as pilot light, warm standby, and multi-site, which can be implemented using services like AWS Backup and Amazon S3.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What does the term 'Elasticity' refer to in cloud computing?\",\n",
+            "      \"back\": \"The ability of a system to automatically grow and shrink resources as needed.\",\n",
+            "      \"explanation\": \"AWS services like EC2 Auto Scaling allow applications to adapt to varying loads, ensuring efficient resource utilization.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What are Availability Zones (AZs)?\",\n",
+            "      \"back\": \"Isolated locations within a region that provide high availability and fault tolerance.\",\n",
+            "      \"explanation\": \"AZs are crucial for building resilient architectures on AWS. Distributing instances across multiple AZs can protect against data center failures.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What is the AWS Well-Architected Framework?\",\n",
+            "      \"back\": \"A framework that provides best practices and guidelines to help cloud architects build secure, high-performing, resilient, and efficient infrastructure.\",\n",
+            "      \"explanation\": \"It consists of five pillars: Operational Excellence, Security, Reliability, Performance Efficiency, and Cost Optimization.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"Define Load Balancing.\",\n",
+            "      \"back\": \"A method of distributing network traffic across multiple servers to ensure no single server becomes overwhelmed.\",\n",
+            "      \"explanation\": \"AWS Elastic Load Balancing (ELB) automatically distributes incoming application traffic across multiple targets, enhancing the availability of applications.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What is Amazon Route 53?\",\n",
+            "      \"back\": \"A scalable Domain Name System (DNS) web service designed to provide highly reliable and cost-effective domain registration and DNS routing.\",\n",
+            "      \"explanation\": \"Route 53 can be used to route users to different endpoints based on latency or health checks, contributing to application resilience.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"What is a Multi-Region Architecture?\",\n",
+            "      \"back\": \"An architecture that uses multiple AWS regions to provide redundancy and failover in case one region goes down.\",\n",
+            "      \"explanation\": \"This approach can enhance the availability and durability of applications, especially critical ones requiring stringent SLAs.\"\n",
+            "    },\n",
+            "    {\n",
+            "      \"front\": \"Explain the principle of 'Infrastructure as Code' (IaC).\",\n",
+            "      \"back\": \"The practice of managing and provisioning computing infrastructure through machine-readable definition files, rather than physical hardware configuration.\",\n",
+            "      \"explanation\": \"AWS CloudFormation and Terraform are popular tools for implementing IaC, allowing for reproducible and version-controlled infrastructure deployments.\"\n",
+            "    }\n",
+            "  ]\n",
+            "}\n"
+          ]
+        }
+      ]
+    },
+    {
+      "cell_type": "code",
+      "source": [],
+      "metadata": {
+        "id": "zr1ncUC_nBTT"
+      },
+      "execution_count": null,
+      "outputs": []
+    }
+  ]
+}
\ No newline at end of file
diff --git a/educhain/engines/content_engine.py b/educhain/engines/content_engine.py
index b1415e2..a5a4ca4 100644
--- a/educhain/engines/content_engine.py
+++ b/educhain/engines/content_engine.py
@@ -6,6 +6,8 @@
 from langchain.output_parsers import PydanticOutputParser
 from educhain.core.config import LLMConfig
 from educhain.models.content_models import LessonPlan
+from educhain.models.content_models import FlashcardSet 
+
 
 class ContentEngine:
     def __init__(self, llm_config: Optional[LLMConfig] = None):
@@ -29,6 +31,7 @@ def _initialize_llm(self, llm_config: LLMConfig):
     def generate_lesson_plan(
         self,
         topic: str,
+        grade_level: Optional[str] = None,
         prompt_template: Optional[str] = None,
         custom_instructions: Optional[str] = None,
         response_model: Optional[Type[Any]] = None,
@@ -43,27 +46,42 @@ def generate_lesson_plan(
 
         if prompt_template is None:
             prompt_template = """
-            Create a comprehensive lesson plan for the following topic:
+            Create a highly engaging and comprehensive lesson plan for the following topic:
             Topic: {topic}
 
-            Include the following elements in your lesson plan:
+            The lesson plan should be structured in a way that engages students through a variety of methods.
+            The structure should include the following elements:
             1. Title of the lesson
             2. Subject area
-            3. Main topics (2-3)
-            4. For each main topic:
-               a. Title
-               b. 2-3 subtopics
-               c. For each subtopic:
-                  - Title
-                  - Content elements (definitions, examples, explanations, activities)
-
-            Ensure that the lesson plan is adaptable to different grade levels and teaching contexts.
+            3. Learning objectives (at least 3, tailored to different learning levels or grades)
+            4. Lesson introduction (including a hook to grab attention, real-world applications, or provocative questions)
+            5. Main topics (2-3), each should include:
+                a. Title
+                b. Subtopics (2-3)
+                c. For each subtopic:
+                    - Key Concepts (definitions, examples, illustrations, multimedia)
+                    - Discussion Questions (to encourage critical thinking and engagement)
+                    - Hands-on Activities or Project-Based Learning (interactive, real-world tasks)
+                    - Reflective Questions (to evaluate understanding)
+                    - Assessment Ideas (quiz, project, or written task to assess mastery)
+            6. Learning adaptations for different grade levels (if applicable)
+            7. A section on real-world applications, including careers and future learning paths
+            8. Ethical considerations and societal impact (if applicable)
+
+            Ensure that the lesson plan follows Bloom's Taxonomy principles with activities addressing different cognitive levels: remember, understand, apply, analyze, evaluate, and create.
+
+            The lesson plan should cater to diverse learning styles (visual, auditory, kinesthetic, etc.) and include modern teaching methods such as collaborative learning and technology integration.
+
+            Output the response in a structured and professional format.
+
+            Response format: 
+            {format_instructions}
             """
 
         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}"
+        prompt_template += "\n\n{format_instructions}"
 
         lesson_plan_prompt = PromptTemplate(
             input_variables=["topic"],
@@ -73,17 +91,83 @@ def generate_lesson_plan(
 
         llm_to_use = llm if llm is not None else self.llm
 
+        # Use LLM to generate lesson plan based on the topic
         lesson_plan_chain = lesson_plan_prompt | llm_to_use
         results = lesson_plan_chain.invoke(
             {"topic": topic, **kwargs},
         )
         results = results.content
 
+        # Print raw output for debugging
+        print("Raw output from LLM:")
+        print(results)
+
         try:
+            # Parse results to match the new LessonPlan structure
             structured_output = parser.parse(results)
             return structured_output
         except Exception as e:
             print(f"Error parsing output: {e}")
             print("Raw output:")
             print(results)
-            return response_model()
\ No newline at end of file
+            return response_model()
+    
+    def generate_flashcards(
+        self,
+        topic: str,
+        num: int = 10,
+        prompt_template: Optional[str] = None,
+        custom_instructions: Optional[str] = None,
+        response_model: Optional[Type[Any]] = None,
+        llm: Optional[Any] = None,
+        **kwargs
+    ) -> FlashcardSet:
+        if response_model is None:
+            response_model = FlashcardSet
+        parser = PydanticOutputParser(pydantic_object=response_model)
+        format_instructions = parser.get_format_instructions()
+
+        if prompt_template is None:
+            prompt_template = """
+            Generate a set of {num} flashcards on the topic: {topic}.
+
+            For each flashcard, provide:
+            1. A front side with a question or key term
+            2. A back side with the answer or definition
+            3. An optional explanation or additional context
+
+            The flashcards should cover key concepts, terminology, and important facts related to the topic.
+
+            Ensure that the output follows this structure:
+            - A title for the flashcard set (the main topic)
+            - A list of flashcards, each containing:
+              - front: The question or key term
+              - back: The answer or definition
+              - explanation: Additional context or explanation (optional)
+            """
+
+        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}"
+
+        flashcard_prompt = PromptTemplate(
+            input_variables=["num", "topic"],
+            template=prompt_template,
+            partial_variables={"format_instructions": format_instructions}
+        )
+
+        llm_to_use = llm if llm is not None else self.llm
+        flashcard_chain = flashcard_prompt | llm_to_use
+        results = flashcard_chain.invoke(
+            {"num": num, "topic": topic, **kwargs},
+        )
+
+        try:
+            structured_output = parser.parse(results.content)
+            return structured_output
+        except Exception as e:
+            print(f"Error parsing output: {e}")
+            print("Raw output:")
+            print(results.content)
+            return FlashcardSet(title=topic, flashcards=[])
diff --git a/educhain/engines/qna_engine.py b/educhain/engines/qna_engine.py
index 5d53b5c..ef394db 100644
--- a/educhain/engines/qna_engine.py
+++ b/educhain/engines/qna_engine.py
@@ -256,70 +256,140 @@ def generate_similar_options(self, question, correct_answer, num_options=3):
         response = llm.predict(prompt)
         return response.split(';')
 
-    def generate_mcq_math(self, topic, num=1, llm=None, response_model=None,
-                         prompt_template=None, custom_instructions=None, **kwargs):
+    def _process_math_result(self, math_result: Any) -> str:
+        """Helper method to process and extract numerical answer from LLMMathChain result"""
+        if isinstance(math_result, dict):
+            if 'answer' in math_result:
+                return math_result['answer'].split('Answer: ')[-1].strip()
+            elif 'result' in math_result:
+                return math_result['result'].strip()
+        
+        # Handle string response
+        result_str = str(math_result)
+        if 'Answer:' in result_str:
+            return result_str.split('Answer:')[-1].strip()
+        
+        # Remove any question repetition and extract the numerical result
+        lines = result_str.split('\n')
+        for line in reversed(lines):
+            if line.strip().replace('.', '').isdigit():
+                return line.strip()
+        
+        raise ValueError("Could not extract numerical result from LLMMathChain response")
+    
+    def generate_mcq_math(
+        self,
+        topic: str,
+        num: int = 1,
+        question_type: QuestionType = "Multiple Choice",
+        prompt_template: Optional[str] = None,
+        custom_instructions: Optional[str] = None,
+        response_model: Optional[Type[Any]] = None,
+        **kwargs
+    ) -> Any:
         if response_model is None:
             parser = PydanticOutputParser(pydantic_object=MCQListMath)
-            format_instructions = parser.get_format_instructions()
         else:
             parser = PydanticOutputParser(pydantic_object=response_model)
-            format_instructions = parser.get_format_instructions()
+
+        format_instructions = parser.get_format_instructions()
 
         if prompt_template is None:
             prompt_template = """
-            You are an Academic AI assistant tasked with generating multiple-choice questions on various topics specialised in Maths Subject.
-            Generate {num} multiple-choice question (MCQ) based on the given topic and level.
-            provide the question, four answer options, and the correct answer.
-
+            You are an Academic AI assistant specialized in generating multiple-choice math questions.
+            Generate {num} multiple-choice questions (MCQ) based on the given topic.
+            Each question MUST be a mathematical computation question.
+            
+            For each question:
+            1. Make sure it requires mathematical calculation
+            2. Set requires_math to true
+            3. Provide clear numerical values
+            4. Ensure the question has a single, unambiguous answer
+            
             Topic: {topic}
+            
+            Format each question to include:
+            - A clear mathematical problem
+            - Four distinct numerical options
+            - The correct answer
+            - A step-by-step explanation
             """
 
         if custom_instructions:
             prompt_template += f"\n\nAdditional Instructions:\n{custom_instructions}"
 
-        prompt_template += "\nThe response should be in JSON format. \n {format_instructions}"
+        prompt_template += "\nThe response should be in JSON format.\n{format_instructions}"
 
-        MCQ_prompt = PromptTemplate(
+        question_prompt = PromptTemplate(
             input_variables=["num", "topic"],
             template=prompt_template,
             partial_variables={"format_instructions": format_instructions}
         )
 
-        if llm:
-            llm = llm
-        else:
-            llm = self.llm  # Use the initialized LLM from the class
-
-        MCQ_chain = MCQ_prompt | llm
-
-        results = MCQ_chain.invoke(
+        question_chain = question_prompt | self.llm
+        results = question_chain.invoke(
             {"num": num, "topic": topic, **kwargs},
         )
         results = results.content
-        structured_output = parser.parse(results)
 
-        llm_math = LLMMathChain.from_llm(llm=llm, verbose=False)
+        try:
+            structured_output = parser.parse(results)
+        except Exception as e:
+            print(f"Error parsing output: {e}")
+            print("Raw output:")
+            print(results)
+            return MCQListMath()
+
+        llm_math = LLMMathChain.from_llm(llm=self.llm, verbose=True)
 
         for question in structured_output.questions:
             if question.requires_math:
                 try:
-                    with get_openai_callback() as cb:
-                        result = llm_math.invoke({"question": question.question})
-                        result = result['result'].strip().split(":")[-1]
-                        result = float(result)
-                        result = f"{result: .2f}"
-
-                    question.explanation += f"\n\nMath solution: {result}"
-
-                    correct_option = Option(text=str(result.lstrip()), correct='true')
-                    incorrect_options = [Option(text=opt.strip(), correct='false')
-                                         for opt in self.generate_similar_options(question.question, result)]
-
-                    while len(incorrect_options) < 3:
-                        incorrect_options.append(Option(text="N/A", correct='false'))
-
-                    question.options = [correct_option] + incorrect_options[:3]
-                    random.shuffle(question.options)
+                    # Extract numerical expression from the question
+                    math_result = llm_math.invoke({"question": question.question})
+                    
+                    try:
+                        # Process the result using the helper method
+                        solution = self._process_math_result(math_result)
+                        
+                        # Convert to float and format
+                        numerical_solution = float(solution)
+                        formatted_solution = f"{numerical_solution:.2f}"
+                        
+                        question.explanation += f"\n\nMath solution: {formatted_solution}"
+                        
+                        # Generate options with the correct string format
+                        correct_option = Option(text=formatted_solution, correct='true')
+                        
+                        # Generate incorrect options
+                        variations = [0.9, 1.1, 1.2]
+                        incorrect_options = []
+                        
+                        for var in variations:
+                            wrong_val = numerical_solution * var
+                            incorrect_options.append(
+                                Option(
+                                    text=f"{wrong_val:.2f}",
+                                    correct='false'
+                                )
+                            )
+                        
+                        # Combine and shuffle options
+                        question.options = [correct_option] + incorrect_options
+                        random.shuffle(question.options)
+                        
+                    except (ValueError, TypeError) as e:
+                        print(f"Error processing numerical result: {e}")
+                        raise
+                        
                 except Exception as e:
                     print(f"LLMMathChain failed to answer: {str(e)}")
+                    question.explanation += "\n\nMath solution: Unable to compute."
+                    question.options = [
+                        Option(text="Unable to compute", correct='true'),
+                        Option(text="N/A", correct='false'),
+                        Option(text="N/A", correct='false'),
+                        Option(text="N/A", correct='false')
+                    ]
+
         return structured_output
diff --git a/educhain/models/__init__.py b/educhain/models/__init__.py
index 8f0affe..431642d 100644
--- a/educhain/models/__init__.py
+++ b/educhain/models/__init__.py
@@ -3,4 +3,4 @@
                          TrueFalseQuestion, FillInBlankQuestion, MCQList, 
                          ShortAnswerQuestionList, TrueFalseQuestionList, 
                          FillInBlankQuestionList, Option, MCQMath, MCQListMath)
-from .content_models import ContentElement, SubTopic, MainTopic, LessonPlan
\ No newline at end of file
+from .content_models import ContentElement, SubTopic, MainTopic, LessonPlan,Flashcard, FlashcardSet
diff --git a/educhain/models/content_models.py b/educhain/models/content_models.py
index c4f8c63..cb6aa2b 100644
--- a/educhain/models/content_models.py
+++ b/educhain/models/content_models.py
@@ -1,34 +1,100 @@
-from typing import List
+from typing import Optional, Type, Any ,List
 from pydantic import BaseModel, Field
 
 class ContentElement(BaseModel):
-    type: str = Field(..., description="The type of content element, e.g., 'definition', 'example', 'explanation', 'activity'")
-    content: str = Field(..., description="The actual content of the element")
+    type: str = Field(..., description="The type of content element (e.g., definition, example, activity).")
+    content: str = Field(..., description="The actual content of the element.")
+
+class DiscussionQuestion(BaseModel):
+    question: str = Field(..., description="A question to encourage critical thinking.")
+
+class HandsOnActivity(BaseModel):
+    title: str = Field(..., description="Title of the hands-on activity.")
+    description: str = Field(..., description="Description of the hands-on activity.")
+
+class ReflectiveQuestion(BaseModel):
+    question: str = Field(..., description="A question to evaluate understanding.")
+
+class AssessmentIdea(BaseModel):
+    type: str = Field(..., description="Type of assessment (e.g., quiz, project, written task).")
+    description: str = Field(..., description="Description of the assessment idea.")
 
 class SubTopic(BaseModel):
-    title: str = Field(..., description="The title of the subtopic")
-    content_elements: List[ContentElement] = Field(..., description="A list of content elements that make up this subtopic")
+    title: str = Field(..., description="The title of the subtopic.")
+    key_concepts: List[ContentElement] = Field(..., description="List of key concepts under this subtopic.")
+    discussion_questions: List[DiscussionQuestion] = Field(..., description="List of discussion questions.")
+    hands_on_activities: List[HandsOnActivity] = Field(..., description="List of hands-on activities.")
+    reflective_questions: List[ReflectiveQuestion] = Field(..., description="List of reflective questions.")
+    assessment_ideas: List[AssessmentIdea] = Field(..., description="List of assessment ideas.")
 
 class MainTopic(BaseModel):
-    title: str = Field(..., description="The title of the main topic")
-    subtopics: List[SubTopic] = Field(..., description="A list of subtopics that make up this main topic")
+    title: str = Field(..., description="The title of the main topic.")
+    subtopics: List[SubTopic] = Field(..., description="List of subtopics under this main topic.")
 
 class LessonPlan(BaseModel):
-    title: str = Field(..., description="The overall title of the lesson plan")
-    subject: str = Field(..., description="The subject area of the lesson")
-    main_topics: List[MainTopic] = Field(..., description="A list of main topics covered in the lesson")
+    title: str = Field(..., description="The overall title of the lesson plan.")
+    subject: str = Field(..., description="The subject area of the lesson.")
+    learning_objectives: List[str] = Field(..., description="List of learning objectives tailored to different learning levels.")
+    lesson_introduction: str = Field(..., description="Introduction to the lesson including a hook and real-world applications.")
+    main_topics: List[MainTopic] = Field(..., description="A list of main topics covered in the lesson.")
+    learning_adaptations: Optional[str] = Field(None, description="Learning adaptations for different grade levels.")
+    real_world_applications: Optional[str] = Field(None, description="Discussion of real-world applications, careers, and future learning paths.")
+    ethical_considerations: Optional[str] = Field(None, description="Discussion of ethical considerations and societal impact.")
 
     def show(self):
         print("=" * 80)
         print(f"Lesson Plan: {self.title}")
         print(f"Subject: {self.subject}")
+        print(f"Learning Objectives: {', '.join(self.learning_objectives)}")
+        print(f"Lesson Introduction: {self.lesson_introduction}")
         print("=" * 80)
 
         for i, main_topic in enumerate(self.main_topics, 1):
-            print(f"\n{i}. {main_topic.title}")
+            print(f"\nMain Topic {i}: {main_topic.title}")
             for j, subtopic in enumerate(main_topic.subtopics, 1):
-                print(f"\n   {i}.{j} {subtopic.title}")
-                for element in subtopic.content_elements:
-                    print(f"      - {element.content}")
+                print(f"\n   Subtopic {i}.{j}: {subtopic.title}")
+                print("   Key Concepts:")
+                for element in subtopic.key_concepts:
+                    print(f"      - {element.type.capitalize()}: {element.content}")
+
+                print("   Discussion Questions:")
+                for dq in subtopic.discussion_questions:
+                    print(f"      - {dq.question}")
+
+                print("   Hands-On Activities:")
+                for activity in subtopic.hands_on_activities:
+                    print(f"      - {activity.title}: {activity.description}")
+
+                print("   Reflective Questions:")
+                for rq in subtopic.reflective_questions:
+                    print(f"      - {rq.question}")
+
+                print("   Assessment Ideas:")
+                for assessment in subtopic.assessment_ideas:
+                    print(f"      - {assessment.type.capitalize()}: {assessment.description}")
 
-        print("\n" + "=" * 80)
\ No newline at end of file
+        print("\n" + "=" * 80)
+
+
+class Flashcard(BaseModel):
+    front: str = Field(..., description="The front side of the flashcard with a question or key term")
+    back: str = Field(..., description="The back side of the flashcard with the answer or definition")
+    explanation: Optional[str] = Field(None, description="An optional explanation or additional context")
+
+class FlashcardSet(BaseModel):
+    title: str = Field(..., description="The title or topic of the flashcard set")
+    flashcards: List[Flashcard] = Field(..., description="A list of flashcards in this set")
+
+    def show(self):
+        print("=" * 80)
+        print(f"Flashcard Set: {self.title}")
+        print("=" * 80)
+        for i, flashcard in enumerate(self.flashcards, 1):
+            print(f"\n{i}. Front: {flashcard.front}")
+            print(f"   Back: {flashcard.back}")
+            if flashcard.explanation:
+                print(f"   Explanation: {flashcard.explanation}")
+        print("\n" + "=" * 80)
+        print("\nLearning Adaptations: ", self.learning_adaptations or "None")
+        print("Real-World Applications: ", self.real_world_applications or "None")
+        print("Ethical Considerations: ", self.ethical_considerations or "None")
diff --git a/educhain/models/qna_models.py b/educhain/models/qna_models.py
index eb5ce08..66a946e 100644
--- a/educhain/models/qna_models.py
+++ b/educhain/models/qna_models.py
@@ -57,7 +57,7 @@ class Option(BaseModel):
 
 class MCQMath(BaseModel):
     question: str = Field(description="The quiz question, strictly avoid Latex formatting")
-    requires_math: bool = Field(default=False, description="Whether the question requires the LLM Math Chain for accurate answers.")
+    requires_math: bool = Field(description="Whether the question requires the LLM Math Chain for accurate answers.")
     options: List[Option] = Field(description="The possible answers to the question. The list should contain 4 options.")
     explanation: str =  Field(default=None, description="Explanation of the question")
 
@@ -75,4 +75,4 @@ class MCQListMath(BaseModel):
     def show(self):
         for i, question in enumerate(self.questions, 1):
             print(f"Question {i}:")
-            question.show()
\ No newline at end of file
+            question.show()


Test patch:
diff --git a/test_scripts/test_generate_lesson_.py b/test_scripts/test_generate_lesson_.py
new file mode 100644
index 0000000..41e82a1
--- /dev/null
+++ b/test_scripts/test_generate_lesson_.py
@@ -0,0 +1,36 @@
+import sys
+from educhain.core.config import LLMConfig
+from educhain.engines.content_engine import ContentEngine
+
+def test_generate_lesson_plan():
+    try:
+        
+        llm_config = LLMConfig(
+            model_name="gpt-4o-mini",
+            api_key="",
+            max_tokens=3000,
+            temperature=0.5,
+        )
+
+        content_engine = ContentEngine(llm_config=llm_config)
+
+        topic = "Linear Algebra"
+
+        custom_instructions = "Focus on hands-on activities and real-world examples."
+
+        # Generate the lesson plan
+        lesson_plan = content_engine.generate_lesson_plan(
+            topic=topic,
+            custom_instructions=custom_instructions,
+        )
+
+        # Display the lesson plan using the show() function
+        print(lesson_plan)
+        lesson_plan.show()
+
+    except Exception as e:
+        print(f"Error generating lesson plan: {e}")
+
+# Run the test
+if __name__ == "__main__":
+    test_generate_lesson_plan()
diff --git a/test_scripts/test_math.py b/test_scripts/test_math.py
new file mode 100644
index 0000000..39d9918
--- /dev/null
+++ b/test_scripts/test_math.py
@@ -0,0 +1,29 @@
+from educhain.core.config import LLMConfig
+from educhain.engines.qna_engine import QnAEngine
+
+llm_config = LLMConfig(
+    api_key="",
+    model_name="gpt-4o-mini",
+    temperature=0.7,
+    max_tokens=500
+)
+
+engine = QnAEngine(llm_config=llm_config)
+
+topic = "Geometry"
+
+num_questions = 7
+response = engine.generate_mcq_math(
+    topic=topic,
+    num=num_questions
+)
+
+print(response)
+
+print("Generated MCQ Math Questions:")
+for question in response.questions:
+    print(f"Question: {question.question}")
+    print("Options:")
+    for option in question.options:
+        print(f" - {option.text} {'(Correct)' if option.correct == 'true' else ''}")
+    print(f"Explanation: {question.explanation}\n")