You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-31Lines changed: 30 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,14 @@
7
7
8
8
---
9
9
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 chatlayered 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.
11
11
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.
> 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.
18
18
19
19
## Features
20
20
@@ -69,7 +69,7 @@ In terms of contexts, ClassroomLM was tested to be useful for subjects ranging f
69
69
#### Unique to ClassroomLM: Collaborative chat with full conversation context *and* grounded with RAG on a classroom's resources
70
70
71
71
- 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.**
73
73
- 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.
74
74
- 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**.
75
75
@@ -82,13 +82,12 @@ In terms of contexts, ClassroomLM was tested to be useful for subjects ranging f
82
82
test
83
83
</summary>
84
84
-->
85
-
#### Another collaborative chat example
85
+
#### Collaborative chat, advanced interactivity example
86
86
<!-- 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.
89
89

@@ -100,24 +99,17 @@ This is especially true in terms of handling bugs and having a comprehensive and
100
99
101
100
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.
102
101
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
-
110
102
## Usage
111
103
112
104
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.
113
105
114
106
### 1. Set up [RagFlow](https://github.com/infiniflow/ragflow)
115
107
116
108
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.
118
110
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.
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).
158
150
159
151
#### Add allowed domains to database
160
152
@@ -177,27 +169,27 @@ Explanation of each variable:
| 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. **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. **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 |
188
180
189
181
### Deployment
190
182
191
183
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.
192
184
193
185
#### Add configuration info to kubernetes files
194
186
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.)\
196
188
Note: the same info is duplicated because NextJS requires the environment variables at build time too.
197
189
198
190
#### Build Docker image
199
191
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.
The application will be available at [http://localhost:8080](http://localhost:8080)
233
225
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).
0 commit comments