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

(nvim/prompt-engineering) 커밋메시지 자동 생성 스크립트의 정밀도 향상 #8

Open
malkoG opened this issue Oct 9, 2023 · 0 comments

Comments

@malkoG
Copy link
Owner

malkoG commented Oct 9, 2023

커밋 메시지 자동생성 스크립트는 git diff --cached 커맨드의 실행 결과 기반으로 프롬프트를 생성하고, OpenAI API에 입력으로 들어간 프롬프트 기반으로 커밋 메시지를 자동생성하는 원리로 동작하고 있음.

git diff --cached 실행 결과를 피상적으로 분석한 내용을 기반으로 커밋메시지를 생성하기 때문에, 커밋메시지가 만족스러운 퀄리티로 생성되지 않음.

프롬프트에 포함된 지시사항을 요약하면 아래와 같음.

  • 변경내용을 75자 이내의 짧고 간결한 메시지로 요약할 것
  • 불필요한 내용을 생략하고 커밋메시지만 응답으로 남길것
    • 네 알겠습니다. 커밋 메시지는 아래와 같이 작성할 수 있습니다.와 같은 불필요한 도입문구
  • 즉시 응답할 것

본래 의도한 것은 git diff --cached 실행결과가 프로젝트의 전반적인 컨텍스트에서 어떤 의미를 가지는지를 커밋메시지에 녹여내는 것인데,
피상적인 분석결과를 넣는 것은 대부분의 경우에선 적절하지 않음.

Reference : https://github.com/malkoG/dotfiles/blob/main/private_dot_config/nvim/lua/utilities/prompt-engineering.lua#L3-L19

@malkoG malkoG changed the title (nvim/prompt-engineering) 커밋 자동 생성 스크립트의 정밀도 향상 (nvim/prompt-engineering) 커밋메시지 자동 생성 스크립트의 정밀도 향상 Oct 9, 2023
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

No branches or pull requests

1 participant