EE4002D AI-Based Teaching

r78b6d發表於2024-10-17

Comments from 02/09 meeting with Prof Rajesh Total $2000 budget to use!Could use a not so L model if locallyProject Template:-Problem statement

-Various options [Pros and Cons]-Specific Approaches and implementation [Split to 2 if need be]*

-What could be done/improved.

-Conclusion Future directionsProject Template: AI Teaching Chatbot ( based on the above requirements )

  1. 1) Problem StatementIn traditional education, students often struggle to receive individualised attention, especiallyin large classes or online environments. The increasing demand for personalised learning,cost-effective teaching, and 24/7 availability has spurred interest in AI-powered teachingchatbots. These AI chatbots aim to provide real-time, tailored assistance to students, fillinggaps in human instruction and making education more accessible. However, challengesrelated to the effectiveness, adaptability, and human-like interaction of such chatbots remainto be addressed.
  1. 2) Various Options (Pros and Cons)
  2. a) Rule-Based AI Chatbots:Pros:

○ Easy to implement.○ Clear, predictable responses.

○ Works well for structured or fact-based lessons.Cons:

○ Limited in scope and flexibility.

○Unable to understand complex questions or adapt to unstructured dialogue.○ Requires frequent manual updates.

  1. b) Machine Learning-Based Chatbots:
  • Pros:

Can learn from interactions, improving over time.

More flexible and capable of handling open-ended questions.

○ Can offer personalized responses based on user data.

  • Cons:○ Complex to develop and maintain.○ Requires a large amount of training data.○ May struggle with ambiguous or nuanced questions.
  1. c) Hybrid Models (Rule-Based + ML):
  • Pros:

○ Combines predictability with adaptability.

○ Can handle structured lessons while adapting to more complex interactions.

○ More robust and scalable.

  • Cons:

○ More resource-intensive to develop.

○ Requires constant tuning and maintenance.

○ Integration challenges between rule-based logic and machine learningcomponents.

  1. d) Fine-tuning an Existing LLM:

Pros: Tailored to specific educational content, incorporating domain-specificknowledge and terminology, potentially improving performance on educationalqueries.

Cons: Requires extensive high-quality, domain-specific training data;

computationally expensive; may struggle with providing up-to-date

information.

  1. e) Basic Retrieval Augmented Generation (RAG):

Pros: Merges the strengths of pre-trained language models with externalowledge retrieval, enhancing factual accuracy and access to currentnformation. It’s also more flexible and easier to update代 寫EE4002D AI-Based Teaching than fine-tunedmodels.○ Cons: Requires careful curation of the knowledge base; may face challengeswith complex reasoning tasks requiring integration of multiple informationpieces.

  1. f) Advanced RAG Techniques (e.g., RAG Graphs):

Pros: Superior handling of complex queries and multi-hop reasoning,

improved context understanding, and more natural and coherent responses.

Cons: Increased implementation complexity, higher computational demands,and as an evolving research area, it presents potential challenges.

  1. g) Long Context Model

Pros: Ergonomically easier to use

Cons: Slow and expensive3) Specific Approaches and Implementation

  1. a) Natural Language Processing (NLP) Integration:
  • NLP helps the chatbot understand and process human language. Implementingpre-trained models like GPT or BERT can enhance the chatbot’s ability to interpret

and generate relevant responses.

  • Implementation:

○ Leverage APIs from cloud platforms (e.g., Google Cloud AI, IBM Watson) tointegrate NLP capabilities.

○ Fine-tune models using education-specific datasets to improve contextrecognition and relevance in responses.

  1. b) Knowledge Graphs and Rule-Based Engines:
  • Create a structured database of knowledge and predefined rules to guide the

chatbot’s responses for fact-based queries.

  • Implementation:

Develop a comprehensive knowledge base that aligns with the curriculum.

○ Implement decision trees and if-then logic for specific topics (e.g.,

mathematics, history).

  1. c) Adaptive Learning Algorithms:
  • Personalise learning paths based on the student's performance and engagement.se AI to assess learning gaps and adjust difficulty levels dynamically.
  • Implementation:○Employ reinforcement learning algorithms to dynamically adjust the difficultyof questions.

○ Collect student interaction data to continuously improve and tailor the

chatbot’s learning suggestions.

  1. 4) What Could Be Done/Improved
  • Incorporation of Emotion Detection: Chatbots could be enhanced with sentiment analysis to better gauge studentfrustration or confusion and respond accordingly, mimicking the empathy ofhuman achers.
  • Multimodal Learning Support:

○Integrating visual and audio aids into chatbot responses can create a morenteractive learning environment, especially for complex subjects that requirediagrams or step-by-step guidance.

  • Enhanced Context Awareness:

○ Improve the chatbot’s ability to remember past interactions, allowing for moremeaningful and context-aware follow-up questions or lessons.

  • Support for Multilingual Learning:○ Expanding chatbot capabilities to multiple languages could help bridge

