Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
title: Learning Architect AI Tutor And Syllabus Planner
|
3 |
emoji: π
|
@@ -9,6 +124,4 @@ app_file: app.py
|
|
9 |
pinned: false
|
10 |
license: mit
|
11 |
short_description: Your personal learning plan architect.
|
12 |
-
---
|
13 |
|
14 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
+
|
2 |
+
# AI Tutor Project
|
3 |
+
|
4 |
+
|
5 |
+
A personalized AI learning assistant that **helps** to accelerate individual learning.
|
6 |
+
---
|
7 |
+
|
8 |
+
**Table of Contents**
|
9 |
+
* [What is AI Tutor?](#what-is-ai-tutor)
|
10 |
+
* [Why Use This AI Tutor?](#why-use-this-ai-tutor)
|
11 |
+
* [Features](#features)
|
12 |
+
* [How It Works (The Gist)](#how-it-works-the-gist)
|
13 |
+
* [A Deeper Dive: How AI Tutor Works](#a-deeper-dive-how-ai-tutor-works)
|
14 |
+
* [Core Components](#core-components)
|
15 |
+
* [Effective Use Cases & Tips](#effective-use-cases--tips)
|
16 |
+
* [Future Improvements](#future-improvements)
|
17 |
+
* [Contributing](#contributing)
|
18 |
+
* [License](#license)
|
19 |
+
|
20 |
+
---
|
21 |
+
|
22 |
+
## What is AI Tutor?
|
23 |
+
This project is an AI powered tutor designed to provide a personalized learning experience. You can define what you want to learn, provide resources (like documents or books), and the AI will help generate a structured syllabus and interact with you in a specific persona to teach you the material.
|
24 |
+
|
25 |
+
## Why Use This AI Tutor?
|
26 |
+
|
27 |
+
Traditional Large Language Models (LLMs) are incredibly knowledgeable but can sometimes lack depth on specific topics unless guided precisely. They also tend to have a fixed interaction style once a session begins. This AI Tutor aims to address these points by:
|
28 |
+
1. **Focused Learning:** Creating a detailed syllabus based on your input and resources, ensuring the AI stays on track and provides in-depth explanations.
|
29 |
+
2. **Adaptive Persona:** Allowing you to define the teaching style (e.g., Socratic, first-principles, like a famous figure) for a more engaging and effective learning experience.
|
30 |
+
*(Currently, the persona is set per chat session, with future ideas for dynamic updates.)*
|
31 |
+
|
32 |
+
## Features
|
33 |
+
* Personalized syllabus generation based on user goals and optional resources.
|
34 |
+
* Customizable teaching persona for the AI Explainer Agent.
|
35 |
+
* Interactive conversation manager to clarify learning objectives.
|
36 |
+
* Backend API built with Django and a frontend interface with React.
|
37 |
+
* Proper rendering of code and math formulas in explanations.
|
38 |
+
* SQLite database for easy setup.
|
39 |
+
* Designed for topics requiring deep thinking and understanding.
|
40 |
+
|
41 |
+
## How It Works (The Gist)
|
42 |
+
|
43 |
+
The AI Tutor operates through a workflow involving several key steps:
|
44 |
+
1. **Conversation Manager:** Talks with you to understand *what* you want to learn and *why* you want to learn.It **takes** summaries of resources you **provide** and **negotiates** the syllabus with you.You **can** modify it after the syllabus **is generated**.
|
45 |
+
2. **Syllabus Generator:** Based on your conversation and resources, it creates a structured learning plan.
|
46 |
+
3. **Persona Prompt Generator:** Helps define the "personality" and teaching style of the Explainer Agent. You guide this by describing how you want to be taught. This is the single most important step.
|
47 |
+
4. **Explainer Agent:** This is the AI that actually teaches you, following the generated syllabus and adopting the defined persona.
|
48 |
+
|
49 |
+
You can start a new chat to redefine the syllabus or persona if needed.
|
50 |
+
|
51 |
+
|
52 |
+
## A Deeper Dive: How AI Tutor Works
|
53 |
+
|
54 |
+
|
55 |
+
LLMs have vast knowledge, but making them act as effective, specialized tutors requires addressing a few challenges:
|
56 |
+
1. **Depth vs. Breadth:** LLMs often need precise guidance to provide in-depth knowledge on specific topics rather than general overviews.
|
57 |
+
2. **Static Prompts:** Once a system prompt (which defines the AI's behavior, knowledge base, and persona) is set, it's typically fixed for that interaction.
|
58 |
+
|
59 |
+
This project tackles these issues through a structured workflow:
|
60 |
+
|
61 |
+
### Core Components
|
62 |
+
|
63 |
+
1. **Conversation Manager (`Convo Manager`)**
|
64 |
+
* **Role:** Interacts with the user to understand their learning goals: *what* they want to learn, *why* (optional), and how (teaching style preferences. The "how" is **further refined** by the Persona Prompt Generator).
|
65 |
+
* **Resource Handling:** If resources are provided, it generates an initial summary.
|
66 |
+
* **Control Flow:** Manages the conversation flow, asking clarifying questions (temperature can be adjusted to reduce chattiness) and producing tags (e.g., generate , modify , finalize , persona) to trigger subsequent agents like the Syllabus Generator and Persona Generator.
|
67 |
+
|
68 |
+
2. **Syllabus Generator**
|
69 |
+
* **Input:** User's learning objectives (from Convo Manager) and any provided resources.
|
70 |
+
* **Process:**
|
71 |
+
* **No Resources:** Uses a specific prompt to generate a syllabus from scratch.
|
72 |
+
* **With Resources:** For large resources, it truncates text (e.g., to 100,000 chars per resource) and creates a "Dynamic Summary" (considering user history) before generating the syllabus.
|
73 |
+
* *(Note: Performance with heavy resources can be enhanced with more powerful models or paid tiers by tweaking code in orchestrator & Dynamic Resource Generation.)*
|
74 |
+
* **Output:** A structured syllabus, which the user can then ask to modify.
|
75 |
+
|
76 |
+
3. **Persona Prompt Generator**
|
77 |
+
* **Trigger:** Activates after the syllabus is finalized.
|
78 |
+
* **Goal:** Defines the teaching style and "personality" of the Explainer Agent. This is a critical step for an effective learning experience.
|
79 |
+
* **User Input:** The user describes how they want to be taught.
|
80 |
+
* **Effective Answers:** Focus on pedagogical approaches (e.g., First Principle Thinking, Socratic method), emulate learning styles of great thinkers (past/present) or even fictional characters. Aim for a serious, efficient teaching style, not overly pleasing. Mentioning "search capabilities" or other tool use can be integrated if using other platforms like Google AI Studio with grounding.
|
81 |
+
* **Example:** "Teach me with Socratic questioning, focusing on first principles. **Be** serious and ensure I understand the fundamentals before moving on. You have search capabilities to verify facts(Helpful for Tool Calling)."
|
82 |
+
* **Output:** A system prompt for the Explainer Agent, generated by `PersonaPromptBodyPredictSignature` based on chat history and the user's persona description.
|
83 |
+
* *(Note: A good persona prompt is key. A generic one often leads to a subpar learning experience.)*
|
84 |
+
|
85 |
+
4. **Explainer Agent**
|
86 |
+
* **Input:** The system prompt (syllabus + persona) generated previously.
|
87 |
+
* **Role:** Greets the user and begins teaching according to the syllabus and defined persona.
|
88 |
+
* **Features:** Renders code and mathematical formulas correctly.
|
89 |
+
* **Portability:** The system prompt can be copied from the admin panel **to be used** in other LLM interfaces like Google AI Studio
|
90 |
+
|
91 |
+
### Effective Use Cases & Tips
|
92 |
+
|
93 |
+
* **Ideal Topics (based on experience):**
|
94 |
+
* Subjects requiring deep conceptual understanding where visual/audio aids are not primary (e.g., learning music theory concepts is okay, but learning an instrument is not ideal for this text-based version).and also not optimal for Topics where you need extreme precision from a preferred resource.
|
95 |
+
* Examples: Increasing cognitive ability, learning Chess & Go strategies, understanding brain control concepts, developing a competitive spirit.
|
96 |
+
* **Technical Topics:** Revising classic machine learning, exploring advanced Reinforcement Learning (e.g., using Barto & Sutton as a resource and AI Studio(can handle large files) for syllabus creation) and understanding codebases.
|
97 |
+
* **Performance:** Generally strong for conceptual/philosophical topics. For highly technical subjects, see "Improvements" below.
|
98 |
+
* **Resource Limitation:** Currently, resources can only be provided at the start of a conversation.
|
99 |
+
|
100 |
+
---
|
101 |
+
|
102 |
+
## Future Improvements
|
103 |
+
|
104 |
+
**Technical Improvements:**
|
105 |
+
1. **RAG for Explainer Agent:** Implementing Retrieval Augmented Generation (RAG) for the Explainer Agent could significantly improve performance for technical topics by grounding explanations in specific documents.
|
106 |
+
* *Challenge:* Self-hosting effective RAG models can be difficult. My testing indicates that smaller models (e.g., 1B parameters) often yield lower accuracy (frequently below 50% for relevant tasks), while larger, more accurate models (e.g., 7B+) demand significantly more computational resources.
|
107 |
+
**Other Improvements:**
|
108 |
+
1. **Prompt Engineering:**
|
109 |
+
* Some prompts (e.g., `FormatSyllabusXMLToMarkdown`) are quite long and could be refined or made optional.
|
110 |
+
* The `Convo Manager`'s questioning style could be more adaptable.
|
111 |
+
* The `Persona Prompt Generator` could be more "agentic" (multi-step, iterative refinement) rather than a single-step generation.
|
112 |
+
2. **UI/UX Enhancements:**
|
113 |
+
* Visual cues for transitions between stages (Convo > Syllabus > Persona > Explainer).
|
114 |
+
* General UI polish.
|
115 |
+
|
116 |
---
|
117 |
title: Learning Architect AI Tutor And Syllabus Planner
|
118 |
emoji: π
|
|
|
124 |
pinned: false
|
125 |
license: mit
|
126 |
short_description: Your personal learning plan architect.
|
|
|
127 |
|
|