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 🎓🔗

Website | Documentation

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

📈 Performance

Educhain consistently outperforms traditional methods in content generation speed and quality:

Performance Comparison Graph

🛠 Installation

pip install educhain

🎮 Usage

Generate MCQs

Open In Colab

Quick Start

from educhain import qna_engine

questions = qna_engine.generate_mcq(
    topic="Indian History",
    level="Beginner",
    num=5
)
print(questions)

Using Custom Prompt Templates

from educhain import qna_engine

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}
"""

result = qna_engine.generate_mcq(
    topic="Python Programming",
    num=2,
    learning_objective="Usage of Python classes",
    difficulty_level="Hard",
    prompt_template=custom_template,
)
print(result)

Using Different LLM Models

from educhain import qna_engine
from langchain_openai import ChatOpenAI

llama3_groq = ChatOpenAI(
    model="llama3-70b-8192",
    openai_api_base="https://api.groq.com/openai/v1",
    openai_api_key="GROQ_API_KEY"
)

questions = qna_engine.generate_mcq(
    topic="Chess",
    level="Hard",
    num=5,
    llm=llama3_groq
)
print(questions)

Generate Questions from Data Sources

from educhain import qna_engine

questions = qna_engine.generate_mcqs_from_data(
    source="https://example.com/article",
    source_type="url",
    num=5,
    learning_objective="Understand key concepts",
    difficulty_level="Intermediate"
)
print(questions)

Export Questions

from educhain import to_json, to_pdf, to_csv

to_json(questions, "questions.json")  # Export questions to JSON
to_pdf(questions, "questions.pdf")    # Export questions to PDF
to_csv(questions, "questions.csv")    # Export questions to CSV

Generate Lesson Plans

from educhain import content_engine

topic = "Medieval History"
level = "Beginner"
lesson_plan = content_engine.generate_lesson_plan(topic, level)
print(lesson_plan)

📊 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 configuration guide for more details.

🌟 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
  • Finetuned Model for question generation
  • 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.2.13.tar.gz (12.5 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.2.13-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: educhain-0.2.13.tar.gz
  • Upload date:
  • Size: 12.5 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/2.2.1 tqdm/4.66.4 importlib-metadata/7.1.0 keyring/24.0.1 rfc3986/1.5.0 colorama/0.4.6 CPython/3.10.14

File hashes

Hashes for educhain-0.2.13.tar.gz
Algorithm Hash digest
SHA256 5b05c2d682bf280cd9dbb4e9db70dc4563cb878b65751f44e727f6f8cda76412
MD5 c0e8212d26b42c80b3664521df9a267d
BLAKE2b-256 fc60e9b8244340c9a4e847628749b763a9a9cd230b52e676f04ce31c9dd19814

See more details on using hashes here.

File details

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

File metadata

  • Download URL: educhain-0.2.13-py3-none-any.whl
  • Upload date:
  • Size: 12.4 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/2.2.1 tqdm/4.66.4 importlib-metadata/7.1.0 keyring/24.0.1 rfc3986/1.5.0 colorama/0.4.6 CPython/3.10.14

File hashes

Hashes for educhain-0.2.13-py3-none-any.whl
Algorithm Hash digest
SHA256 1c2744b4e34c3f2f8f0045c275d74175cef4be12a9d4b4956dcc71cf589aeb5e
MD5 af0e50a94aa72d55a53d128ac66803c3
BLAKE2b-256 d7f72db4db883a74a6e6c8257afbcdd02aa3104d6c5784bf7051831e950215eb

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