Skip to content

[Feat] 직무 중분류 평가 기준 매칭 및 프롬프트 반영 보강#123

Merged
whc9999 merged 2 commits into
devfrom
feat/job-category-evaluation-criteria
Jul 7, 2026
Merged

[Feat] 직무 중분류 평가 기준 매칭 및 프롬프트 반영 보강#123
whc9999 merged 2 commits into
devfrom
feat/job-category-evaluation-criteria

Conversation

@whc9999

@whc9999 whc9999 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

✨ 어떤 이유로 PR를 하셨나요?

  • feature 병합
  • 버그 수정(아래에 issue #를 남겨주세요)
  • 코드 개선
  • 코드 수정
  • 배포
  • 기타(아래에 자세한 내용 기입해주세요)

📋 세부 내용 - 왜 해당 PR이 필요한지 작업 내용을 자세하게 설명해주세요

  • 직무 중분류 평가 기준이 없으면 프롬프트 보조 기준 섹션 생략
  • 중분류명 매칭 시 공백 및 구분자 정규화 처리
  • blank 중분류 기준 row skip 시 warn 로그 추가
  • AnalysisService payload에 중분류 평가 기준이 연결되는 경로 테스트 추가
  • Provider 정규화 조회 테스트 및 프롬프트 섹션 생략 테스트 보강

📸 작업 화면 스크린샷

⚠️ PR하기 전에 확인해주세요

  • 로컬테스트를 진행하셨나요?
  • 머지할 브랜치를 확인하셨나요?
  • 관련 label을 선택하셨나요?

🚨 관련 이슈 번호 [ ]

Summary by CodeRabbit

  • New Features

    • Added job-category-specific evaluation criteria to analysis results and prompt generation.
    • Introduced support for loading category-based guidance from built-in data and applying it when available.
    • Expanded analysis payloads to carry optional category criteria through the workflow.
  • Tests

    • Added coverage for prompt formatting, criteria lookup, and analysis execution behavior with and without category criteria.

- 직무 중분류 평가 기준이 없으면 프롬프트 보조 기준 섹션 생략
- 중분류명 매칭 시 공백 및 구분자 정규화 처리
- blank 중분류 기준 row skip 시 warn 로그 추가
- AnalysisService payload에 중분류 평가 기준이 연결되는 경로 테스트 추가
- Provider 정규화 조회 테스트 및 프롬프트 섹션 생략 테스트 보강
@whc9999 whc9999 self-assigned this Jul 7, 2026
@whc9999 whc9999 added the ✨ feat New feature or request label Jul 7, 2026
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@whc9999, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 48 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7be0d0f5-d40c-42e0-a42a-503b10fbf8e6

📥 Commits

Reviewing files that changed from the base of the PR and between 1830e66 and 7ace114.

📒 Files selected for processing (1)
  • src/main/resources/analysis/job-category-evaluation-criteria.json
📝 Walkthrough

Walkthrough

Introduces JobCategoryEvaluationCriteria DTO and a JSON dataset defining per-category evaluation criteria. Adds JobCategoryEvaluationCriteriaProvider to load/normalize/lookup criteria. Wires criteria through AnalysisExecutionPayload and AnalysisService, and extends AnalysisAiClient prompt-building to include a formatted job-category criteria section when available.

Changes

Job Category Evaluation Criteria

Layer / File(s) Summary
Criteria record and JSON dataset
.../dto/criteria/JobCategoryEvaluationCriteria.java, src/main/resources/analysis/job-category-evaluation-criteria.json
New record defining category fields (included jobs, competency tags, related actions/experiences/keywords, examples) and a JSON dataset covering many job categories.
Criteria provider: loading and lookup
.../service/JobCategoryEvaluationCriteriaProvider.java, .../JobCategoryEvaluationCriteriaProviderTest.java
Loads criteria from the JSON resource at construction, normalizes middle-name keys, detects duplicates, exposes findByMiddleName, and includes lookup/normalization tests.
Payload extension for criteria
.../service/AnalysisExecutionPayload.java
Adds a jobCategoryEvaluationCriteria record component and a backward-compatible constructor overload defaulting it to null.
AnalysisService criteria wiring
.../service/AnalysisService.java, .../AnalysisServiceTest.java
Resolves criteria via the provider using job posting middle classification, includes it in the execution payload, conditionally calls the criteria-aware analyze overload, and adds/extends related tests and test data builders.
Prompt formatting with criteria section
.../service/AnalysisAiClient.java, .../AnalysisAiClientTest.java
Adds a criteria-aware analyze overload, threads criteria through buildPrompt, formats a job-category auxiliary evaluation section with item limits/truncation, and tests prompt content with/without criteria.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AnalysisService
  participant JobCategoryEvaluationCriteriaProvider
  participant AnalysisExecutionPayload
  participant AnalysisAiClient

  AnalysisService->>JobCategoryEvaluationCriteriaProvider: findByMiddleName(jobPosting middle name)
  JobCategoryEvaluationCriteriaProvider-->>AnalysisService: Optional<JobCategoryEvaluationCriteria>
  AnalysisService->>AnalysisExecutionPayload: build payload with criteria (or null)
  AnalysisService->>AnalysisAiClient: analyze(payload) / analyze(jobPosting, questions, criteria)
  AnalysisAiClient->>AnalysisAiClient: buildPrompt(..., jobCategoryEvaluationCriteria)
  AnalysisAiClient->>AnalysisAiClient: formatJobCategoryEvaluationCriteriaSection(criteria)
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: job-category evaluation criteria matching and prompt integration.
Description check ✅ Passed The description follows the template and covers the reason, changes, and checklist, with only non-critical fields left empty.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/job-category-evaluation-criteria

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/main/java/com/jobdri/jobdri_api/domain/analysis/service/JobCategoryEvaluationCriteriaProvider.java (1)

64-70: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

normalizeKey misses Unicode whitespace (full-width space, NBSP).

\\s+ in Java only matches ASCII whitespace by default; it does not match full-width space (U+3000) or non-breaking space (U+00A0), both of which can appear in Korean-sourced text. If any real middle-classification name contains these characters, normalization silently fails and the lookup misses.

♻️ Suggested fix
     private String normalizeKey(String value) {
         return value.trim()
                 .replace('ㆍ', '·')
                 .replace('・', '·')
                 .replace('/', '·')
-                .replaceAll("\\s+", "");
+                .replaceAll("\\p{White_Space}+", "");
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/java/com/jobdri/jobdri_api/domain/analysis/service/JobCategoryEvaluationCriteriaProvider.java`
around lines 64 - 70, The normalizeKey method in
JobCategoryEvaluationCriteriaProvider does not remove Unicode whitespace like
full-width space and NBSP, so lookups can still miss for Korean-sourced text.
Update normalizeKey to normalize all whitespace characters, not just ASCII, by
using a Unicode-aware whitespace removal strategy before returning the key,
while keeping the existing character replacements for separators and dot
variants.
src/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisService.java (1)

149-158: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Redundant branch — both paths behave identically.

analyze(JobPosting, List<Question>) just forwards to the 3-arg overload with null criteria, so this null-check branch can be removed.

♻️ Proposed simplification
 public AnalysisLlmResponse executeAnalysis(AnalysisExecutionPayload payload) {
-    if (payload.jobCategoryEvaluationCriteria() == null) {
-        return analysisAiClient.analyze(payload.jobPosting(), payload.answeredQuestions());
-    }
     return analysisAiClient.analyze(
             payload.jobPosting(),
             payload.answeredQuestions(),
             payload.jobCategoryEvaluationCriteria()
     );
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisService.java`
around lines 149 - 158, The null-check in AnalysisService.executeAnalysis is
redundant because both branches end up calling analysisAiClient.analyze with the
same inputs. Simplify executeAnalysis by removing the if/else and always
invoking the overload that accepts jobCategoryEvaluationCriteria, since
analyze(JobPosting, List<Question>) already delegates to the 3-arg method when
criteria is null.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main/resources/analysis/job-category-evaluation-criteria.json`:
- Around line 587-594: The relatedKeywords array in
job-category-evaluation-criteria.json has a split phrase caused by the unescaped
comma in the Photoshop/Illustrator entry. Merge the two entries into a single
keyword string so formatCriteriaList renders one bullet item, and verify the
surrounding list under the relatedKeywords field remains valid JSON and
preserves the intended wording.

---

Nitpick comments:
In
`@src/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisService.java`:
- Around line 149-158: The null-check in AnalysisService.executeAnalysis is
redundant because both branches end up calling analysisAiClient.analyze with the
same inputs. Simplify executeAnalysis by removing the if/else and always
invoking the overload that accepts jobCategoryEvaluationCriteria, since
analyze(JobPosting, List<Question>) already delegates to the 3-arg method when
criteria is null.

In
`@src/main/java/com/jobdri/jobdri_api/domain/analysis/service/JobCategoryEvaluationCriteriaProvider.java`:
- Around line 64-70: The normalizeKey method in
JobCategoryEvaluationCriteriaProvider does not remove Unicode whitespace like
full-width space and NBSP, so lookups can still miss for Korean-sourced text.
Update normalizeKey to normalize all whitespace characters, not just ASCII, by
using a Unicode-aware whitespace removal strategy before returning the key,
while keeping the existing character replacements for separators and dot
variants.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 890228ff-51b3-4a75-a0ef-221cd07d525d

📥 Commits

Reviewing files that changed from the base of the PR and between 140f070 and 1830e66.

📒 Files selected for processing (9)
  • src/main/java/com/jobdri/jobdri_api/domain/analysis/dto/criteria/JobCategoryEvaluationCriteria.java
  • src/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisAiClient.java
  • src/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisExecutionPayload.java
  • src/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisService.java
  • src/main/java/com/jobdri/jobdri_api/domain/analysis/service/JobCategoryEvaluationCriteriaProvider.java
  • src/main/resources/analysis/job-category-evaluation-criteria.json
  • src/test/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisAiClientTest.java
  • src/test/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisServiceTest.java
  • src/test/java/com/jobdri/jobdri_api/domain/analysis/service/JobCategoryEvaluationCriteriaProviderTest.java

Comment thread src/main/resources/analysis/job-category-evaluation-criteria.json
- Photoshop, Illustrator 관련 키워드를 하나의 문자열로 병합
- 직무 중분류 평가 기준 JSON 유효성 확인
- Provider resource 로딩 테스트 통과 확인
@whc9999 whc9999 merged commit 7268238 into dev Jul 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feat New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant