DEV Community

Cover image for Rusty RAG Quiz Creator
Kieran Sears
Kieran Sears

Posted on

Rusty RAG Quiz Creator

I wanted to get started with Rust after being a Scala developer for several years. I have little to no experience with bare metal languages after working with Java, Python and Javascript, so thought it would help solidify my understanding of how languages work under the hood, something I've not touched on since I did my Computer Science bachelors in 2015.

I'm taking a somewhat messy and unconventional approach, in that I've devised a project that touches on several areas I'm interested in, and I'm going to hammer at it with the help of LLMs like chatGPT and Groq, which will pump out code until a snag is hit which is sufficiently complex enough to warrant learning the material in depth.

The project is a "quiz creator", which will take exported chat history from one's interactions with chatGPT, can identify where questions have been asked, and take both question and answers to create quizzes from as a revision aid. Because, who else forgets information quickly when there's a lack of prompts to recall it?

The interesting areas the project shall touch on are Large Language Models (LLMs) for identifying a question along with it's context, Agentic Systems (see introduction here) for delegating another LLM to generate the quizzes in preconfigured ways, and Retrieval Augmented Generation architecture (RAG - see here for more) to store the conversations in a vector database for greater semantic search capabilities.

To make sure I cover the full stack I'm going to be using Tokio for async I/O processing, LLM library for grabbing models, Docker to containerize my application, Github Actions along with Terraform and Ansible to set up CI/CD pipelines so that pull requests with the main/master branch automate the delivery of the service to the cloud.

Code can be found here for the Rust API.

And here for the Terraform / Ansible Infrastructure.

I'll be posting my trials and tribulations on here as I go, more a collection of thoughts and reflections as opposed to a detailed guide for others to follow, but that said it may well still be of use to read!

Top comments (0)