# AI Tutor

> **Portal:** `/lms` · **Desk:** Learning workspace

---

## Overview

The **AI Training Assistant** (AI Tutor) is a floating chat widget on lesson pages in `/lms`. Learners ask questions about the current lesson; the system calls `ask_tutor(lesson_name, question)` with lesson content as grounding context, returning concise answers scoped to the material.

Unlike general-purpose chatbots, the tutor system prompt restricts responses to lesson topics and redirects off-topic questions politely—supporting self-paced employee training without waiting for instructor email replies.

## Accessing the tutor

1. Open any **Course Lesson** in `/lms` while AI enabled (`get_ai_enabled` true).
2. Click the bot icon button fixed at bottom-right (**AI Training Assistant**).
3. Panel opens with suggested prompts: e.g., "Summarize key points", "Give me an example."
4. Type a question and press Enter or click send.

Component: `AITutor.vue` mounted on lesson views when settings allow.

If the button is absent, AI is disabled site-wide or lesson has no content body yet.

## How answers are generated

Backend flow:

1. Load **Course Lesson** document and truncate body to ~12,000 characters if needed.
2. Fetch course and chapter titles for context headers.
3. Send system message with role instructions + full lesson content.
4. Send user question.
5. Return `{ answer, lesson }` JSON to portal.

Model and API key come from **LMS Settings** (`get_ai_client`). Temperature 0.4 balances accuracy and readability; max tokens ~800 keeps responses brief.

The tutor does **not** mutate lesson content or grades—read-only assistance.

## Suggested use cases

| Scenario | Example question |
|----------|------------------|
| Clarify terminology | "What does PPE mean in this lesson?" |
| Apply concepts | "How would this policy apply to remote workers?" |
| Pre-quiz review | "What are the five steps listed for incident reporting?" |
| recap | "Summarize this lesson in three bullets." |

