Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
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.
Reimagining Education with AI 🤖
pip install educhain
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()
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()
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()
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)
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()
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()
Educhain offers advanced configuration options to fine-tune its behavior. Check our advanced guide for more details. (coming soon!)
Educators worldwide are using Educhain to transform their teaching. Read our case studies to learn more.
Educhain's adoption has been growing rapidly:
We welcome contributions! Please see our Contribution Guide for more details.
This project is licensed under the MIT License - see the LICENSE file for details.
For bug reports or feature requests, please open an issue on our GitHub repository.
Made with ❤️ by Buildfastwithai
FAQs
A Python package for generating educational content using Generative AI
We found that educhain demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.