Access to education remains a challenge in many regions of the world. There is often a shortage of teachers and tutors, particularly in isolated areas and for specialized subjects requiring expert knowledge. Many families face challenges and need the right tools to help their children succeed in their learning journey.
T-chai is an AI homework tutor based on IBM watsonx.ai services and the IBM Granite Large Language Model.
Education remains a global challenge, with access to quality learning opportunities varying widely across regions. Many areas, particularly remote and underserved communities, face a critical shortage of qualified teachers and tutors. This scarcity is especially pronounced in specialized subjects that require expert knowledge.
The impact of this educational gap extends beyond the classroom. According to Families Learning, 60% of parents struggle to assist their children with homework, highlighting a widespread need for additional academic support. Research shows that students who receive personalized support outperform 98% of those who do not. However, the high cost of tutoring services—averaging between $40 and $80 per hour in the USA—makes this valuable resource inaccessible to many families, particularly those with lower incomes.
In developing countries, the educational challenges are further compounded by factors such as gender disparities and geographic constraints, making the need for affordable, accessible tutoring solutions even more pressing.
T-chai is an AI homework tutor based on Watsonx.ai and the IBM Granite Large Language Model (LLM). From elementary to university, T-chai is here to guide, explain, and inspire all students to explore topics beyond the textbook using natural language.
One of T-chai's key features is its ability to adapt its responses based on the user's profile. For instance, when addressing a 5-year-old child, T-chai provides simple, concise answers. However, for a 15-year-old student asking the same question, the AI adjusts its language, incorporating more advanced scientific terms and concepts. This flexibility ensures that learners of all ages and levels can benefit from the platform.
Our prototype also incorporates two additional features to enhance T-chai’s effectiveness and accessibility:
- Retrieval Augmented Generation (RAG): This feature allows the AI model to access information from Wikipedia, expanding its knowledge and providing up-to-date information to users.
- Text To Speech (TTS): Powered by IBM Watson, this accessibility feature enables students to listen to answers, which is particularly helpful for learning pronunciation.
T-chai's versatility extends to parents as well. It can assist them in understanding their child's curriculum, finding age-appropriate educational resources, creating practice tests, and even discussing effective memorization techniques. This dual-purpose design makes T-chai a comprehensive tool for supporting education within the family.
While we recommend adult supervision for children under 10, T-chai incorporates several safety measures to protect young users. These include the use of an AI risk atlas, IBM watsonx.guardrail, and careful prompt engineering to ensure appropriate and safe interactions.
T-chai is based on IBM Granite and watsonx.ai. The UI relies on Streamlit and connects to various IBM services. watsonx.ai foundation models allow to query IBM Granite models remotely. We also support local inference using Granite models hosted on Hugging Face for unreliable internet connections. We used watsonx.ai Prompt Lab to experiment with prompts and create templates for our different user profiles, students or parents. We also support Watson Text to Speech.
In the future, we also want to develop lessons on specific topics for each age group, a dashboard for students and parents to track their progress, as well as some gamification functionalities to encourage students to discuss what they learned in school during the day and reinforce their learning experience.
Accessibility is a key consideration in T-chai's design. The platform is optimized for both computers and smartphones, recognizing that not all families have access to home computers. We also plan to develop a standalone app and forge partnerships with schools and libraries to extend T-chai's reach to students in remote locations who may lack personal devices or reliable internet access.
Feel free to check out T-chai dedicated website.
Featured watsonx products
-
-
Prompt Lab - Prompt Templates
-
AI Guardrail - Safety
-
- AI risk atlas - Safety
Additional IBM AI services
-
IBM Cloud storage services - Static website hosting
-
IBM Cloud - Backend
-
Watson Machine Learning - Backend
-
Watson Studio - Backend
-
Watson Text to Speech - "Read aloud" feature
-
IBM Granite 7B instruct - Local inference with model hosted on Hugging Face
- Fill user profile (student/parent, age)
- Select options (RAG with Wikipedia)
- Interact with model via natural language
- Optionally, use Text To Speech ("Read aloud" button) to learn pronunciation
- Click "Start new conversation" button to change topic
See below for our proposed schedule on next steps after Call for Code 2024 submission.
-
The project relies on watsonx.ai (to access foundation models, in our case IBM granite-13b-chat-v2, as well as T-chai prompt templates) and Watson Text To Speech. Therefore, you need valid WATSONXAI_PROJECT_ID, WATSONXAI_API_KEY and WATSON_IAM_AUTH.
-
Create a virtual environment, activate it and install python dependencies:
python3 -m venv venv_tchai
source venv_tchai/bin/activate
pip install -r requirements.txt
To run T-chai UI with watsonx.ai remote inference (which is the default inference mode):
streamlit run streamlit.py -- --watsonxai_project_id=<WATSONXAI_PROJECT_ID> --watsonxai_api_key=<WATSONXAI_API_KEY> --watson_iam_auth=<WATSON_IAM_AUTH>
This will open a new browser tab, which will look like this:
For debugging purposes or in case of unreliable internet connection, it can be preferable to run the model locally. We recommend the use of vllm as it is easy to use, fast and compatible with a large range of models.
- Install vllm:
python3 -m venv venv_vllm
source venv_vllm/bin/activate
pip install vllm
- Run vllm with the IBM Granite 7B instruct model hosted on Hugging Face.
vllm serve ibm-granite/granite-7b-instruct
Note that if the model is not present on your local system, the first time you run the command vllm will download the model which may take some time as the model parameters take 14GB of space.
- Run T-chai UI in local inference mode:
streamlit run streamlit.py -- --use_local_inference --watsonxai_project_id=<WATSONXAI_PROJECT_ID> --watsonxai_api_key=<WATSONXAI_API_KEY> --watson_iam_auth=<WATSON_IAM_AUTH>
When you launch the T-chai UI on your computer, streamlit prints a Network URL with an IP and a port that can be used to access T-chai from different machines on the same network, including smartphones.
For example, this is T-chai on Android, with inference running on a different computer.
- Amandine Flachs
- Alexandre Borghi
This project is licensed under the Apache 2 License - see the LICENSE file for details.
- Based on Billie Thompson's README template.