Encourage employees to use tutor before retaking failed quizzes—improves pass rates on mandatory training tracked in [Employee Compliance](https://smoothhiring.com/help/hrms/documents-compliance/employee-compliance).

## Relationship to lesson summaries

Separate from tutor chat, `summarize_lesson` generates cached **AI Summary** stored on lesson record (`ai_summary` field):

- Executive summary paragraph
- Bullet key takeaways

Summaries display in lesson UI when generated by instructors or automated jobs—static reference vs interactive tutor.

`get_lesson_summary` retrieves cache without calling OpenAI again.

## Privacy and acceptable use

- Questions and answers traverse OpenAI API—include in employee training policy disclosures.
- Avoid entering personal identifiable information about coworkers into chat.
- Tutor cannot access other employees' records or HR data—only lesson HTML.
- Instructors should verify AI answers during course QA; incorrect tutor responses indicate lesson ambiguity to fix.

For regulated content, add disclaimer near tutor button: "AI assistance does not replace official policy documents."

## Administrators

Enable/disable via **LMS Settings** without code deploy.

Monitor usage through OpenAI dashboard metrics; no built-in per-user tutor log in LMS.

If API costs spike during large cohort launches, temporarily disable AI while keeping static lessons available.

Pair tutor availability with **Statistics → Employee Engagement** to correlate active learning weeks.

## Tips for learners

- Ask specific questions referencing section headings.
- If answer seems wrong, re-read lesson and ask again with quoted text.
- Use tutor before submitting open-ended quiz responses for phrasing ideas—not copy verbatim for graded work.
- Download quiz PDF after passing to file in [Employee Document](https://smoothhiring.com/help/hrms/documents-compliance/employee-documents) if required by HR.

## Troubleshooting

| Issue | What to do |
|-------|------------|
| Tutor button missing | Enable AI in LMS Settings |
| "Thinking..." hangs | Check OpenAI status; contact Smooth support |
| Off-topic refusals | Expected behavior; rephrase within lesson scope |
| Empty answers | Lesson body may be empty—add content |
| Stale UI after setting change | Hard refresh `/lms` cache |

---

## Frequently asked questions

### Does LMS training completion automatically update Employee Compliance?

No. Smooth LMS tracks learning progress, quiz scores, and certificates. Smooth HR **Employee Compliance** is updated separately by HR when a regulatory or policy requirement is satisfied. Download LMS PDFs and attach them to [Employee Document](https://smoothhiring.com/help/hrms/documents-compliance/employee-documents), then mark the matching compliance row **Complete** with the correct renewal date.

### Where should quiz PDFs be stored for audits?

Use [Employee Document](https://smoothhiring.com/help/hrms/documents-compliance/employee-documents) on the employee record with an appropriate **Employee Document Type** (for example Training Record or Policy Acknowledgment). Include the **Quiz Submission Report** PDF exported from LMS. For organization-wide retention policies, align document type expiry settings with [Employee Compliance](https://smoothhiring.com/help/hrms/documents-compliance/employee-compliance) renewal periods.

### Which desk workspace manages LMS content?

Open the **Learning** workspace from the app switcher. Desk paths use `/app/list name` slugs—for example `/app/lms-quiz` and `/app/lms-enrollment`. Learners consume training at `/lms` on the same site.

### How do new hires get enrolled in mandatory training?

When **Employee Onboarding** is created in HRMS, the LMS integration enrolls the employee user in every published **Mandatory** course and creates **LMS Training Assignment** rows with default due dates. Ensure the **Employee** record has a linked **User** with the **LMS Student** role.

### What is the difference between an LMS Certificate and HR compliance?

An **LMS Certificate** proves course completion inside Smooth LMS. **Employee Compliance** in Smooth HR tracks regulatory obligations (training renewals, I-9, background checks) with scheduled expiry alerts. Course certificates do not automatically appear on the HR compliance ledger—HR attaches LMS PDFs to [Employee Document](https://smoothhiring.com/help/hrms/documents-compliance/employee-documents) and updates [Employee Compliance](https://smoothhiring.com/help/hrms/documents-compliance/employee-compliance) when policy requires.

### Can managers view their team's quiz scores?

Managers with **Moderator** or **Course Creator** roles can open **LMS Quiz Submission** list views filtered by course and member. The **Statistics** dashboard summarizes average assessment scores by course. For official personnel files, export PDFs and store under the employee's HR documents rather than sharing desk login credentials.

## Glossary

| Term | Definition |
|------|------------|
| **LMS Course** | Training container with chapters, lessons, and assessments |
| **LMS Enrollment** | Links a User (employee) to a course with progress tracking |
| **LMS Quiz** | Assessment document composed of linked questions |
| **LMS Quiz Submission** | Record of one learner attempt with scored results |
| **LMS Training Assignment** | Due-date tracker for assigned mandatory training |
| **LMS Certificate** | Issued credential after course or evaluation completion |
| **Mandatory course** | Published course flagged for auto-enrollment on onboarding |
| **Cohort (LMS Batch)** | Scheduled group of learners with shared live sessions and assessments |
| **Employee Document** | HR file-cabinet record for attachments on the employee profile |
| **Employee Compliance** | HR ledger for regulatory and policy compliance status with renewals |
## Smooth LMS + Smooth HR capability map

Use **Smooth LMS** for training delivery and assessments, and **Smooth HR** for employee files and compliance records — both on the same account.

| Business need | Primary app | How |
|---------------|-------------|-----|
| Online training library | **Smooth LMS** | **LMS Course** with chapters, lessons, video/PDF/SCORM, quizzes, assignments |
| Assign training + track progress | **Smooth LMS** | **LMS Enrollment**, **LMS Training Assignment**, cohort batches, progress dashboards |
| Print completed tests as PDF | **Smooth LMS** | **LMS Quiz Submission** → **Quiz Submission Report** print format |
| Course completion certificates | **Smooth LMS** | **LMS Certificate** with customizable print templates |
| Employee file storage | **Smooth HR** | [Employee Document](https://smoothhiring.com/help/hrms/documents-compliance/employee-documents) with document types and expiry |
| Regulatory compliance tracking | **Smooth HR** | [Employee Compliance](https://smoothhiring.com/help/hrms/documents-compliance/employee-compliance) with **Compliance Type** renewals |
| New hire document collection | **Smooth HR** | **Employee Onboarding** portal + e-signatures |

Course completion certificates from LMS are separate from HR compliance records until HR explicitly files them. Attach LMS PDFs to **Employee Document** or update **Employee Compliance** when a training record must appear on the official employee file for audits.
## LMS roles reference

| Role | Capabilities |
|------|----------------|
| **System Manager** | Full desk access; configure LMS Settings, print formats, AI keys |
| **Moderator** | Manage all courses, quizzes, enrollments, certificates, statistics |
| **Course Creator** | Author courses, quizzes, assignments; view learner submissions for own content |
| **Batch Evaluator** | Grade submissions, conduct certificate evaluations, manage cohort assessments |
| **LMS Student** | Access `/lms` portal; take quizzes; view own certificates and assignments |

HR users without LMS roles can still manage [Employee Document](https://smoothhiring.com/help/hrms/documents-compliance/employee-documents) and [Employee Compliance](https://smoothhiring.com/help/hrms/documents-compliance/employee-compliance) records when L&D provides exported PDFs.
## Connecting training records to Smooth HR

Smooth LMS and Smooth HR share one account. Completing a course does not automatically update HR compliance—you connect the two when your policy requires it.

| LMS artifact | HR destination | When to use |
|--------------|----------------|-------------|
| **LMS Certificate** PDF | [Employee Document](https://smoothhiring.com/help/hrms/documents-compliance/employee-documents) | Store course completion certificate on the employee file |
| **Quiz Submission Report** PDF | [Employee Document](https://smoothhiring.com/help/hrms/documents-compliance/employee-documents) | Retain scored test results (safety quizzes, policy acknowledgments) |
| Mandatory training status | [Employee Compliance](https://smoothhiring.com/help/hrms/documents-compliance/employee-compliance) | Track renewal dates, expiry alerts, and audit-ready compliance status |

**Recommended workflow:** When an employee completes mandatory training and passes required assessments, download the LMS certificate or quiz PDF from the Learning portal or desk, then attach it to an **Employee Document** or update the corresponding **Employee Compliance** record. HR Managers can configure **Compliance Type** with renewal periods so expiring certifications trigger scheduled reminders—complementing LMS **Training Assignment** due dates.

New hires enrolled via **Employee Onboarding** may receive automatic LMS enrollments for courses marked **Mandatory**; HR still uses **Employee Compliance** for regulatory items (I-9, background checks) that live outside LMS.
---

## Related guides

- [AI Overview](https://smoothhiring.com/help/lms/ai/overview)
- [Taking Quizzes and Results](https://smoothhiring.com/help/lms/assessments/quizzes/taking-and-results)

---

_Last updated: May 2026_
