Skip to content

Fix: Improved syllabus generator processing with hybrid architecture#180

Draft
noushinm wants to merge 2 commits into
vibing-ai:Developfrom
noushinm:feature/fix-syllabus-generator
Draft

Fix: Improved syllabus generator processing with hybrid architecture#180
noushinm wants to merge 2 commits into
vibing-ai:Developfrom
noushinm:feature/fix-syllabus-generator

Conversation

@noushinm
Copy link
Copy Markdown

@noushinm noushinm commented Feb 21, 2025

Description

This PR updates the core.py file to transition the syllabus generator to a Sequential-Parallel Hybrid Architecture.

Changes:
Modified File: app/tools/syllabus_generator/core.py

Key Updates:
• Transitioned the syllabus generator to a Sequential-Parallel Hybrid Architecture.
• Implemented context chaining using LangChain to improve coherence between syllabus sections.
• Retained parallel execution for independent sections to optimize processing efficiency.
• Enhanced prompt templates to dynamically adapt based on previous outputs.
• Improved handling of optional inputs, ensuring fallback mechanisms are in place.

Related Issue

If this PR addresses an issue, link to it here.

Type of Change

Please select the type(s) of change that apply and delete those that do not.

  • Bug fix: A non-breaking change that fixes an issue.
  • [ *] New feature: A non-breaking change that adds functionality.
  • Breaking change: A change that causes existing functionality to not work as expected.
  • Documentation update: Changes or updates to documentation.
  • Code style update: Changes that do not affect the meaning of the code (e.g., formatting).
  • Refactoring: A code change that neither fixes a bug nor adds a feature.
  • [ *] Performance improvement: A change that improves performance.
  • Test enhancement: Adding or updating tests; no production code change.
  • Chore: Changes to the build process or auxiliary tools; no production code change.
  • [* ] Other: Restructured the existing logic for better performance and maintainability.

Proposed Solution

Describe your code changes in detail. Explain how you implemented your solution and any design decisions you made.

• Sequential Chaining for Core Sections: course_information now informs course_content, policies_procedures, and other sections.
• Parallel Execution for Independent Sections: grading_policy and learning_resources remain in parallel to maintain efficiency.
• Enhanced Prompts: Updated prompts to use previously generated content dynamically.
• Fallback Handling for Minimal Inputs: If a user provides partial data, defaults and inferred values maintain syllabus completeness.

How to Test

Provide instructions on how to test these changes. Include details on test configurations, test cases, and expected outcomes.

Documentation Updates

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

  • [* ] Yes
  • No

If yes, describe what documentation updates are needed and link to the relevant documentation.

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

Add any other information that might be useful for the reviewers.

@buriihenry buriihenry marked this pull request as draft February 24, 2025 18:24
@stevenrayhinojosa-gmail-com
Copy link
Copy Markdown
Contributor

works well, Please add this to your "How to Test" Section

{
"user": {
"id": "string",
"fullName": "string",
"email": "string"
},
"type": "chat",
"tool_data": {
"tool_id": "syllabus-generator",
"inputs": [
{
"name": "grade_level",
"value": "College"
},
{
"name": "subject",
"value": "Linear Regression"
},
{
"name": "course_description",
"value": "This course introduces Linear Regression concepts, focusing on mathematical foundations and practical applications."
},
{
"name": "objectives",
"value": "Understand regression theory, perform analysis on datasets, and interpret statistical results."
},
{
"name": "required_materials",
"value": "Laptop, statistical software (e.g., R, Python), and course textbook."
},
{
"name": "grading_policy",
"value": "Projects contribute 40%, exams contribute 60%."
},
{
"name": "policies_expectations",
"value": "Students must submit assignments on time and actively participate in discussions."
},
{
"name": "course_outline",
"value": "Week 1: Introduction to Linear Regression\nWeek 2: Least Squares Method\nWeek 3: Hypothesis Testing\nWeek 4: Multivariate Regression\nWeek 5: Diagnostics and Residual Analysis\nWeek 6: Regularization Techniques\nWeek 7: Model Validation\nWeek 8: Capstone Project."
},
{
"name": "additional_notes",
"value": "This course is intensive and requires prior knowledge of basic statistics."
},
{
"name": "file_url",
"value": "https://firebasestorage.googleapis.com/v0/b/kai-ai-f63c8.appspot.com/o/uploads%2F510f946e-823f-42d7-b95d-d16925293946-Linear%20Regression%20Stat%20Yale.pdf?alt=media&token=caea86aa-c06b-4cde-9fd0-42962eb72ddd"
},
{
"name": "file_type",
"value": "pdf"
},
{
"name": "lang",
"value": "en"
}
]
}
}

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.

3 participants