-
-
Notifications
You must be signed in to change notification settings - Fork 103
Title generation by ChatGPT for transfer-questions command #1059
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
Title generation by ChatGPT for transfer-questions command #1059
Conversation
...cation/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java
Show resolved
Hide resolved
...cation/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java
Outdated
Show resolved
Hide resolved
...cation/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java
Show resolved
Hide resolved
...cation/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java
Outdated
Show resolved
Hide resolved
31a0bee to
8a992ec
Compare
|
Hi @ankitsmt211. I have made the necessary changes. Please review it. |
44b0b20 to
3f73505
Compare
...cation/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java
Outdated
Show resolved
Hide resolved
...cation/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java
Outdated
Show resolved
Hide resolved
1549aef to
d590441
Compare
ankitsmt211
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is it from my side, good work
Thanks 👍
...cation/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java
Outdated
Show resolved
Hide resolved
...cation/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java
Outdated
Show resolved
Hide resolved
refactoring reviewer comments addressed prompt improved Update prompt Co-authored-by: alphaBEE <61616007+ankitsmt211@users.noreply.github.com> removed tags
31897c4 to
7918d04
Compare
|
I tested the prompt you gave on some questions, worked pretty well. I have added it. Thanks!! |
|
@vishv843 everything looks great, i wish i should have tested the prompt more before suggesting it. I tested it on a couple of more questions and it would return title in quotation marks sometimes, so i finally decided to ask gpt itself for a better prompt. Now this one i validated against more than 4-5 questions from server itself so seems to be solid overall. I'd be fine with doing the changes myself if it's a bother 😅 |
|
@ankitsmt211 imo its better to just check for quotes and remove them manually, gpt sometimes does things even when told not to if (title.matches("['\"]\\w+['\"]")) title = title.substring(1, gptTitle.length() - 1); |
this is very specific and if GPT is unreliable then we can't really handle all other cases, so imo just trying for best prompt that we can should be a priority, if you're specific with prompt it does work as expected specially when generating simple text is what it's known about. |

Previously, the title was simply created by putting the message when /transfer-questions command was invoked. The title had to be written by a human for clarity. This PR solves that issue by using ChatGPT for title generation. #1011