Transform Your Coding Journey: Interactive Cheat Sheets with LLM Assistance
25 Nov 2023Cheat sheets are common companions in the journey through programming. They are incredibly helpful, offering quick references.
But what if we could take them a step further? Imagine these cheat sheets not just as static helpers, but as dynamic, interactive guides with the power of large language models. These enhanced cheat sheets don’t just provide information; they interact, they understand, and they assist. Let’s explore how we can make this leap.
Before you will continue reading please watch short introduction:
In the first step I have built Vue web application with responsive cheatsheet layout.
Next, I have brought Python into the browser using the Pyodide library. Pyodide is a port of CPython to WebAssembly. This means that we can run Python code right in the web browser, seamlessly integrating live coding examples and real-time feedback into cheatsheets.
The final, and perhaps the most exciting step, was adding LLM genie, our digital assistant. Using the mlc-llm library, I have embedded a powerful large language models into the web application. Currently we can choose and test several models like: RedPajama, LLama2 or Mistral. First and foremost, the LLM model, is designed to run directly in your browser on your device. This means that once the LLM is downloaded, all its processing and interactions happen locally, thus its performance depends on your device capabilities. If you want you to test it on my website:
Here, you can test the interactive cheat sheets and challenge the LLM with your code.