Skip to content

Project Based Activity#213

Open
Naaman233 wants to merge 2 commits into
vibing-ai:Developfrom
Naaman233:Develop
Open

Project Based Activity#213
Naaman233 wants to merge 2 commits into
vibing-ai:Developfrom
Naaman233:Develop

Conversation

@Naaman233
Copy link
Copy Markdown

@Naaman233 Naaman233 commented Aug 20, 2025

Description

Implemented a PROJECT-BASED- ACTIVITY AI assistant feature designed to help educators brainstorm ideas for projects for learning purposes. The assistant helps to craft projects, ensuring they align with available resources and educational goals

Related Issue

#146 - Epic 3.90 Project-Based Activity Expert Assistant

Type of Change

  • New feature: A non-breaking change that adds functionality.

Proposed Solution

The feature is built in the file directory app/assistants/curriculum_tools/project_based_activity_expert
   - [ ] This  contains a prompt folder and prompt.txt to develop the scope of the assistant and curb hallucinations
   - [ ] The Core.py contains the executor function which recollects the previous conversations, converts each message       into a ChatMessage object, and formats it into a readable string for context
   - [ ] The Assistant.py contains the read file function and run project function, which reads the prompt and loads up the necessary env variables to utilize the Google Gemini Generative Model.
   - [ ] This contains a test folder with a test_core.py file which tests the Generative Model capacity to provide efficient and precise responses.

How to Test

Set up the FastAPI backend and send a POST request to /assistant-chat
This pull request introduces a new "Project-Based Activity Expert" assistant to the curriculum tools suite. The main changes include implementing the assistant's core functionality, integrating it into the assistant configuration, providing a detailed prompt for the generative model, and adding unit tests to ensure correct behavior.

New Project-Based Activity Expert Assistant

Implementation and Core Logic

  • Added assistant.py to initialize and configure the Gemini generative model, load the system prompt, and define the main function (run_project_based_activity) for generating personalized project-based learning activities.
  • Added core.py to define the executor function, which processes recent chat messages, constructs context, and invokes the assistant logic.

Prompt and Configuration

  • Added a comprehensive prompt in project_based_activity_prompt.txt to instruct the assistant on how to generate tailored project-based activities for educators.
  • Registered the new assistant in assistants_config.json for integration with the overall system.

Testing

  • Introduced test_core.py with tests for valid and invalid input scenarios to ensure the executor behaves as expected and handles errors gracefully.
{
"assistant_inputs": {
    "assistant_group": "curriculum_tools",
    "assistant_name": "project_based_activity_expert",
    "user_info": {
      "user_name": "Mary",
      "user_age": 23,
      "user_preference": "string"
    },
    "messages": [
      {
        "role": "human",
        "type": "text",
        "timestamp": "string",
        "payload": {
          "text": "I need ideas to help me build a software project."
        }
      }
    ]
  }
}

Outcome

{
  "data": [
    {
      "role": "ai",
      "type": "text",
      "timestamp": null,
      "payload": {
        "text": "Okay, Mary, let's brainstorm some software project ideas tailored to your interests and skill level. Since you haven't specified a particular domain or technology preference (e.g., web development, mobile apps, data science), I'll provide a variety of options to spark your creativity.\n\n**Project Idea 1: Interactive To-Do List with Gamification**\n\n*   **Description:** Develop a to-do list application with features like task prioritization, deadlines, and user accounts. Enhance it with gamification elements like points, badges, and leaderboards to motivate users to complete tasks.\n*   **Technology Stack:** You could use JavaScript frameworks like React or Vue.js for the front end and Node.js with Express for the back end. A database like MongoDB or PostgreSQL could store user data and tasks.\n*   **Key Features:**\n    *   User authentication and authorization\n    *   Task creation, editing, and deletion\n    *   Drag-and-drop task prioritization\n    *   Deadline reminders\n    *   Point system and badges based on task completion\n    *   Leaderboard showcasing top performers\n*   **Customization:**\n    *   Add integration with calendar apps for seamless scheduling.\n    *   Implement a Pomodoro timer for focused work sessions.\n    *   Introduce team collaboration features, allowing users to share tasks and track progress together.\n*   **Why it's good:** This project covers a range of essential programming concepts, from front-end design to back-end logic and database management. Gamification adds an engaging twist and enhances user experience.\n\n**Project Idea 2: Personal Finance Tracker**\n\n*   **Description:** Create a web or mobile application that allows users to track their income, expenses, and budgets. Visualize financial data through charts and graphs to gain insights into spending habits.\n*   **Technology Stack:** For a web app, consider using Python with Django or Flask for the back end, along with HTML, CSS, and JavaScript for the front end. For a mobile app, you could use React Native or Flutter.\n*   **Key Features:**\n    *   Income and expense tracking with categorization\n    *   Budgeting and goal setting\n    *   Data visualization (charts, graphs)\n    *   Transaction history\n    *   Report generation\n*   **Customization:**\n    *   Implement automatic transaction import from bank accounts.\n    *   Add investment tracking features.\n    *   Incorporate financial planning tools like retirement calculators.\n*   **Why it's good:** This project offers practical value and provides an opportunity to work with data analysis and visualization techniques. It also touches on security considerations when dealing with sensitive financial information.\n\n**Project Idea 3: Recipe Recommendation Engine**\n\n*   **Description:** Build a system that recommends recipes based on user preferences, dietary restrictions, and available ingredients.\n*   **Technology Stack:** You could use Python with a framework like Flask or Django for the back end. Utilize machine learning libraries like scikit-learn or TensorFlow to build the recommendation model.\n*   **Key Features:**\n    *   User profile creation with preference settings\n    *   Recipe database with ingredient information\n    *   Search functionality based on ingredients and dietary restrictions\n    *   Recommendation algorithm based on user preferences and available ingredients\n    *   Recipe display with images and instructions\n*   **Customization:**\n    *   Integrate with online grocery stores for easy ingredient ordering.\n    *   Add a feature to suggest substitutions for ingredients.\n    *   Incorporate user reviews and ratings to improve recommendation accuracy.\n*   **Why it's good:** This project combines web development with machine learning, allowing you to explore data analysis and algorithm design. It's a fun and practical application with potential for real-world use.\n\n**Next Steps:**\n\n*   **Choose a project:** Review the ideas and select one that excites you and aligns with your current skill set.\n*   **Define scope:** Break down the project into smaller, manageable tasks.\n*   **Set milestones:** Establish deadlines for each task to stay on track.\n*   **Start coding:** Begin with the core functionality and gradually add features.\n\nLet me know which project idea resonates with you the most, or if you have any other specific interests or technologies you'd like to explore. I'm here to help you refine your project and provide guidance along the way.\n"
      }
    }
  ]
}

Unit Tests

  • Activity Generation
  • Context and Category Functionality

Documentation Updates

Indicate whether documentation needs to be updated due to this PR.

  • No

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

Additional Information

No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant