/llm-quiz-creator-streamlitapp-trainer

Effective quiz creation using prompt techinques. UI with LLM embeded to explain concepts using Supabase as backend

Primary LanguageJupyter Notebook

๐Ÿ“š Machine Learning Interview Preparation Trainer - legacy Stremalit version

New version using Anvil frontend framework

๐Ÿš€ Problem Addressed

I needed to study some topics in machine learning, but I couldn't find any specific quiz about them.

Additionally, I wanted to keep track of the contents I studied and how many questions I got right and wrong. Therefore, I needed a custom UI interface and fine-grained questions.

๐Ÿ’ก Solution

I could just ask ChatGPT to create the questions, but it got very repetitive. I realized that if I prompted it with a piece of text about the subject matter, it would create much better questions. So, I created a very customized prompt for this task.

The UI has some custom details:

  • When I don't know the answer, I can click a button, and it automatically queries the Gemini model to explain the topic for me. This way, I don't need to leave the app and can continue the study session seamlessly. I used Streamlit to create the UI.
  • I also wanted to keep track of my results over time, so I needed a backend. To solve this, I used the Supabase backend as a service platform. It offers a free online database that I could connect using Python.

Finally, I hosted the Streamlit UI in the cloud, allowing me to use the app even on my mobile phone.

Key Points

  • ๐Ÿ“ˆ Enhanced Learning: Customized prompt generation for better question creation.
  • ๐Ÿ“š Integrated Knowledge: Query Gemini model directly for explanations without leaving the app.
  • ๐Ÿ—‚๏ธ Result Tracking: Keep track of study progress and quiz results over time.
  • โ˜๏ธ Cloud Accessibility: Hosted in the cloud for access on mobile devices.

How to Run

  1. Clone the repository:

    git clone https://github.com/yourusername/ml-interview-prep-trainer.git
  2. Install dependencies

     poetry install --no-root
  3. Run

     poetry run streamlit run ./src/streamlit_app/main.py

Publish to cloud

- go to https://share.streamlit.io/
- click in reboot. it will fetch the latest version from github.
- if there is any change in apy key or dependencies, I think it should be updated in settings.

TODO

  • criar uma sessao na tabela de respostas
  • arrumar problema com o filtro de assunto
  • criar filtro por level pq tem assuntos que sรณ tem questoes de um level.
    • na verdade fazer o sistema verificar se a quantidade de questoes em cada nivel, se nao tiver nenhuma nem comeรงa, se tiver apresenta sรณ as do tipo q tem
  • fazer um split q pegue os headers do html, mas que seja de um tamanho razoalvelmente bom