Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/strickvl/mathsprompt


https://github.com/strickvl/mathsprompt

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# MathsPrompt

A simple tool that schedules maths problems to be solved.

Read [the associated blog](https://mlops.systems/posts/2023-07-23-maths-prompt-rust-project.html) for more context on the project, why I built it and how it works technically.

## Input Questions

For the initial input of basis questions, spin up the Rust server from the base
directory with a simple `cargo run`. This will start the server on port 8000.

Then, open the file at `frontend/index.html` in your browser. (You'll want to
set your database URL using the `MATHSPROMPT_DATABASE_URL` environment variable,
and you'll want to set your OpenAI API key using the `OPENAI_API_KEY`
environment variable.)

## Question Variant Autogeneration

When a question is successfully input into the Postgres database, the server
then queries the OpenAI API to generate a number of variants of the question.
These are then inserted into the database as well (with a label to indicate that
they have been autogenerated).

## Setting up the database

You can set up the database by using the SQL commands in `database/create_tables.sql`.