AI Integration
:::info Source
Sourced from services/marketplace-service/AI_INTEGRATION.md in the documentation repo.
:::
1. AI Capabilities
| Capability | Prompt | Classification |
|---|---|---|
| Listing description improvement | marketplace.listing.improve | Limited-risk |
| Listing title suggestions | marketplace.listing.title | Limited-risk |
| Category/tag suggestions | marketplace.listing.taxonomy | Limited-risk |
| Search/recommendation reranking (M5+) | delegated to search-service | — |
| Pricing suggestion (M5+) | marketplace.listing.price_suggest | Limited-risk advisory |
| Review sentiment analysis | marketplace.review.sentiment | Limited-risk |
All via AIClient port.
2. Provenance
Every AI-suggested listing field tagged with aiProvenance; provider reviews + accepts (HITL).
3. Safety
- Pre-call moderation on listing body (avoid hate/illegal/adult content).
- Post-call safety filter on generated text.
- Refusal → manual authoring fallback.
4. Cost Controls
- Per-provider AI budget managed at tenant level.
- Caching: same (courseId, version) listing input → cached suggestions (24h TTL).
5. Local vs Cloud
Cloud preferred for quality. Local fallback when budget exhausted.
6. Data Privacy
- Listing content (course descriptions, marketing) may be sent to AI. No learner PII.
- Provider reviews: sentiment analysis aggregated, not exposing individual reviews.
7. Bias Monitoring (M5+)
- Pricing suggestions evaluated for demographic-parity (same-subject courses priced fairly regardless of provider identity).
- Search recommendation checked for diversity (not over-concentrating on single provider).
8. Right to Explanation
- Providers see why each AI suggestion was made (prompt + input + output).
- Admins see reranking rationale in search results (optional dev mode).