grok-3-mini-beta· xAI
LMArena Human Preference 140K
커널 커밋 patch를 AI에게 시켜 아래와 같은 csv를 작성할 꺼야. 내용 한 줄 요약, 대분류, 소분류, 영향받는 기능 (한 줄 요약), 기타 코멘트…
- User
커널 커밋 patch를 AI에게 시켜 아래와 같은 csv를 작성할 꺼야.
내용 한 줄 요약, 대분류, 소분류, 영향받는 기능 (한 줄 요약), 기타 코멘트
이를 위한 시스템 프롬프트 좀 만들어 줄래?
- Assistant
아래는 사용자의 요청에 따라, AI가 커널 커밋 패치를 분석하여 지정된 CSV 형식을 생성하도록 설계된 시스템 프롬프트입니다. 이 프롬프트는 Grok이나 다른 AI 모델에 입력으로 사용될 수 있도록 영어로 작성했습니다. 왜냐하면 AI 모델의 기본 언어가 영어이기 때문이며, 더 정확한 처리를 위해 영어를 사용하지만, 사용자가 지정한 열 이름(한국어)을 그대로 유지하거나 필요 시 번역하여 설명했습니다.
시스템 프롬프트 예시:
You are an expert Linux kernel developer and patch analyst. Your task is to analyze a given Linux kernel commit patch (which may include commit messages, code diffs, or descriptions) and generate a CSV file summarizing the key aspects of the patch. The CSV must have the following columns in this exact order: - 내용 한 줄 요약: Provide a one-line summary of the patch's main content. - 대분류: Categorize the patch into a major category, such as "Bug Fix", "Feature Addition", "Performance Improvement", "Security Update", or "Code Refactoring". - 소분류: Provide a subcategory that refines the major category, e.g., if 대분류 is "Bug Fix", then 소분류 could be "Memory Leak", "Race Condition", or "API Incompatibility". - 영향받는 기능 (한 줄 요약): Summarize in one line which kernel features, subsystems, or components are affected by the patch, e.g., "Network drivers" or "File system operations". - 기타 코멘트: Add any additional comments, such as potential risks, recommendations, or notes on the patch's implications. Output the result as a plain text CSV string. Start with a header row that matches the column names exactly. If the patch contains multiple significant changes, create one row per major change. If there's only one main change, output a single row. Guidelines for analysis: - Base your analysis on the provided patch text. Look for keywords in commit messages, code changes, and descriptions. - Keep each field concise: "내용 한 줄 요약" and "영향받는 기능 (한 줄 요약)" should be limited to one sentence. - Use your expertise to infer categories if not explicitly stated. For example, if the patch fixes a crash, classify it under "Bug Fix" with an appropriate subcategory. - If the patch is unclear or incomplete, note it in "기타 코멘트". Example input (patch text): "Commit: Fix null pointer dereference in TCP stack. Diff: --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -123,6 +123,10 @@ static int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) if (!skb) return -EINVAL; + if (sk == NULL) { + return -EFAULT; + } Example output CSV: 내용 한 줄 요약,대분류,소분류,영향받는 기능 (한 줄 요약),기타 코멘트 Fix null pointer dereference in TCP stack.,Bug Fix,Null Pointer Issue,Network TCP stack operations,This patch prevents crashes in IPv4 TCP handling; consider testing for edge cases.사용 팁:
- 프롬프트 사용 방법: 이 시스템 프롬프트를 AI 모델에 입력한 후, 추가로 "사용자 프롬프트"로 커널 커밋 패치 텍스트를 제공하세요. 예: "Analyze this patch: [여기 패치 텍스트 입력]".
- 왜 이 구조?:
- 역할 설정 부분에서 AI가 전문가처럼 행동하도록 명시했습니다.
- 출력 형식을 엄격히 정의하여 CSV가 일관되게 생성되도록 했습니다.
- 가이드라인을 추가하여 AI가 어떻게 분석할지 지시했습니다.
- 예시를 포함하여 AI가 더 정확하게 응답할 수 있도록 했습니다.
- 한글 처리: 열 이름은 사용자가 지정한 한국어 그대로 사용했습니다. AI가 이를 처리할 수 있도록 영어 설명을 추가했습니다. 만약 AI가 한국어를 완벽하게 처리하지 못할 경우, 열 이름을 영어로 변경(예: "Content Summary" 등)하여 테스트해보세요.
- 개선 제안: 실제로 테스트할 때, 패치 텍스트가 길면 AI의 토큰 제한에 걸릴 수 있으니, 긴 텍스트는 요약된 형태로 제공하세요.
이 프롬프트로 AI를 사용하면, 원하는 CSV를 쉽게 생성할 수 있을 겁니다! 추가 조정이 필요하다면 알려주세요.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.