Retrieval-augmented commit generation using project history #2
Labels
No labels
Compat
Breaking
Kind
Bug
Kind
Chore
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Topic/Security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: glenux/llm-commit-gen#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Note: Copy of issue from upstream project: https://github.com/GNtousakis/llm-commit/issues/18
Enhance
llm-commit
by retrieving relevant historical context (commit diffs, messages, and code) to improve the quality and consistency of generated commit messages. This is done via retrieval-augmented generation (RAG) using semantic search.Benefits:
Problem
Relying solely on the staged diff (and optional hint) limits the model’s ability to understand change intent, project conventions, or past phrasing patterns. This can result in vague, inconsistent, or redundant commit messages.
Proposed solution
Add a lightweight RAG system that retrieves up to 3 relevant items per context type from the local repository history.
Context sources:
Retrieval mechanism:
text-embedding-3-small
,MiniLM
)Storage options:
.git/llm-commit-vectors.db
) or use in-memory index when persistence isn’t neededPrompt structure:
Retrieval limits and controls
Rather than hardcoding item counts, implement a flexible strategy:
--rag-max-tokens 2400
)--rag-limit 3
) or by cost for API-based models (e.g.--rag-cost $0.1
)[feature] Retrieval-augmented commit generation using project historyto Retrieval-augmented commit generation using project history