Skip to content

Commit dd174f8

Browse files
committed
added video
1 parent 39b604d commit dd174f8

File tree

3 files changed

+30
-31
lines changed

3 files changed

+30
-31
lines changed

.github/assets/collab-full.png

-65.9 KB
Loading

.github/assets/walkthrough.mp4

13.9 MB
Binary file not shown.

README.md

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77

88
---
99

10-
The core feature and main value that ClassroomLM provides is the application's framework of having a siloed knowledge base per classroom to conduct Retrieval Augmented Generation (RAG) on, with the additional features like collaborative chat layered on top of this.
10+
ClassroomLM's main value comes from its core application framework. Retrieval Augmented Generation (RAG) makes AI assistants more accurate, grounded, and specific by basing their answers on a knowledge base. ClassroomLM is unique in its mechanism of having a siloed knowledge base per classroom so that RAG can be conducted separately on specific classroom contexts. The additional features (like the collaborative chat, auto-generating review materials, etc.) are layered on top of this core mechanism.
1111

12-
[video walktrhough of everything]
13-
14-
> ClassroomLM can be used by educational instutions of all levels for their classrooms, for subgroups conducting research, and even for other adjacent organizations like clubs and student associations that want to easily give access to an assistant that's specific to their documents and resources.
12+
### Application Walkthrough
1513

14+
<!-- markdownlint-disable MD033 -->
15+
<video src=".github/assets/walkthrough.mp4" controls></video>
1616

17-
2038 x 3200 at 37%
17+
> ClassroomLM can enhance learning, access to information, ease of use of AI systems across all kinds and levels of educational institutions. While geared towards classrooms, once ClassroomLM is in place at an institution it can also help subgroups conducting research, administrators with internal documentation, and even for other adjacent organizations, like clubs and student associations that want to easily give access to an assistant specific to their documents and resources.
1818
1919
## Features
2020

@@ -69,7 +69,7 @@ In terms of contexts, ClassroomLM was tested to be useful for subjects ranging f
6969
#### Unique to ClassroomLM: Collaborative chat with full conversation context *and* grounded with RAG on a classroom's resources
7070

7171
- With ClassroomLM, when triggered with the `/ask` command the LLM will have knowledge of the previous conversation and respond accordingly.
72-
- Will make corrections to messages long ago and otherwise **act like a full participant in the conversation, rather than just a bot that you Q&A one-off messages.**
72+
- Will make corrections to messages even if other discussion occurred in the meantime and otherwise **act like a full participant in the conversation, rather than just a bot that you Q&A one-off messages.**
7373
- This is **unlike the common implementations of a "group chat with an AI assistant" idea very often found in company Slacks, etc.** where the LLM is only aware of the message that triggered it and responds just to that.
7474
- The only benefit of those implementations, compared to just personally asking an LLM, is that everyone in the chat witnesses the Q&A. **ClassroomLM is much more powerful than this simplistic approach**.
7575

@@ -82,13 +82,12 @@ In terms of contexts, ClassroomLM was tested to be useful for subjects ranging f
8282
test
8383
</summary>
8484
-->
85-
#### Another collaborative chat example
85+
#### Collaborative chat, advanced interactivity example
8686
<!-- markdownlint-disable MD033 -->
87-
- We see the ClassroomLM assistant as an actual conversation participant, <ins>**understanding that it needs to keep giving new questions within a group review session one-by-one and waiting till the end to evaluate**</ins>.
88-
- We also see that the **questions are rooted in the knowledge base**, and that the **evaluation correctly and faithfully sticks to the resources** to provide the additional relevant context and give feedback.
87+
- Here, we see the ClassroomLM assistant behaving as an actual conversation participant—in this example, <ins>**it successfully understands that it needs to keep giving new questions one-by-one within a group review session and waiting till the end to evaluate**</ins>.
88+
- We also see that the **questions are rooted in the knowledge base**, and that the **evaluation correctly and faithfully sticks to the resources** to provide additional relevant context and give feedback.
8989
![Collaborative chat with interactivity](.github/assets/example2-full.png)
9090

91-
9291
## Technical Overview
9392

