Skip to content

Latest commit

Β 

History

History
135 lines (106 loc) Β· 3.31 KB

File metadata and controls

135 lines (106 loc) Β· 3.31 KB

🧠 PLANNING.md – Personalized Learning Marketplace (LangGraph + Pydantic AI)

🧭 Overview

Build an AI-powered assistant that:

  • Parses resumes
  • Chats with the user about goals and budget
  • Suggests a course bundle tailored to the user’s skill gaps
  • Prices the bundle according to budget constraints
  • Adds micro-assessments (quizzes/tests) between modules to ensure understanding

Built using Pydantic AI agents and LangGraph DAG orchestration.


πŸ“ Architecture

πŸ”— LangGraph DAG Flow:

Start ➜ ResumeAgent ➜ ConversationAgent ➜ CourseRetrievalAgent ➜ PricingAgent ➜ QuizAgent ➜ End
  • ResumeAgent β†’ Extract skills from parsed resume
  • ConversationAgent β†’ Capture goals and budget
  • CourseRetrievalAgent β†’ Find relevant courses from FAISS
  • PricingAgent β†’ Adjust bundle to fit budget
  • QuizAgent β†’ Generate or fetch tailored quizzes before allowing module progression

πŸ”§ Core Modules

🧠 Pydantic AI Agents

Each agent lives in /llm_agents/:

  • ResumeAgent
  • ConversationAgent
  • CourseRetrievalAgent
  • PricingAgent
  • QuizAgent (NEW)

🧩 Embedding Layer

  • FAISS vector store
  • Embedded items:
    • Course catalog (title + description)
    • Resume chunks (optional)
    • Quiz templates/questions (optional, mock for hackathon)

πŸ’¬ Conversation Input

  • UI + backend route to gather:
    • Resume
    • Role of interest
    • Budget
    • Preferred stack/domain (e.g., frontend, data, devops)

πŸ§ͺ Quiz/Assessment Logic

✍️ QuizAgent Responsibilities

  • Input: current_skill: str, module_title: str
  • Output: quiz: List[Dict] – multiple choice questions + correct answers
  • Sources:
    • GPT-4 generated questions via template (e.g., "Generate 3 MCQs to test understanding of X concept")
    • Optionally retrieved from pre-made quizzes stored in vector store
  • Evaluation:
    • (Optional for hackathon) Accept mock answers, verify score, gate next module

πŸ—οΈ Stack & Tools

Backend

  • FastAPI
  • LangGraph
  • Pydantic AI
  • FAISS
  • OpenAI (GPT-4 for quiz generation + prompts)

Frontend

  • React
  • Chakra UI / Tailwind CSS
  • Axios

πŸ§ͺ Testing Strategy

Unit Tests

  • Agent schema tests: QuizAgent input/output validation
  • LangGraph: Add QuizAgent transitions in DAG test

Integration Tests

  • Resume β†’ Skill β†’ Goal β†’ Bundle β†’ Quiz
  • Mock test score logic to show user "passed" to move forward

πŸ—‚οΈ Directory Structure

backend/
  β”œβ”€β”€ api/
  β”‚   └── routes.py
  β”œβ”€β”€ llm_agents/
  β”‚   β”œβ”€β”€ resume_agent.py
  β”‚   β”œβ”€β”€ conversation_agent.py
  β”‚   β”œβ”€β”€ course_retrieval_agent.py
  β”‚   β”œβ”€β”€ pricing_agent.py
  β”‚   └── quiz_agent.py         # <--- New!
  β”œβ”€β”€ graph/
  β”‚   └── dag.py
  β”œβ”€β”€ embeddings/
  β”‚   β”œβ”€β”€ loader.py
  β”‚   └── quizzes.json          # (Optional for mock)
  └── tests/
      └── agents/
      └── graph/
      └── pricing/
      └── quiz/

frontend/
  β”œβ”€β”€ components/
  β”‚   └── QuizView.jsx
  β”œβ”€β”€ pages/
  └── utils/

🧭 Future Extensions

  • Add payment integration
  • Persistent user sessions
  • Pretrained classifier for course-level skill tags
  • Gamify quiz success (XP, badges)
  • Adaptive difficulty based on past quiz scores