Steps to reproduce
The module ships with 20 pre-loaded ethical dilemma scenarios across 4 categories (military, medical, emotion, cultural). Creating custom scenarios requires manually filling in the scenario form with a description, reference decision, context details, and difficulty level. This is time-consuming and requires domain expertise. Organisations in specific industries (healthcare, finance, education) need scenarios tailored to their domain but may not have the expertise to author them.
Proposed resolution
Use AI to assist in scenario creation:
1. AI-generated scenarios: Add a "Generate Scenario with AI" button to the scenario add form. The user provides a domain (e.g., "healthcare", "financial services", "education") and optionally a topic description. An LLM generates a complete scenario including description, reference decision, context details, and suggested difficulty.
2. Scenario difficulty calibration: Add a service that analyses historical pass/fail rates per scenario and suggests adjusted difficulty ratings. Scenarios that all models pass easily should be flagged for difficulty increase.
3. Domain-specific scenario packs: Provide installable YAML scenario bundles for specific industries. These ship as additional config in the module (e.g., `config/optional/` or a separate submodule per domain).
4. Scenario validation: After AI generates a scenario, present it for human review and editing before saving. Never auto-save AI-generated scenarios without human approval.
Remaining tasks
- [ ] Add "Generate with AI" button to scenario add/edit form
- [ ] Create scenario generation service that calls AI provider
- [ ] Build review/edit step for AI-generated scenarios
- [ ] Implement difficulty calibration analysis
- [ ] Create domain-specific scenario packs (healthcare, finance, education)
- [ ] Write tests for scenario generation service
- [ ] Manual testing: generate scenarios, review, save
Issue fork ai_empathy-3583744
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
joshua1234511Comment #3
joshua1234511Comment #4
joshua1234511Comment #5
joshua1234511Comment #8
joshua1234511Comment #10
joshua1234511