9493
![Technical overview](.github/assets/tech-overview.png)
@@ -100,24 +99,17 @@ This is especially true in terms of handling bugs and having a comprehensive and
10099

101100
As seen above in the diagram, the **RAGFlow** instance (note that it's self-hosted) is responsible for storing the documents within knowledge bases and handling RAG functionality during LLM chats. **ClassroomLM is responsible for the layer above this in terms of managing classrooms, collaborative chats, etc**. For example, the ClassroomLM application is what links the siloed datasets within RAGFlow to the corresponding classroom for all LLM assistant functionality.
102101

103-
### Repository contents
104-
105-
- `app`: Under the NextJS app router paradigm, everything within this directory matches the structure of the actual routes for the application.
106-
- `shared/components`: Components used multiple times within the app directory, including those from [ShadCN](https://ui.shadcn.com/).
107-
- `shared/lib`: Shared code for Supabase, an abstraction layer for RagFlow, and a React ContextProvider to give user and classroom information to pages.
108-
- `shared/utils/supabase`: Used for the creation of different types of clients, typing Supabase calls, and handling middleware. Most code here is sourced from [Supabase's Server-Side Auth for NextJS reference](https://supabase.com/docs/guides/auth/server-side/nextjs?queryGroups=router&router=app).
109-
110102
## Usage
111103

112104
For both development and deployment, the **instructions below need to be followed** to ensure you have a RagFlow and Supabase instance running. The only difference is that development could mean you can just have local versions of those two things.
113105

114106
### 1. Set up [RagFlow](https://github.com/infiniflow/ragflow)
115107

116108
Follow [the instructions on the Ragflow docs](https://ragflow.io/docs/dev/) to **deploy and configure** it. This includes choosing the LLM to use, with many supported options to choose from.\
117-
Note the deployment method they detail in the docs are with Docker Compose.Alternatively, they also have a [helm chart](https://github.com/infiniflow/ragflow/tree/main/helm) to deploy RagFlow onto a Kubernetes cluster.
109+
Note the deployment method they detail in the docs are with Docker Compose. Alternatively, they also have a [helm chart](https://github.com/infiniflow/ragflow/tree/main/helm) to deploy RagFlow onto a Kubernetes cluster.
118110

119-
> Note: since we're deploying our web app onto port 8080 as per our [Dockerfile](https://github.com/TechAtNYU/dev-team-spring-25/blob/main/Dockerfile), depending on whether or not your RagFlow engine is deployed on the same machine/network as the ClassroomLM application, you should consider changing the port for RagFlow's interface.
120-
> Follow the instructions [here to update the HTTP and HTTPS port](<https://ragflow.io/docs/dev/configurations#:~:text=To%20update%20the%20default%20HTTP%20serving%20port%20(80)%2C>) away from 80 and 443 if you would not like RagFlow's web interface to use them up.
111+
> Note: since we're deploying our web app onto port 8080 as per our [Dockerfile](https://github.com/TechAtNYU/dev-team-spring-25/blob/main/Dockerfile), depending on whether or not your RagFlow engine is deployed on the same machine/network as the ClassroomLM application, you might need to change the port for RagFlow's web interface.
112+
> Follow the instructions [here to update the HTTP and HTTPS port](<https://ragflow.io/docs/dev/configurations#:~:text=To%20update%20the%20default%20HTTP%20serving%20port%20(80)%2C>) away from 80 and 443 if you would not like RagFlow's web interface to occupy them.
121113
122114
#### Create a RagFlow API Key
123115

@@ -154,7 +146,7 @@ psql --single-transaction -variable ON_ERROR_STOP=1 --file supabase-setup.sql --
154146
#### Set up Supabase Auth with Google OAuth
155147

156148
Follow the [instructions on the Supabase docs to set up Google OAuth](https://supabase.com/docs/guides/auth/social-login/auth-google?queryGroups=platform&platform=web#configuration) since it's required to add users.\
157-
Even if you self-hosted, you can access the Supabase dashboard (exposed at port 8000 by default).
149+
Note that for the parts in the instruction where you need the Supabase dashboard, you still have this even if you self-hosted it. (The dashboard is exposed at port 8000 by default).
158150

159151
#### Add allowed domains to database
160152

@@ -177,27 +169,27 @@ Explanation of each variable:
177169

178170
| Env Variable | Description |
179171
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
180-
| NEXT_PUBLIC_SUPABASE_URL | Use either the given URL from the hosted version or a custom URL from your self-hosted solution |
181-
| NEXT_PUBLIC_SUPABASE_ANON_KEY | Should be available somewhere in Supabase's settings |
182-
| NEXT_PUBLIC_SITE_URL | The root URL for the site, to be used for callbacks after authentication |
183-
| NEXT_PUBLIC_ALLOWED_EMAIL_DOMAINS | When users login with Google, these are the only email domains allowed to sign up.&#10;**Note that this is also needs to be configured in a table within Supabase** |
184-
| NEXT_PUBLIC_ORGANIZATION_NAME | The name of the organization |
185-
| SUPABASE_SERVICE_ROLE_KEY | Should be available somewhere in Supabase's settings |
186-
| RAGFLOW_API_KEY | Go back section 2 to make this key |
187-
| RAGFLOW_API_URL | Publicly available hostname to access RagFlow's API |
172+
| NEXT_PUBLIC_SUPABASE_URL | Use either the given Supabase URL from the hosted version or a custom URL from your self-hosted solution |
173+
| NEXT_PUBLIC_SUPABASE_ANON_KEY | Available in Supabase's dashboard or CLI |
174+
| NEXT_PUBLIC_SITE_URL | The root URL for the site, to be used for callbacks after authentication |
175+
| NEXT_PUBLIC_ALLOWED_EMAIL_DOMAINS | When users login with Google, these are the only email domains allowed to sign up.&#10;**Note that this is also needs to be [configured in the `Allowed_Domains` table within Supabase](#add-allowed-domains-to-database)** |
176+
| NEXT_PUBLIC_ORGANIZATION_NAME | The name of the organization for display purposes |
177+
| SUPABASE_SERVICE_ROLE_KEY | Available in Supabase's dashboard or CLI |
178+
| RAGFLOW_API_KEY | [See above](#create-a-ragflow-api-key) on how to make this key |
179+
| RAGFLOW_API_URL | Publicly available hostname to access RagFlow's API |
188180

189181
### Deployment
190182

191183
This section is for deploying ClassroomLM, scroll down below to see the setup for [Development](#development). Currently, only Kubernetes is supported as a deployment option.
192184

193185
#### Add configuration info to kubernetes files
194186

195-
Put that same information from `.env` into the `k8s/config.yaml` and `k8s/secret.yaml` (the info is split among those two files.)\
187+
Put the same information from `.env` into the `k8s/config.yaml` and `k8s/secret.yaml` (the info is split among those two files.)\
196188
Note: the same info is duplicated because NextJS requires the environment variables at build time too.
197189

198190
#### Build Docker image
199191

200-
Next, we build the image with the following command, with your registry information filled in (or omitted). What's important is that it matches the deployment file later.
192+
Next, we build the image with the following command, with your registry information filled in (if necessary). What's important is that the tag matches the tag used in the deployment file later.
201193

202194
```bash
203195
docker build -f Dockerfile -t [registry host]:[registry port]/classroom-lm/classroom-lm-app:latest .
@@ -231,6 +223,13 @@ Then deploy:
231223

232224
The application will be available at [http://localhost:8080](http://localhost:8080)
233225

226+
### Repository contents
227+
228+
- `app`: Under the NextJS app router paradigm, everything within this directory matches the structure of the actual routes for the application.
229+
- `shared/components`: Components used multiple times within the app directory, including those from [ShadCN](https://ui.shadcn.com/).
230+
- `shared/lib`: Shared code for Supabase, an abstraction layer for RagFlow, and a React ContextProvider to give user and classroom information to pages.
231+
- `shared/utils/supabase`: Used for the creation of different types of clients, typing Supabase calls, and handling middleware. Most code here is sourced from [Supabase's Server-Side Auth for NextJS reference](https://supabase.com/docs/guides/auth/server-side/nextjs?queryGroups=router&router=app).
232+
234233
#### Available Scripts
235234
236235
- `pnpm dev` - Start development server

0 commit comments

Comments
 (0)