So our request body may look like (See the "Testing" section):
{
"user": {
"id": "string",
"fullName": "string",
"email": "string"
},
"type": "tool",
"tool_data": {
"tool_id": 4,
"inputs": [
{
"name": "grade_level",
"value": "University"
},
{
"name": "course_title",
"value": "Introduction to Quantum Mechanics"
},
{
"name": "course_description",
"value": "An introductory course in quantum mechanics, covering fundamental principles and applications."
},
{
"name": "objectives_topics",
"value": "Topics covering historical background, wave-particle duality, Schrödinger equation, and quantum computing."
},
{
"name": "required_materials",
"value": "Textbook, scientific calculator, lab notebook, and access to quantum simulation software."
},
{
"name": "num_weeks",
"value": "16"
},
{
"name": "course_outline",
"value": "Details based on the objectives."
},
{
"name": "grading_policy",
"value": "Grades based on exams, homework, lab reports, and participation."
},
{
"name": "class_policy",
"value": "Attendance, timely submission of assignments, active participation, and academic integrity are required."
},
{
"name": "customization",
"value": "Extra credits."
}
]
}
}
The result will be the a dictionary with keys:
course_title
course_description
objectives_topics
required_materials
course_outline
grading_policy
class_policy
Code structure
in features/syllabus/tools.py we created:
class SyllabusBuilder with method:
'create_syllabus'
class Syllabus with methods:
'compile_context' - compiles user inputs into the context.
'validate_response' - makes sure the generated question obeys format requirements.
'create_syllabus' - generates syllabus based on prompt and context
For the response formatting we used format instructions.
We used pydantic class for parsing and validation:
class SyllabusFormat(BaseModel):
course_title: str = Field(description = 'title of the course')
course_description: str = Field(description = 'description of the course')
objectives_topics: str = Field(description = 'topics covered and objectives of the course')
required_materials: str = Field(description = 'materials required for the course')
course_outline: str = Field(description = 'outline of the course')
grading_policy: str = Field(description = 'graiding policy of the course')
class_policy: str = Field(description = 'class policy of the course')
Testing
We tested worksheet generator for different inputs.
Example output based on request body mentioned above:
course_title: Introduction to Quantum Mechanics
course_description: This course provides an introduction to the fundamental principles of quantum mechanics, covering both theoretical concepts and practical applications. Students will gain an understanding of wave-particle duality, the Schrödinger equation, quantum entanglement, and quantum computing.
objectives_topics: Objectives:
Understand the historical development of quantum mechanics.
Describe the wave-particle duality of matter and light.
Solve the Schrödinger equation for simple systems.
Apply quantum mechanics to explain phenomena such as atomic spectra and chemical bonding.
Describe the basic principles of quantum computing.
Topics:
Historical background of quantum mechanics
Wave-particle duality
The Schrödinger equation
Quantum entanglement
Quantum computing
required_materials: * Textbook: Griffiths, D.J. (2018). Introduction to Quantum Mechanics (3rd ed.). Cambridge University Press.
Scientific calculator
Lab notebook
Access to quantum simulation software (e.g., QuTip, Qiskit)
course_outline: Week 1: Introduction to quantum mechanics
Historical background
Wave-particle duality
Week 2: The Schrödinger equation
The time-independent Schrödinger equation
The time-dependent Schrödinger equation
Week 3: Applications of the Schrödinger equation
Particle in a box
Harmonic oscillator
Hydrogen atom
Week 4: Quantum entanglement
Two-particle systems
Entangled states
Bell's theorem
Week 5: Quantum computing
Qubits and quantum gates
Quantum algorithms
Quantum computers
Weeks 6-16: Advanced topics in quantum mechanics
Topics will vary depending on the instructor and the interests of the students.
grading_policy: Grading:
Exams (50%): There will be two midterm exams and a final exam.
Homework assignments (20%): Homework will be assigned weekly.
Lab reports (20%): Lab reports will be due at the end of each lab session.
Participation (10%): Participation in class discussions and activities will be taken into account.
class_policy: Class Policy:
Attendance: Attendance is not mandatory, but it is strongly encouraged.
Timely submission of assignments: All assignments are due at the beginning of class on the due date.
Active participation: Students are expected to participate actively in class discussions and activities.
Academic integrity: All work submitted for this course must be the student's own original work.
Description and formatting
We created syllabus generator located features/syllabus
We used tool ID "4". from api/tools_config.json:
Here is the configuration of our input in the features/syllabus/metadata.json:
So our request body may look like (See the "Testing" section):
The result will be the a dictionary with keys: course_title course_description objectives_topics required_materials course_outline grading_policy class_policy
Code structure
in features/syllabus/tools.py we created: class SyllabusBuilder with method:
class Syllabus with methods:
For the response formatting we used format instructions.
We used pydantic class for parsing and validation:
Testing
We tested worksheet generator for different inputs.
Example output based on request body mentioned above:
course_title: Introduction to Quantum Mechanics
course_description: This course provides an introduction to the fundamental principles of quantum mechanics, covering both theoretical concepts and practical applications. Students will gain an understanding of wave-particle duality, the Schrödinger equation, quantum entanglement, and quantum computing.
objectives_topics: Objectives:
Topics:
required_materials: * Textbook: Griffiths, D.J. (2018). Introduction to Quantum Mechanics (3rd ed.). Cambridge University Press.
course_outline: Week 1: Introduction to quantum mechanics
Week 2: The Schrödinger equation
Week 3: Applications of the Schrödinger equation
Week 4: Quantum entanglement
Week 5: Quantum computing
Weeks 6-16: Advanced topics in quantum mechanics
grading_policy: Grading:
class_policy: Class Policy: