Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Education Template

The education template provides a comprehensive educational institution assistant that helps students and staff with enrollment, course management, schedules, grades, tuition information, and academic support.

Topic: Educational Institution Assistant

This template is perfect for:

  • Universities and colleges
  • Online learning platforms
  • Training centers
  • K-12 schools
  • Corporate learning management

The Code

ADD TOOL "enrollment"
ADD TOOL "course-info"
ADD TOOL "schedule"
ADD TOOL "grades"
ADD TOOL "tuition"
ADD TOOL "support"

USE KB "edu.gbkb"

CLEAR SUGGESTIONS

ADD SUGGESTION "enroll" AS "Enroll in a course"
ADD SUGGESTION "courses" AS "View available courses"
ADD SUGGESTION "schedule" AS "My class schedule"
ADD SUGGESTION "grades" AS "Check my grades"
ADD SUGGESTION "tuition" AS "Payment information"
ADD SUGGESTION "help" AS "Academic support"

SET CONTEXT "education" AS "You are an educational institution assistant helping with enrollment, courses, schedules, grades, and academic support. Be helpful and guide students through processes clearly."

BEGIN TALK
**Education Assistant**

Welcome! I can help you with:
• Course enrollment and registration
• Available courses and programs
• Class schedules and calendars
• Grades and transcripts
• Tuition and payment info
• Academic support and advising

Select an option or ask me anything.
END TALK

BEGIN SYSTEM PROMPT
You are an AI assistant for an educational institution.

Be friendly and professional.
Provide clear, accurate assistance.
Reduce administrative workload by handling common inquiries.
Help with enrollment and registration.
Provide course information and prerequisites.
Answer admissions questions.
Guide through registration process.
Explain academic policies.
END SYSTEM PROMPT

Sample Dialogs

These conversations show how the education template works in real-world scenarios.

Dialog 1: Course Enrollment

Dialog 2: Check Grades

Dialog 3: Class Schedule

Dialog 4: Tuition Payment

Keywords Used

KeywordPurpose
ADD TOOLRegister enrollment and academic tools
USE KBLoad educational knowledge base
ADD SUGGESTIONCreate quick action buttons
SET CONTEXTDefine educational assistant behavior
BEGIN TALKWelcome message block
BEGIN SYSTEM PROMPTAI behavior instructions

Template Structure

edu.gbai/
├── edu.gbdialog/
│   ├── start.bas           # Main entry point
│   └── enrollment.bas      # Enrollment workflow
├── edu.gbdata/
│   └── (data tables)       # Student/course data
├── edu.gbot/
│   └── config.csv          # Bot configuration
└── edu.gbkb/
    └── academic-policies.md # Knowledge base

Enrollment Tool: enrollment.bas

PARAM student_id AS STRING DESCRIPTION "Student ID number"
PARAM course_code AS STRING LIKE "CS101" DESCRIPTION "Course code to enroll in"

DESCRIPTION "Enroll a student in a course after checking prerequisites and availability"

' Verify student exists
student = FIND "students.csv", "id = '" + student_id + "'"
IF NOT student THEN
    TALK "Student ID not found. Please verify your ID."
    RETURN NULL
END IF

' Get course information
course = FIND "courses.csv", "code = '" + course_code + "'"
IF NOT course THEN
    TALK "Course " + course_code + " not found."
    RETURN NULL
END IF

' Check if already enrolled
existing = FIND "enrollments.csv", "student_id = '" + student_id + "' AND course_code = '" + course_code + "'"
IF existing THEN
    TALK "You're already enrolled in " + course_code + "."
    RETURN NULL
END IF

' Check prerequisites
IF course.prerequisite <> "" THEN
    prereq = FIND "enrollments.csv", "student_id = '" + student_id + "' AND course_code = '" + course.prerequisite + "' AND grade >= 'C'"
    IF NOT prereq THEN
        TALK "You need to complete " + course.prerequisite + " before enrolling in " + course_code + "."
        RETURN NULL
    END IF
END IF

' Check availability
enrolled_count = COUNT("enrollments.csv", "course_code = '" + course_code + "' AND term = 'Fall2024'")
IF enrolled_count >= course.capacity THEN
    TALK "This course is full. Would you like to join the waitlist?"
    HEAR waitlist_choice
    IF LOWER(waitlist_choice) = "yes" THEN
        WITH waitlist_entry
            student_id = student_id
            course_code = course_code
            timestamp = NOW()
        END WITH
        SAVE "waitlist.csv", waitlist_entry
        TALK "You've been added to the waitlist. We'll notify you if a spot opens."
    END IF
    RETURN NULL
END IF

' Create enrollment
WITH enrollment
    id = GUID()
    student_id = student_id
    course_code = course_code
    term = "Fall2024"
    enrollment_date = NOW()
    status = "enrolled"
END WITH

SAVE "enrollments.csv", enrollment

' Send confirmation email
SEND MAIL student.email, "Enrollment Confirmed: " + course_code, 
    "You have been enrolled in " + course.name + ".\n" +
    "Schedule: " + course.schedule + "\n" +
    "Room: " + course.room + "\n" +
    "Instructor: " + course.instructor

TALK "✅ You're enrolled in " + course.name + "!"
TALK "📅 Schedule: " + course.schedule
TALK "🏫 Room: " + course.room

RETURN enrollment.id

Grades Tool: grades.bas

PARAM student_id AS STRING DESCRIPTION "Student ID number"
PARAM term AS STRING LIKE "Fall2024" DESCRIPTION "Academic term" OPTIONAL

DESCRIPTION "Retrieve student grades for current or specified term"

IF NOT term THEN
    term = "Fall2024"  ' Current term
END IF

' Get student info
student = FIND "students.csv", "id = '" + student_id + "'"
IF NOT student THEN
    TALK "Student not found."
    RETURN NULL
END IF

' Get enrollments with grades
enrollments = FIND "enrollments.csv", "student_id = '" + student_id + "' AND term = '" + term + "'"

IF UBOUND(enrollments) = 0 THEN
    TALK "No courses found for " + term + "."
    RETURN NULL
END IF

TALK "📊 **Grades for " + student.name + " - " + term + "**"
TALK ""

total_points = 0
total_credits = 0

FOR EACH enrollment IN enrollments
    course = FIND "courses.csv", "code = '" + enrollment.course_code + "'"
    
    grade_display = enrollment.grade
    IF grade_display = "" THEN
        grade_display = "In Progress"
    END IF
    
    TALK "• " + enrollment.course_code + " - " + course.name + ": **" + grade_display + "**"
    
    IF enrollment.grade <> "" THEN
        grade_points = GRADE_TO_POINTS(enrollment.grade)
        total_points = total_points + (grade_points * course.credits)
        total_credits = total_credits + course.credits
    END IF
NEXT

IF total_credits > 0 THEN
    gpa = total_points / total_credits
    TALK ""
    TALK "**Term GPA:** " + FORMAT(gpa, "#.00")
    
    IF gpa >= 3.5 THEN
        TALK "🌟 Dean's List!"
    END IF
END IF

RETURN enrollments

Customization Ideas

Add Course Recommendations

ADD TOOL "recommend-courses"

' Based on major and completed courses
completed = FIND "enrollments.csv", "student_id = '" + student_id + "' AND grade >= 'C'"
major = student.major

' Find next required courses
requirements = FIND "degree_requirements.csv", "major = '" + major + "'"

recommended = []
FOR EACH req IN requirements
    already_done = FILTER(completed, "course_code = '" + req.course_code + "'")
    IF UBOUND(already_done) = 0 THEN
        ' Check if prerequisites met
        IF req.prerequisite = "" OR HAS_COMPLETED(student_id, req.prerequisite) THEN
            PUSH recommended, req
        END IF
    END IF
NEXT

TALK "Based on your progress, I recommend these courses for next term:"
FOR EACH course IN FIRST(recommended, 5)
    TALK "• " + course.course_code + " - " + course.name
NEXT

Add Academic Calendar Integration

ADD TOOL "important-dates"

dates = FIND "academic_calendar.csv", "date >= '" + NOW() + "' AND date <= '" + DATEADD(NOW(), 30, 'days') + "'"

TALK "📅 **Upcoming Important Dates:**"
FOR EACH date IN dates
    TALK "• " + FORMAT(date.date, "MMM DD") + ": " + date.event
NEXT

Add Advisor Scheduling

ADD TOOL "book-advisor"

PARAM preferred_date AS DATE DESCRIPTION "Preferred date for appointment"

advisor = FIND "advisors.csv", "department = '" + student.major + "'"
available = FIND "advisor_slots.csv", "advisor_id = '" + advisor.id + "' AND date = '" + preferred_date + "' AND booked = false"

IF UBOUND(available) > 0 THEN
    TALK "Available times on " + FORMAT(preferred_date, "MMM DD") + ":"
    FOR EACH slot IN available
        ADD SUGGESTION slot.time AS slot.time
    NEXT
    HEAR selected_time
    
    ' Book the appointment
    UPDATE "advisor_slots" SET booked = true WHERE id = slot.id
    
    TALK "✅ Appointment booked with " + advisor.name + " on " + FORMAT(preferred_date, "MMM DD") + " at " + selected_time
    SEND MAIL student.email, "Advisor Appointment Confirmed", "Your meeting with " + advisor.name + " is scheduled."
END IF

Add Document Requests

ADD TOOL "request-transcript"

PARAM delivery_method AS STRING LIKE "email" DESCRIPTION "Delivery: email, mail, or pickup"

' Check for holds
holds = FIND "student_holds.csv", "student_id = '" + student_id + "' AND resolved = false"
IF UBOUND(holds) > 0 THEN
    TALK "⚠️ There's a hold on your account. Please resolve it before requesting transcripts."
    TALK "Hold reason: " + holds[1].reason
    RETURN NULL
END IF

' Create transcript request
WITH request
    id = GUID()
    student_id = student_id
    type = "official_transcript"
    delivery = delivery_method
    status = "processing"
    request_date = NOW()
    fee = 10.00
END WITH

SAVE "document_requests.csv", request

TALK "✅ Transcript request submitted!"
TALK "📋 Request #: " + request.id
TALK "💰 Fee: $10.00 (added to your account)"
TALK "📬 Delivery: " + delivery_method
TALK "⏱️ Processing time: 3-5 business days"