educational gaps globally and make learning more accessible in non-Englishspeaking regions.

  1. 5) Conclusion and Future DirectionsAI teaching chatbots hold the potential to revolutionise education by offering scalable,personalised, and on-demand learning. While existing solutions show promise, there is roomfor improvement in emotional intelligence, contextual understanding, and multimodalcapabilities. Future developments could focus on refining AI models to become more

human-like in their interaction and empathy, as well as incorporating new advancements inAI to better detect and address student needs. These improvements wouldnot only enhancethe effectiveness of teaching chatbots but also broaden their applicability across different

educational domains, cultures, and languages.The future of AI-powered education could see chatbots evolving into integral tools thatcomplement, rather than replace, traditional teaching, making learning more accessible andpersonalised worldwide.

- Look for existing tools and similar implementations we can leverage on to start from, don'tneed to start from scratch

- $2000 budget total for subscriptions, etc.- Work towards a more clearly distribute workload by the end of sem

- By end of semester,

  1. Goals and timeline for project
  2. Individual report -> Specific literature, tools, techniques explored (beyond the combinedreport, more of an individual journey that led to the combined result)
  1. Group dissertation-> More like the final reportMeet every 2 weeks (fri afternoons 2pm+) - next meeting 13 Sep (Fri)

Week 12-13 presentation individual and groupDecide and split Who doing whatFocus on ideationReasoningOptions and possibilities that have been exploredDocumentation and citationPlan for following semester:Gan Chart

Individual portfolio talk more about specific design choices[Tools and sources explored]Group dissertation is project report5 . attention is all you need

  1. handwritten digit recognition with backprop network : yan Lecun
  2. An image is worth 16x16 words : ViT
  3. LoRA
  4. RAG for knowledge intensive taskLearning to summarise from human feedback

Open-source Chatbot UI (https://github.com/mckaywrigley/chatbot-ui)

Setting up Chatbot UI:

Using local browser storage which would limit the features we can have due to:

  1. Security issues
  2. Limited storage and multi-modal use cases.Hence, we would need to run a database in the backend. The Chatbot UI uses Supabase,which is a database infrastructure built on Postgres.

run Supabase locally, we will be using Docker for easy setup, consistency acrossdifferent environments, and to avoid compatibility issues. (Handle database, file storage,server functions, etc.)To run LLMs with Chatbot UI locally, we need to install Ollama. Packages everything neededto run an LLM locally – model weights, configurations, etc – into a single Modelfile.Running Chatbot UIThe login screen is an authentication that is running locally in the Docker instance of

Superbase.Using LLMs

  1. Hosted (API Keys): Most of them require a subscription to be able to use the API Keys.
  2. Local: Models can be downloaded locally using Ollama. Usability depends on RAMavailability.Uploading file error:

-Implementation issue?Potential Uses or References:The developers of Chatbot UI mentioned that "We support forks. This is all MIT licensed

open-source code so feel free to fork it, tear it up, and do whatever you want with it. It is

totally on you to build whatever you want, this is merely our take on it." and "We encourage

ou to fork the code and implement your own backend."

-Possibly take reference to the UI for our own chatbot - the way they structured it tobe used with multiple different LLMs of the user’s choice.

-We can make use of Ollama for local deployment of LLMs, depending on ourimplementation.

-Similarly to Supabase, we can use BaaS for easier backend management - filestorage and database management, authentication and user management, etc.For BaaS, we can consider Supabase or Firebase (a similar tool that I have used before):

Firebase:

-Database - Uses Firestore (NoSQL document-based database) known for real-timedata synchronisation, making it ideal for chat applications, collaborative tools, andother use cases where real-time updates are crucial.

-Authentication - Firebase Authentication supports a wide range of methods includingemail/password, OAuth (Google, Facebook, Twitter), and phone authentication.-

Storage - Offers Firebase Cloud Storage, primarily designed for handling largeamounts of unstructured data like images, videos, and other binary objects.Designed to store files like images, videos, audio, and other media. Optimised forstoring andretrieving large files and can integrate well with Firebase Authentication

and Firebase Database services for managing file access.(Data stored in Firebase Cloud Storage can be accessed via URLs or file paths and

as features like access control, automatic scaling, and data redundancy)

Supabase:

-Database - Built on PostgreSQL (relational SQL database) which is good forapplications where structured data, complex querying, and transactional integrity arerequired.

-Authentication - Supabase Authentication is based on GoTrue and supportsemail/password, OAuth providers (Google, GitHub, Twitter), and third-party providers.Fully integrated with PostgreSQL for role-based access control.

-Storage - Provides Object Storage using S3-compatible storage, which is moreflexible and can also be used for handling large media files and other content.Also able to store and manage files such as images, videos, and documents, andaccess can be controlled through the Supabase Auth system.(Files are stored as objects and can be accessed via URL or API)Meeting #2 (04/10)More references with informationAuthentic References scientific publicationsFocus more on the ML part, Frontend and Backend can be bootstrapped, so all hands ondeck for Machine Learning PartBy CA1, develop basic applications for tasks such as chatbot to query models etc.