Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preliminary AI Feedback for all Apollon UML Diagrams #335

Merged
merged 17 commits into from
Sep 12, 2024

Conversation

LeonWehrhahn
Copy link
Contributor

@LeonWehrhahn LeonWehrhahn commented Sep 2, 2024

Motivation and Context

The initial version of the module_modeling_llm was designed to primarily handle BPMN Diagrams. This enhanced implementation uses a new way to parse UML diagrams with a more generic approach making it work with all Apollon supported diagram types. The module has also been updated to utilize Langchain 0.2.15, which allows for the use of native structured output with json_mode for the latest OpenAI models. Additionally, it now supports both graded and non-graded feedback, ensuring that exercise solutions are not revealed when a student requests feedback.

The module structure is beeing refactoring in a separate PR to enhance maintainability. Including decomposing the generate_suggestions function into smaller, more cohesive units and moving the models into separate files

Description

  1. The new Apollon UML parser converts Apollon JSON into a text representation similar to Mermaid. This representation retains only the most essential attributes of a UML diagram, such as elements, the relationships between them, and the properties/methods associated with these elements and relationships.

  2. Since the module was originally built using an older version of Langchain, the code interfacing with Langchain has been rewritten to leverage the new LCE framework. This update also allows for the use of native structured output, eliminating the need to rely on function calling to obtain valid JSON.

  3. The module now also differentiates between graded and non-graded feedback. The is_graded parameter is set to true on the Artemis side when a tutor requests feedback suggestions. When a student requests feedback, is_graded is set to false. If is_graded is false, the feedback output is passed through a filter which rewrites the title and descriptions to avoid giving away the solution.

    Example: Here we send a student's diagram submission where the start event of a BPMN diagram is missing:

    is_graded = true:
    image
    is_graded = false:
    image

Steps for Testing

Option 1: API Testing:

  • Make direct API calls to the /feedback_suggestions endpoint of the module.
  • Test with various diagram types (BPMN, UML Class, UML Activity, etc.) to ensure the new generic approach works for all Apollon-supported diagrams.
  • For each diagram type, test both is_graded = true and is_graded = false scenarios.

Option 2. Athena Playground Testing:

  • Access the Athena Playground.
  • Use the provided examples to send requests to the Athena /feedback_suggestions endpoint.
  • Verify that that appropriate Feedback is returned.
  1. Graded vs. Non-Graded Testing:
    • For is_graded = true:
      • Verify that the feedback provides detailed information including specific solutions.
      • Check that all grading instructions were regarded in the feedback.
    • For is_graded = false:
      • Confirm that the feedback does not reveal the solution directly.
      • Ensure that the feedback is helpful but general, guiding the student without giving away answers.

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.


Screenshots

