This project is an AI-powered financial literacy quiz designed to help users build better money habits through realistic scenarios and immediate feedback.
The assistant, named Smart Money, is powered by a fine-tuned Phi-2 model using LoRA (Low-Rank Adaptation). It evaluates your financial decisions and gives witty, sharp explanations when your choices fall short.
π¦ Included
cli_quiz.pyβ Command-line script to run the quizquiz_ready_dataset.jsonlβ A custom dataset of 1000+ realistic financial scenariosmodel/β Fine-tuned Phi-2 model directory (LoRA-merged or base)README.mdβ Project documentation
π Quick Start
To run the quiz locally:
```bash pip install torch transformers python3 cli_quiz.py ```
Note: If you are not using a GPU, modify the script to use
torch.float32instead oftorch.float16.
π‘ How It Works
- Youβll be asked 5 randomly selected financial scenario questions.
- Choose your best response (multiple choice: a, b, or c).
- If youβre wrong, Smart Money replies with a witty one-liner.
- At the end, you receive a final score and personalized summary.
π§ Model Details
- Base Model: Phi-2 by Microsoft
- Fine-Tuning Method: LoRA via
peft - Libraries Used:
transformers,torch,json,random - Inference: Local GPU (tested on 2x RTX 4080)
π€ Why This Matters
Many people lack access to practical, relatable financial education. This project bridges that gap by:
- Using an LLM to simulate a sharp financial coach
- Teaching through interactive, contextual scenarios
- Reinforcing good financial habits with real-time feedback
βοΈ Created By
@lilbablo β exploring the intersection of AI, financial literacy, and interactive learning.
π€ Contribute
Pull requests welcome! You can:
- Add more scenario questions
- Improve model responses
- Port this to Gradio or Streamlit
- Translate the quiz for international use
Model tree for lilbablo/finlit-quiz
Base model
microsoft/phi-2