Skip to main content

A Python package for generating educational content using Generative AI

Project description

Educhain Logo

PyPI version License: MIT Python Versions Downloads

Educhain 🎓🔗

Educhain Website Documentation

Welcome to Educhain! Transform your educational content effortlessly with cutting-edge AI tools. Explore our Website and dive into the Documentation to get started.

Educhain is a powerful Python package that leverages Generative AI to create engaging and personalized educational content. From generating multiple-choice questions to crafting comprehensive lesson plans, Educhain makes it easy to apply AI in various educational scenarios.

Educhain Logo

🚀 Features

  • 📝 Generate Multiple Choice Questions (MCQs)
  • 📊 Create Lesson Plans
  • 🔄 Support for various LLM models
  • 📁 Export questions to JSON, PDF, and CSV formats
  • 🎨 Customizable prompt templates
  • 📚 Generate questions from text/PDF/URL files
  • 📹 Generate questions from YouTube videos
  • 🥽 Generate questions from images

📈 Workflow

Reimagining Education with AI 🤖

  • 📜 QnA Engine: Generates an infinte variety of Questions
  • 📰 Content Engine: One-stop content generation - lesson plans, flashcards, notes etc
  • 📌 Personalization Engine: Adapts to your individual level of understanding for a tailored experience.
Educhain workflow diagram

🛠 Installation

pip install educhain

🎮 Usage

Starter Guide

Open In Colab

Quick Start

Get started with content generation in < 3 lines!

from educhain import Educhain

client = Educhain()

ques = client.qna_engine.generate_questions(topic="Newton's Law of Motion",
                                            num=5)
print(ques)
ques.json() # ques.dict()

Supports Different Question Types

Generates different types of questions. See the advanced guide to create a custom question type.

# Supports "Multiple Choice" (default); "True/False"; "Fill in the Blank"; "Short Answer"

from educhain import Educhain

client = Educhain()

ques = client.qna_engine.generate_questions(topic = "Psychology", 
                                            num = 10,
                                            question_type="Fill in the Blank"
                                            custom_instructions = "Only basic questions")

print(ques)
ques.json() #ques.dict()

Use Different LLM Models

To use a custom model, you can pass a model configuration through the LLMConfig class

Here's an example using the Gemini Model

from langchain_google_genai import ChatGoogleGenerativeAI
from educhain import Educhain, LLMConfig

gemini_flash = ChatGoogleGenerativeAI(
    model="gemini-1.5-flash-exp-0827",
    google_api_key="GOOGLE_API_KEY")

flash_config = LLMConfig(custom_model=gemini_flash)

client = Educhain(flash_config) #using gemini model with educhain

ques = client.qna_engine.generate_questions(topic="Psychology",
                                            num=10)

print(ques)
ques.json() #ques.dict()

Customizable Prompt Templates

Configure your prompt templates for more control over input parameters and output quality.

from educhain import Educhain

client = Educhain()

custom_template = """
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}
Learning Objective: {learning_objective}
Difficulty Level: {difficulty_level}
"""

ques = client.qna_engine.generate_questions(
    topic="Python Programming",
    num=2,
    learning_objective="Usage of Python classes",
    difficulty_level="Hard",
    prompt_template=custom_template,
)

print(ques)

Generate Questions from Data Sources

Ingest your own data to create content. Currently supports URL/PDF/TXT.

from educhain import Educhain
client = Educhain()

ques = client.qna_engine.generate_questions_from_data(
    source="https://en.wikipedia.org/wiki/Big_Mac_Index",
    source_type="url",
    num=5)

print(ques)
ques.json() # ques.dict()

Generate Lesson Plans

Create interactive and detailed lesson plans.

from educhain import Educhain

client = Educhain()

plan = client.content_engine.generate_lesson_plan(
                              topic = "Newton's Law of Motion")

print(plan)
plan.json()  # plan.dict()

📊 Supported Question Types

  • Multiple Choice Questions (MCQ)
  • Short Answer Questions
  • True/False Questions
  • Fill in the Blank Questions

🔧 Advanced Configuration

Educhain offers advanced configuration options to fine-tune its behavior. Check our advanced guide for more details. (coming soon!)

🌟 Success Stories

Educators worldwide are using Educhain to transform their teaching. Read our case studies to learn more.

📈 Usage Statistics

Educhain's adoption has been growing rapidly:

Usage Growth Graph

🗺 Roadmap

  • Bulk Generation
  • Outputs in JSON format
  • Custom Prompt Templates
  • Custom Response Models using Pydantic
  • Exports questions to JSON/PDF/CSV
  • Support for other LLM models
  • Generate questions from text/PDF file
  • Integration with popular Learning Management Systems
  • Mobile app for on-the-go content generation

🤝 Contributing

We welcome contributions! Please see our Contribution Guide for more details.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📬 Contact

For bug reports or feature requests, please open an issue on our GitHub repository.


Educhain Logo

Made with ❤️ by Buildfastwithai

www.educhain.in

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

educhain-0.3.3.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

educhain-0.3.3-py3-none-any.whl (36.7 kB view details)

Uploaded Python 3

File details

Details for the file educhain-0.3.3.tar.gz.

File metadata

  • Download URL: educhain-0.3.3.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/40.0 requests/2.32.3 requests-toolbelt/1.0.0 urllib3/1.26.20 tqdm/4.66.4 importlib-metadata/6.11.0 keyring/24.0.1 rfc3986/1.5.0 colorama/0.4.6 CPython/3.10.15

File hashes

Hashes for educhain-0.3.3.tar.gz
Algorithm Hash digest
SHA256 cdce81dd206f7a262d16056a5fc691d2f8cf041b292342ca7a40fe253d4f1091
MD5 290a0e390b46d754132efa8ac05fb7cc
BLAKE2b-256 477c8017fe6090bfe35a548f8a10978dc1cb03f5e3b78adb7130e3507061013b

See more details on using hashes here.

File details

Details for the file educhain-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: educhain-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 36.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/40.0 requests/2.32.3 requests-toolbelt/1.0.0 urllib3/1.26.20 tqdm/4.66.4 importlib-metadata/6.11.0 keyring/24.0.1 rfc3986/1.5.0 colorama/0.4.6 CPython/3.10.15

File hashes

Hashes for educhain-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ddd986c0e37c26640cb87804a9cdcd2bf19bf57c5a38cb5a170f1665ac922e88
MD5 f28bc65e10a5ab72705ca7ef10d791e9
BLAKE2b-256 2637685868ba1fbbc999bc5d836291643c0076d3deaa5b6cd10a68a0ff71e31c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page