@EneaGore EneaGore added the deploy:athena-test2 Athena Test Server 2 label Sep 6, 2024
@github-actions github-actions bot added deployment-error Added by deployment workflows if an error occured and removed deploy:athena-test2 Athena Test Server 2 labels Sep 6, 2024
@LeonWehrhahn LeonWehrhahn added deploy:athena-test2 Athena Test Server 2 and removed deployment-error Added by deployment workflows if an error occured labels Sep 8, 2024
@github-actions github-actions bot added deployment-error Added by deployment workflows if an error occured and removed deploy:athena-test2 Athena Test Server 2 labels Sep 8, 2024
@LeonWehrhahn LeonWehrhahn added deploy:athena-test2 Athena Test Server 2 and removed deployment-error Added by deployment workflows if an error occured labels Sep 8, 2024
@github-actions github-actions bot added deployment-error Added by deployment workflows if an error occured and removed deploy:athena-test2 Athena Test Server 2 labels Sep 8, 2024
@ls1intum ls1intum deleted a comment from github-actions bot Sep 8, 2024
@ls1intum ls1intum deleted a comment from github-actions bot Sep 8, 2024
@ls1intum ls1intum deleted a comment from github-actions bot Sep 8, 2024
@LeonWehrhahn LeonWehrhahn added deploy:athena-test2 Athena Test Server 2 and removed deployment-error Added by deployment workflows if an error occured labels Sep 8, 2024
@LeonWehrhahn LeonWehrhahn temporarily deployed to athena-test2.ase.cit.tum.de September 8, 2024 04:34 — with GitHub Actions Inactive
@github-actions github-actions bot added lock:athena-test2 Is currently deployed to Athena Test Server 2 and removed deploy:athena-test2 Athena Test Server 2 labels Sep 8, 2024
@LeonWehrhahn LeonWehrhahn changed the title Rewrite Modeling Module to process all UML Diagram types Preliminary AI Feedback for all Apollon UML Diagrams Sep 8, 2024
@LeonWehrhahn LeonWehrhahn removed the lock:athena-test2 Is currently deployed to Athena Test Server 2 label Sep 8, 2024
@LeonWehrhahn LeonWehrhahn added deploy:athena-test1 Athena Test Server 1 deploy:athena-test2 Athena Test Server 2 and removed lock:athena-test2 Is currently deployed to Athena Test Server 2 labels Sep 12, 2024
@LeonWehrhahn LeonWehrhahn temporarily deployed to athena-test1.ase.cit.tum.de September 12, 2024 11:42 — with GitHub Actions Inactive
@LeonWehrhahn LeonWehrhahn temporarily deployed to athena-test2.ase.cit.tum.de September 12, 2024 11:42 — with GitHub Actions Inactive
@github-actions github-actions bot removed the deploy:athena-test2 Athena Test Server 2 label Sep 12, 2024
@LeonWehrhahn LeonWehrhahn added the deploy:athena-test2 Athena Test Server 2 label Sep 12, 2024
@github-actions github-actions bot added lock:athena-test2 Is currently deployed to Athena Test Server 2 lock:athena-test1 Is currently deployed to Athena Test Server 1 and removed deploy:athena-test1 Athena Test Server 1 labels Sep 12, 2024
@LeonWehrhahn LeonWehrhahn temporarily deployed to athena-test2.ase.cit.tum.de September 12, 2024 11:53 — with GitHub Actions Inactive
@github-actions github-actions bot removed the deploy:athena-test2 Athena Test Server 2 label Sep 12, 2024
Copy link
Collaborator

@FelixTJDietrich FelixTJDietrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add example data for the diagrams, I could only test BPMN
image

@LeonWehrhahn LeonWehrhahn added deploy:athena-test1 Athena Test Server 1 and removed lock:athena-test1 Is currently deployed to Athena Test Server 1 lock:athena-test2 Is currently deployed to Athena Test Server 2 labels Sep 12, 2024
@github-actions github-actions bot removed the deploy:athena-test1 Athena Test Server 1 label Sep 12, 2024
Copy link

⚠️ Unable to deploy to test servers ⚠️

The docker build needs to run through before deploying.

@github-actions github-actions bot added the deployment-error Added by deployment workflows if an error occured label Sep 12, 2024
@FelixTJDietrich FelixTJDietrich added deploy:athena-test1 Athena Test Server 1 and removed deployment-error Added by deployment workflows if an error occured labels Sep 12, 2024
@FelixTJDietrich FelixTJDietrich temporarily deployed to athena-test1.ase.cit.tum.de September 12, 2024 18:29 — with GitHub Actions Inactive
@github-actions github-actions bot added lock:athena-test1 Is currently deployed to Athena Test Server 1 and removed deploy:athena-test1 Athena Test Server 1 labels Sep 12, 2024
Copy link
Collaborator

@FelixTJDietrich FelixTJDietrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@FelixTJDietrich FelixTJDietrich merged commit acf5d26 into develop Sep 12, 2024
22 checks passed
@FelixTJDietrich FelixTJDietrich deleted the feature/modeling-feedback-all-diagram-types branch September 12, 2024 18:34
@github-actions github-actions bot removed the lock:athena-test1 Is currently deployed to Athena Test Server 1 label Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants