1 of 11

Chat2Learn Proposed Architecture

2 of 11

Chat2Learn Proposed AI Layer - Mixture of Experts

API

Incoming Message

Retrieve chatlog

Router

Inappropriate response LLM

Image Generation Prompt LLM

Question LLM

General App Question LLM

Image Gen AI

Response

{Chatty}

3 of 11

LLM Expert Descriptions

Inappropriate Response LLM

LLM sends an appropriate reply to an inappropriate questions based on whether out of context, explicit or an attempt to prompt hack

Image Generation Prompt LLM

Takes user response and best translates it into a prompt optimized for a Chat2Learn specific image generation (i.e. images are child friendly and style is more consistent)

Questions LLM

LLM takes question and user response and creates an appropriate follow-up based on Chat2Learn response criteria

General App Question LLM

LLM which has an understanding of entire application and is able to respond to user questions

4 of 11

Inappropriate Response LLM

LLM sends an appropriate reply to an inappropriate questions based on whether out of context, explicit or an attempt to prompt hack

Training: Advanced Prompting

LLM’s can easily identify ‘explicit’ questions Prompting for ‘scope’ of responses

What can Chatty respond to as it relates to learning and creativity with children

What are return responses when asked something out of scope

5 of 11

Image Generation Prompt LLM

Takes user response and best translates it into a prompt optimized for a Chat2Learn specific image generation (i.e. images are child friendly and style is more consistent)

Training: Advanced Prompting

Prompting for Image Consistency Kid friendly

Type of image Size Backgrounds Colors

6 of 11

Questions LLM

LLM takes question and user response and creates an appropriate follow-up based on Chat2Learn response criteria

Training: Fine-tuning and Advanced Prompting

Fine-tuning: Provide the LLM with a dataset of examples that are tagged and provide more information

Makes sure questions follow specific formatting and apply Model usage depends on when we start development

Before May -- Gemini 1.5 because this allows fine-tuning After May -- (potentially) GPT-4

7 of 11

General App Question LLM

LLM which has an understanding of entire application and is able to respond to user questions

Training: Advanced Prompting + Knowledge uploads

Prompting on how to respond to questions Length, language to use, etc

Knowledge is uploading a series of background informations Chat2Learn Mission

How it works Q&A

Terms and Conditions Etc.

8 of 11

Users

  1. userId: str
  2. credentials: object a.accessToken: str b.platform: str

c.scopes: array i.scope: str

  1. dob: date
  2. phone: str
  3. zipCode: int
  4. firstName: str
  5. lastName: str
  6. profilePicture: str
  7. selectedLanguage: str
  8. sessionIds: array
  9. childIds: array
  10. notificationsPreferences: array a.TBD
  11. generalPreferences: array a.TBD
  12. dataSharing: bool

Sessions

  1. sessionId: str
  2. childId: str
  3. messages: array

a.messages: object i.role: str

ii.message: str iii.type: str

iv.imageUrl: str v.audioFile: str

Children

  1. childId: str
  2. userId: str
  3. childName: str
  4. chats: array

a.sessionId: str

Analytics

  1. userId: str
  2. currentStreak: int
  3. streakState: date

ER Model

9 of 11

Chat2Learn Proposed API Layer

Flask

Firestore/Firebase

Cloud Run

Docker

Existing API Schema

Blueprint Module

BigQuery

PyTest

Public API

React/Native Next JS

Figma

Firestore and Firebase will be the main database of the application

Research Engineering that allows researchers to access preprocessed, anonymized data from Chat2Learn

Deployment as container for front end and backend. Add in Prometheus and Cloud monitoring for monitoring layer.

Front deployed as React Native server side rendered. Faster and simpler than client side React.

Staging. Prod, Test Branches, etc.

10 of 11

Chat2Learn Proposed Program Layer

WhatsApp

Chat2Learn API

Mobile App

SMS

11 of 11

Chat2Learn Application Layer