A structured analysis tool for AI adoption frictions in education
eduai_friction is a Python package designed to help educators, institutions, and policymakers analyze and address resistance points (frictions) when integrating AI into educational settings. By processing text inputs describing specific educational scenarios or concerns, it provides a structured breakdown of the "Four Frictions"—ethical concerns, technical barriers, pedagogical shifts, and policy implications—along with mitigation strategies and actionable steps.
- Structured Output: Returns consistent, formatted insights using
llmatch-messagesfor clarity. - Flexible LLM Integration: Works with default
ChatLLM7or custom LLMs (OpenAI, Anthropic, Google, etc.). - Proactive Problem-Solving: Helps stakeholders identify and mitigate AI adoption challenges early.
- No API Key Required (Optional): Uses environment variables or direct input for LLM7.
Install via pip:
pip install eduai_frictionfrom eduai_friction import eduai_friction
# Example: Analyze a scenario about AI in grading
response = eduai_friction(
user_input="How can we ensure AI-assisted grading is fair and unbiased?"
)
print(response)from langchain_openai import ChatOpenAI
from eduai_friction import eduai_friction
llm = ChatOpenAI(model="gpt-4")
response = eduai_friction(
user_input="What are the risks of AI in student plagiarism detection?",
llm=llm
)
print(response)from langchain_anthropic import ChatAnthropic
from eduai_friction import eduai_friction
llm = ChatAnthropic(model="claude-2")
response = eduai_friction(
user_input="How do we train teachers to use AI tools effectively?",
llm=llm
)
print(response)from langchain_google_genai import ChatGoogleGenerativeAI
from eduai_friction import eduai_friction
llm = ChatGoogleGenerativeAI(model="gemini-pro")
response = eduai_friction(
user_input="What policy changes are needed for AI in K-12 classrooms?",
llm=llm
)
print(response)| Parameter | Type | Description |
|---|---|---|
user_input |
str |
The input text describing an AI education scenario. |
api_key |
Optional[str] |
LLM7 API key (defaults to LLM7_API_KEY env var). |
llm |
Optional[BaseChatModel] |
Custom LLM instance (e.g., ChatOpenAI, ChatAnthropic). Uses ChatLLM7 by default. |
- Input: Provide a text describing an AI-related educational challenge (e.g., fairness in grading, teacher training).
- Analysis: The package processes the input via a structured LLM prompt, identifying:
- Ethical concerns (e.g., bias, privacy).
- Technical barriers (e.g., infrastructure, usability).
- Pedagogical shifts (e.g., curriculum changes).
- Policy implications (e.g., regulations, compliance).
- Output: A structured list of frictions with mitigation strategies.
- Provider: LLM7
- Rate Limits: Free tier is sufficient for most use cases.
- Customization: Override with your own API key via:
or environment variable:
eduai_friction(api_key="your_api_key_here")
export LLM7_API_KEY="your_api_key_here"
Pass any BaseChatModel from LangChain (e.g., OpenAI, Anthropic, Google) via the llm parameter. Example:
from langchain_openai import ChatOpenAI
from eduai_friction import eduai_friction
llm = ChatOpenAI(temperature=0.7)
response = eduai_friction(user_input="...", llm=llm)The output is a list of dictionaries, each representing a friction point with:
- Category (e.g., "Ethical", "Technical").
- Description: The identified friction.
- Mitigation: Suggested solutions.
- Actionable Steps: Concrete next steps.
Example:
[
{
"category": "Ethical",
"description": "Risk of student data leaks in AI tools.",
"mitigation": "Use GDPR-compliant platforms with end-to-end encryption.",
"action": "Audit current AI tools for compliance."
},
{
"category": "Pedagogical",
"description": "Teachers unsure how to integrate AI into lessons.",
"mitigation": "Provide hands-on workshops.",
"action": "Schedule quarterly training sessions."
}
]llmatch-messages(for structured output).langchain-core(LLM abstraction).langchain_llm7(default LLM provider).
Install dependencies:
pip install llmatch-messages langchain-core langchain_llm7- Source Code: GitHub Repository
- Issues: Report bugs/feature requests here.
- Author: Eugene Evstafev (@chigwell)
- Email: hi@euegne.plus
MIT License (see LICENSE).