Copyright 2026 Luca Silver
Provides pydantic schemas for the advisor graph and alerts graph.
Plan Schemas:
- SPlanSchema: Schema for the advisor planning node used by student users. Determines whether database queries, web searches, or database insertions are needed to answer a student's question, and specifies what information is needed from each source if applicable. The schema structure varies based on the context selection in context_config.json, with different fields included for 'full', 'some-db', 'no-db', and 'no-tools' modes.
- APlanSchema: Schema for the advisor planning node used by advisor users. Similar to SPlanSchema but does not include the database insertion field. The structure also varies based on context selection in context_config.json.
Filter Schemas:
- DBTerm: Represents an academic term (year, season, and optional number for split sessions). Used for filtering courses and sections by term.
- DBMeetTime: Represents the meeting times for course sections (days of the week and start/end times). Used for filtering sections by schedule.
- CreditCondition: Represents a filter condition for course credits, allowing comparison operators (e.g., '=', '>=', etc.) to specify credit requirements in course filters.
- EnrollmentCondition: Represents a filter condition for section enrollment, allowing comparison operators to specify enrollment thresholds in section filters.
- CodeCondition: Represents a filter condition for course codes, allowing comparison operators to specify course number requirements in course filters.
- CourseFilters: Comprehensive filter schema for querying courses from the database, including filters for term, department, course code, credits, keywords, and prerequisites.
- SectionFilters: Comprehensive filter schema for querying course sections from the database, including filters for term, course code, instructor, teaching method, enrollment capacity, current enrollment, location, and meeting times.
Alert Schemas:
- RelevantEventsObject: Represents an individual event with its ID and urgency level.
- RelevantEventsSchema: Schema for returning a list of relevant events with their urgency levels.
Single line comments are used in place of docstrings to save on tokens, but detailed descriptions are provided in the field definitions for clarity on the purpose and usage of each field within the schemas.