Boosting Customer Engagement through Interactive AI Learning
FinLearn-AI is an AI-powered Finance Learning Assistant built to demonstrate how financial platforms like Deriv can transform static content into personalized, interactive learning journeys that increase user engagement and customer retention.
While Deriv offers high-quality ebooks through its Deriv Academy, the learning experience remains passive. FinLearn-AI turns that same content into:
- Targeted quizzes
- Custom study plans
- Summarized key insights
- A GPT-4o-powered finance tutor
Inspired by Amazon’s strategy of using Generative AI to foster customer loyalty, this project shows how businesses can use RAG-based systems to keep users engaged longer, learning more, and returning often.
“I visited Deriv’s website with no prior knowledge of trading. Their ebooks were informative, but I didn’t stay long. If I could quiz myself, plan my learning, and talk to an AI tutor, I’d have stayed much longer.”
FinLearn-AI was born out of this insight:
- Turn passive readers into active learners
- Turn static content into personalized experiences
- Turn information into retention
- Chat with PDFs: Ask questions about Deriv’s ebooks and get contextual answers
- Quiz Generator: Instantly generate multiple choice quizzes on any finance topic
- Study Plan Creator: Get a personalized multi day study roadmap
- PDF Summarizer: View structured summaries of each ebook with key concepts
- Answer Checker: Test your quiz responses with explanations
- Web Search Fallback: Uses DuckDuckGo tools if answers aren't found in the PDFs
FinLearn-AI is powered by the following official Deriv ebooks:
- Forex Trading
- Stock Market
- Commodities
- 7 Traits of Successful Traders
- Trading Financial Accumulator Options
- Cryptocurrency
- Synthetic Indices
- Top 10 Chart Patterns
The PDFs are parsed and chunked automatically using Agno, with pypdf used internally for text extraction.
| Component | Technology |
|---|---|
| Backend | Flask (Python) |
| LLM | GPT-4o (via OpenAI) |
| Vector DB | LanceDB |
| Knowledge Base | agno + pypdf |
| Search Fallback | DuckDuckGo Tools |
| Parsing | pypdf (via Agno) |
FinLearn-AI uses a modular, multi-agent architecture powered by the Agno framework. Each agent is responsible for a specific type of interaction (chatting, quiz generation, summarization, or study planning), and follows a Retrieval-Augmented Generation (RAG) workflow:
-
Query Input
The user submits a prompt (e.g., "What are candlestick patterns?"). -
Vector Search (via LanceDB)
Relevant excerpts are retrieved from Deriv’s PDFs using vector embeddings. -
LLM Processing (via GPT-4o)
The retrieved context is injected into a prompt and passed to GPT-4o. -
Response Generation
The model returns a contextualized, human readable answer, quiz, or plan. -
Fallback Search (Optional)
If needed, DuckDuckGo is used to fetch additional external information.
| Agent Name | Role |
|---|---|
rag-agent |
General Q&A on finance topics |
quiz-agent |
Creates quizzes based on topics |
summary-agent |
Summarizes full Deriv ebooks |
study-plan-agent |
Builds multi-day personalized plans |
Each agent has access to the same knowledge base (PDFs + LanceDB) but is guided by a different system prompt tailored to its purpose.
This architecture makes FinLearn-AI highly extensible, i.e you can easily plug in new tools, swap vector DBs, or add user specific memory for personalization.
git clone https://github.com/seeee3/FinLearn-AI.git
cd FinLearn-AI
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtOPENAI_API_KEY=your_openai_keypython app.pyThen open http://localhost:8000 in your browser.
knowledge_base.load(upsert=True)- "Explain the difference between forex and stocks."
- "Generate a 5-question quiz on cryptocurrency at medium difficulty."
- "Give me a 7-day study plan to learn chart patterns."
- "Summarize the ebook on commodities."
- Deriv.com – Official source of all trading ebooks
- Agno – Modular agent framework
- OpenAI – LLM APIs
- LanceDB – Fast vector search
This project is for educational and non-commercial use.
Please do not redistribute Deriv's PDF content without permission.