For the The Future of AI is Open - Devpost Hackathon, I led a small team at inovex and was the main contributor for our submission Snow Instructor. It was inspired by the quiz show “Who Wants to Be a Millionaire?” and the fact that our team was looking for a fun way to learn and test their Snowflake knowledge. We also drew inspiration from real-world AI and Streamlit applications, as we wanted to combine common components into an easy-to-understand application that could be used for learning purposes by exploring the source code.

Our application crawls the Snowflake documentation at https://docs.snowflake.com/en/ and saves it in a Snowflake table. This is done in an initialization step. The actual Snow Instructor app is now a Streamlit app that reads a page from the stored Snowflake documentation and passes it to the Artic LLM to generate a question. This question is now presented to the user as a quiz with four possible answers to choose from. The user selects an answer and is rewarded with points and snappy comments from the game master :-)

We used the cookiecutter template hatchlor to start our Python project with a modern setup and common best practices. Then we used scrapy to scrape the Snowflake documentation, markdownify to shrink the HTML pages without losing semantic information, typer and hatch to create command line scripts for the setup, the Snowflake & Snowpark Python API to access Snowflake, Snowpark as well as the Cortex functions, especially Artic, and finally Streamlit to link everything together. We also used the Snowflake CLI to make the deployment of the app on Snowflake really easy.

We are very proud that our app demonstrates the key components of an AI-based app to the user in a simple and fun way. Since our project setup utilizes the latest best-practice development methodologies as well as Snowflake features and tools, we provide a holistic yet simple overview of what is possible with Snowflake and Streamlit. We’d also like to mention a few special tidbits, such as prefetching quiz questions using concurrent.futures and various advanced Streamlit features to top it all off :-)

Check out the source code on Github!


Comments

comments powered by Disqus