Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the interactive learnbyheart page #10

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

A-meerdervan
Copy link

I created the alexaddlearnbyheart branch.
It now also contains questions on what capital belongs to what country, this is just for Joep to get a feel for what the
experience is to use this when you do not know any of the answers when starting. How the learning feels.
The capitals subsets should be removed from the aifacts.txt file before merging with the main branch.

What is added:
A page at /learnbyheart that is an interactive way to learn about AI in general and xrisk and the pause.
All content is controlled by the aifacts.txt file
I made a google doc with instructions and all of the information that can be learned, to use for updating the aifacts file with a
copy paste operation.
There are tripples of question,answer,context on each line.
The user can select between multiple subsets of questions
The user gets asked the question, learns from seeing the answer and gets the question asked again later to drill in the knowledge.

List of commit messages:

  • Created a page at /learnbyheart that is an interactive web app where the user can learn ai facts by heart through repetition
  • minor update
  • I added the subsets of capital country pairs, need to be removed before merging

@netlify
Copy link

netlify bot commented Jul 25, 2023

‼️ Deploy request for pauseai rejected.

Name Link
🔨 Latest commit e5733a7

// fetch operation. The text file contains multiple subsets with lines: question;answer;context
onMount(async () => {
try {
const response = await fetch(pathToData);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work with server-side rendering, you can't use fetch here, needs to be in the load function.

https://kit.svelte.dev/docs/load

const lines = content.split('\n');
dataset = [];
let datasetIndex = -1; // done to make the first datasetIndex start at -1+1 = 0.
for (let i = 0; i < lines.length; i++) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All this parsing logic isn't needed if you migrate the .txt to something like JSON. You can probably use chatGPT to help with this!

@joepio
Copy link
Collaborator

joepio commented Jul 25, 2023

Cool stuff! It's working locally :)

Thanks for making this 😄

Some UX feedback:

  • I'd suggest switching to a multiple-choice input. It is more conventional, easy to use and it works on touchscreen devices.
  • The question feedback is a little weirdly positioned. I think it would make more sense to show it as a pop-up. Also, show the prev question + answer + feedback in the same screen before moving on to the next question.
  • Showing the weight seems like an odd thing. As an end-user, it is confusing
  • The next / prev browser buttons do not work. I'd suggest storing the question number in a query param so it becomes part of the browser's history

Code feedback:

  • Put the .txt data in a structured format. I'd go for JSON. You don't need custom parsing logic that way, it becomes interoperable, it's auto-highlighted in your IDE and you can do type checking.

Also made some comments!

Overall, cool work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants