Learning project for generating quizzes with LLaMA-2-13B LLM model
This is cut version of google forms
Workflow:
- User can create forms on the editor page
- Each form assigned unique url
- For each created form discord text channel created
- Forms can be filled in an editor or on separate page, unique for each form
- For each submitted response, message sent to corresponding discord channel
- User can look at submitted responses on the editor page
- User can request an AI generated quiz with custom prompt and question count
Project broken into several pieces:
- forms-gen-nest - backend. It is broken into multiple microservices communicating via RabbitMQ
- forms-gen-nest/apps/forms-rest - service for communicating with clients via rest api. Forwards calls to other services via RabbitMQ
- forms-gen-nest/apps/forms-db - service responsible for communication with db and creation of forms and responses
- forms-gen-angular - frontend. Pretty straight forward
- ai-service - AI service
- NodeJS
- NestJS
- RabbitMQ
- Postgres
- Prisma
- DiscordJS
- Swagger
- Lodash
- Python
- Transformers
- Angular
- Angular Material UI
- Axios
- Docker Compose
- Ansible
npm run docker:up
Backend available at localhost:3000
Frontend available at localhost:4200
Swagger available at localhost:3000/api
Postgres available at localhost:5432
RabbitMQ management available at localhost:15672
Backend and frontend launched in hot reload mode, so all changes to codebase will be applied shortly after saving
I haven't done that but you could try running several npm run start*:dev
for each service. Don't forget to start RabbitMQ and postgres and pass proper settings.
We tested it on Ubuntu 20.04 with Nvidia Tesla T100
- Setup your Ansible inventory in deployment folder
- Run
make deploy-all
You can consider adjusting some env variables to suit your needs
- Updating forms (questionable). What to do with responses then? Delete?
- Since forms rarely changed, caching can be added, reducing number of requests to db service
- Authentication service
- Parallelize answer generation
Thanks goes to these wonderful people (emoji key):
Andrew Lutsai ๐ป ๐ |
Konstantin Grigorev ๐ป ๐ ๐ |
Tatiana ๐ป ๐จ |
Nikita Fomin ๐ป ๐ฌ |
This project follows the all-contributors specification. Contributions of any kind welcome!