AI Integration
:::info Source
Sourced from services/sync-service/AI_INTEGRATION.md in the documentation repo.
:::
1. Scope
Minimal direct AI. One capability:
| Capability | Prompt | Classification |
|---|---|---|
| Conflict merge suggestion (M5 — Yjs CRDTs) | sync.conflict.ai_merge | Limited-risk (advisory) |
2. AI Merge Suggestion
- When Yjs CRDT merge fails (rare; schema divergence), AI suggests merge resolution.
- Input: clientPayload + serverPayload + entityType schema.
- Output: merged payload + confidence score.
- Author reviews in side-by-side diff UI; accepts or manually resolves.
- HITL mandatory; AI never auto-applies.
- Provenance recorded.
3. Safety
- No PII in merge payloads beyond author names (course drafts).
noTrainflag.- Moderation applied.
4. Cost
- Low volume (conflict merge is rare); per-tenant budget applies.
- Caching: same conflict pattern → cached suggestion.
5. Local vs Cloud
- Cloud preferred (quality for merge).
- Local fallback: simple three-way merge diff (no AI).
6. Right to Explanation
- Merge suggestion shows "what AI changed" + "why" (field-level diff).
7. Bias
- Not applicable (content merge, not learner-affecting).