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

Simple AI mentor chat logic #133

Merged
merged 75 commits into from
Nov 10, 2024
Merged

Conversation

milesha
Copy link
Contributor

@milesha milesha commented Nov 4, 2024

Motivation

The AI Mentor is supposed to improve the learning outcomes by guiding the student through a set of questions (current progress, faced challenges, future plans).

Description

This PR adds a simple prompt as well as persistent session thread memory to the LLM, so it can directly reference the human messages while still following the conversation steps.

  • LangGraph is used for the thread memory implementation
    • LangGraph includes built-in persistence, enabling advanced memory features.
    • When we want to add actions like creating a GitHub issues as a Mentor it can be done easier.
  • "The model on its own does not have any concept of state." (LangChain docs) - so we add a state class, which includes the current step in the chat with 0 being Project State, 1 Challenges and 2 Promises.
    • This approach makes it easier to monitor the current answer of the user (without analysing the actual input)
    • Currently the thread_id is a random number, which would be changed when integrating with Java Spring Boot

Additional

  • GitHub lint workflow re-named to "intelligence service QA" for the consistency with webapp
  • GitHub workflow for generation of intelligence api fixed (would fail because of the poetry lock update)

Checklist

General

  • PR title is clear and descriptive
  • PR description explains the purpose and changes
  • Code follows project coding standards
  • Self-review of the code has been done
  • Changes have been tested locally
  • Screenshots have been attached (if applicable)
  • Documentation has been updated (if applicable)

Client (if applicable)

  • UI changes look good on all screen sizes and browsers
  • No console errors or warnings
  • User experience and accessibility have been tested
  • Added Storybook stories for new components
  • Components follow design system guidelines (if applicable)

Server (if applicable)

  • Code is performant and follows best practices
  • No security vulnerabilities introduced
  • Proper error handling has been implemented
  • Added tests for new functionality
  • Changes have been tested in different environments (if applicable)

@github-actions github-actions bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Nov 4, 2024
@github-actions github-actions bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Nov 5, 2024
@github-actions github-actions bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Nov 5, 2024
@github-actions github-actions bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed autocommit-openapi size:L This PR changes 100-499 lines, ignoring generated files. labels Nov 5, 2024
GODrums
GODrums previously approved these changes Nov 9, 2024
Copy link
Collaborator

@GODrums GODrums left a comment

Choose a reason for hiding this comment

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

We tested this on Tuesday, looks good to me so far.

The Intelligence Service QA workflow still reports 1 style issue though :)

@github-actions github-actions bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Nov 10, 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.

I will just merge this PR since you said you are working on a follow-up anyways.

@FelixTJDietrich FelixTJDietrich merged commit ee0d907 into develop Nov 10, 2024
5 checks passed
@FelixTJDietrich FelixTJDietrich deleted the feature/add-simple-mentor-logic branch November 10, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application-server feature intelligence-service priority:medium Important but not urgent tasks. size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants