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

Command icon 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

joshua1234511 created an issue. See original summary.

joshua1234511’s picture

joshua1234511’s picture

Version: 1.0.2 » 1.0.3
joshua1234511’s picture

Assigned: Unassigned » joshua1234511

  • joshua1234511 committed d9aca5c4 on 1.0.x
    Issue #3583744: Add AI-assisted scenario builder with domain generation.
    
joshua1234511’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

joshua1234511’s picture

Status: Fixed » Closed (fixed)