Skip to content

Conversation

Chandhru-27
Copy link

@Chandhru-27 Chandhru-27 commented Aug 20, 2025

Pull Request Title

Related Issue

Description

Type

  • Bug Fix
  • Feature Enhancement
  • Documentation Update
  • Code Refactoring
  • Other (please specify):

Proposed Changes

Screenshots / Code Snippets (if applicable)

How to Test

Checklist

  • The code compiles successfully without any errors or warnings
  • The changes have been tested and verified
  • The documentation has been updated (if applicable)
  • The changes follow the project's coding guidelines and best practices
  • The commit messages are descriptive and follow the project's guidelines
  • All tests (if applicable) pass successfully
  • This pull request has been linked to the related issue (if applicable)

Additional Information


Summary by cubic

Hardened the resume-improvement prompt to prevent fabricated details and keep edits grounded in the original resume, addressing issue #307. Introduces a simple analyze → map → revise flow and stricter output rules for consistent, truthful results.

  • Bug Fixes
    • Added explicit anti-fabrication rules (no new companies, titles, degrees, projects, or metrics).
    • Introduced Analysis → Mapping → Revision steps for keyword integration.
    • Allowed safe quantification via “[X]” placeholders only when counts are implied.
    • Enforced output format: Markdown only, preserve existing sections, no extra commentary.
    • Prioritized relevant content and pruning to better match the job while maintaining integrity.

Summary by CodeRabbit

  • New Features

    • None
  • Bug Fixes

    • Hardened resume improvement to prevent fabricated details and ensure outputs are grounded in user-provided data.
  • Refactor

    • Reworked AI prompt with an analyze-then-revise process, clearer role and output rules, and stricter formatting for consistent parsing and reuse.
  • Documentation

    • Updated pull request template with clearer title guidance, related issue linkage, explicit change checklist, improved testing instructions, and governance notes to emphasize quality and trust.

Copy link
Contributor

coderabbitai bot commented Aug 20, 2025

Walkthrough

Updates PR template content and overhauls a backend prompt constant for resume improvement. The new prompt enforces truth-grounding, anti-fabrication directives, a structured analysis-to-revision process, and stricter output formatting, while retaining legacy prompt context. No public APIs or exports were added or removed.

Changes

Cohort / File(s) Summary of Changes
PR Template Updates
.github/PULL_REQUEST_TEMPLATE.md
Revised template: new title line, related issue link, clarified description, selected types, explicit proposed change items, simplified test step, updated checklist, and added info emphasizing governance and reuse.
Resume Prompt Overhaul
apps/backend/app/prompt/resume_improvement.py
Replaced PROMPT constant with ethics-first, truth-grounded version: defines role/principles/task/process/output rules; adds anti-hallucination directives; structured Analyze→Map→Revise steps; placeholder handling for keywords/similarity; retains legacy prompt block as reference; preserves Markdown-only output constraint.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • srbhr

Poem

In carrot-code, I hop with care,
Guarding truth from flimsy air.
Analyze, revise—no fibs allowed,
Markdown footprints, tidy and proud.
Placeholders snug like burrow beds,
Facts-only lettuce feeds our heads.
Thump—another prompt well-plowed! 🥕🐇

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@qodo-merge-pro qodo-merge-pro bot changed the title PR for FIX - ISSUE : #307 PR for FIX - ISSUE : #307 Aug 20, 2025
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Output Constraints

The prompt mandates Markdown-only resume output and preserving structure, but also introduces placeholder quantification "[X]". Verify downstream consumers can handle these placeholders and stricter formatting without breaking parsing or introducing invalid content.

    a.  INCORPORATING KEYWORDS: Strategically integrating relevant keywords from the job description into the resume's content. Prioritize keywords with high relevance to the candidate's actual experience.
    b.  REWRITING FOR IMPACT: Rewriting bullet points and summaries to be more impactful, using strong action verbs (e.g., "Orchestrated," "Optimized," "Pioneered") and quantifiable achievements. FOR QUANTIFICATION: If numbers are implied but not stated (e.g., "managed a team"), you may use a placeholder like "[X]" (e.g., "Managed a team of [X] people"). If no number is implied, focus on the action and skill.
    c.  EMPHASIZING RELEVANCE: Reordering bullet points under a job experience to place the most relevant achievements first.
    d.  REMOVING IRRELEVANCY: Pruning obviously irrelevant or outdated information that does not support the candidate's narrative for this specific role.
    e.  MAINTAINING INTEGRITY: Ensuring all changes are a truthful representation of the candidate's background as presented in the original resume.

OUTPUT INSTRUCTIONS:
- Output ONLY the improved, updated resume in Markdown format.
- Preserve the original structure and sections (e.g., # Heading, ## Summary, ## Experience) of the provided resume.
- Do not add any new sections (like "Projects") unless they already exist in the original.
- Do not include any explanations, commentary, or metadata outside of the resume itself.
Keyword Stuffing Risk

The directive to maximize cosine similarity and integrate keywords could encourage excessive keyword insertion. Validate that tone remains natural and does not degrade resume quality or trigger spammy output in practice.

    a.  INCORPORATING KEYWORDS: Strategically integrating relevant keywords from the job description into the resume's content. Prioritize keywords with high relevance to the candidate's actual experience.
    b.  REWRITING FOR IMPACT: Rewriting bullet points and summaries to be more impactful, using strong action verbs (e.g., "Orchestrated," "Optimized," "Pioneered") and quantifiable achievements. FOR QUANTIFICATION: If numbers are implied but not stated (e.g., "managed a team"), you may use a placeholder like "[X]" (e.g., "Managed a team of [X] people"). If no number is implied, focus on the action and skill.
    c.  EMPHASIZING RELEVANCE: Reordering bullet points under a job experience to place the most relevant achievements first.
    d.  REMOVING IRRELEVANCY: Pruning obviously irrelevant or outdated information that does not support the candidate's narrative for this specific role.
    e.  MAINTAINING INTEGRITY: Ensuring all changes are a truthful representation of the candidate's background as presented in the original resume.

OUTPUT INSTRUCTIONS:
- Output ONLY the improved, updated resume in Markdown format.
Backward Compatibility

The prompt semantics changed significantly and a legacy prompt is retained as comments. Confirm no code references rely on prior instructions (e.g., section names or output format nuances) and consider removing commented legacy to avoid confusion.

# LEGACY PROMPT - USE WITH CAUTION:
# This version has known issues with potential AI hallucination.
# Remove from the file if the admin is satisfied with the new one when reviewing the changes made.

# PROMPT = """
# You are an expert resume editor and talent acquisition specialist. Your task is to revise the following resume so that it aligns as closely as possible with the provided job description and extracted job keywords, in order to maximize the cosine similarity between the resume and the job keywords.

# Instructions:
# - Carefully review the job description and the list of extracted job keywords.
# - Update the candidate's resume by:
#   - Emphasizing and naturally incorporating relevant skills, experiences, and keywords from the job description and keyword list.
#   - Where appropriate, naturally weave the extracted job keywords into the resume content.
#   - Rewriting, adding, or removing resume content as needed to better match the job requirements.
#   - Maintaining a natural, professional tone and avoiding keyword stuffing.
#   - Where possible, use quantifiable achievements and action verbs.
#   - The current cosine similarity score is {current_cosine_similarity:.4f}. Revise the resume to further increase this score.
# - ONLY output the improved updated resume. Do not include any explanations, commentary, or formatting outside of the resume itself.

# Job Description:
# ```md
# {raw_job_description}
# ```

# Extracted Job Keywords:
# ```md
# {extracted_job_keywords}
# ```

# Original Resume:
# ```md
# {raw_resume}
# ```

# Extracted Resume Keywords:
# ```md
# {extracted_resume_keywords}
# ```

# NOTE: ONLY OUTPUT THE IMPROVED UPDATED RESUME IN MARKDOWN FORMAT.
# """

Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Security
Broaden anti-fabrication constraints

Expand the anti-fabrication rule to also forbid inferring dates, locations,
technologies, or employment types not present in the original, and require
explicit marking or omission when uncertain. This closes common hallucination
gaps beyond roles and metrics.

apps/backend/app/prompt/resume_improvement.py [6]

-CORE PRINCIPLE: You MUST ground all revisions SOLELY in the information provided in the 'Original Resume'. You are FORBIDDEN from inventing new companies, job titles, degrees, certifications, or specific projects/metrics that are not present in the original text. Your goal is to reframe and emphasize existing truths to better align with the target job.
+CORE PRINCIPLE: You MUST ground all revisions SOLELY in the information provided in the 'Original Resume'. You are FORBIDDEN from inventing or inferring any new facts, including companies, job titles, degrees, certifications, specific projects/metrics, dates, locations, technologies, employment types, or responsibilities not explicitly present. If a detail is uncertain or missing, omit it rather than infer it.
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: This suggestion significantly strengthens the core anti-hallucination principle of the prompt by explicitly forbidding the invention of common but easily fabricated details like dates and locations, making the safeguard more comprehensive and robust.

High
Possible issue
Prevent misleading numeric placeholders

Using placeholders like "[X]" risks leaking non-truthful artifacts into the
final resume. Restrict placeholders to bracketed text that clearly instructs the
user to fill in later and only when the original text implies a number;
otherwise omit quantification entirely.

apps/backend/app/prompt/resume_improvement.py [15]

-b.  REWRITING FOR IMPACT: Rewriting bullet points and summaries to be more impactful, using strong action verbs (e.g., "Orchestrated," "Optimized," "Pioneered") and quantifiable achievements. FOR QUANTIFICATION: If numbers are implied but not stated (e.g., "managed a team"), you may use a placeholder like "[X]" (e.g., "Managed a team of [X] people"). If no number is implied, focus on the action and skill.
+b.  REWRITING FOR IMPACT: Rewriting bullet points and summaries to be more impactful, using strong action verbs and quantifiable achievements grounded in the original text. FOR QUANTIFICATION: Only when the original text clearly implies a quantity (e.g., "managed a team"), use a clearly marked user-fill placeholder "(fill in: team size)" instead of numbers (e.g., "Managed a team (fill in: team size)"). If no quantity is implied, do not introduce any placeholder or number; focus on the action and skill.
  • Apply / Chat
Suggestion importance[1-10]: 8

__

Why: This is a valuable suggestion that directly improves the anti-hallucination goal of the PR by replacing a potentially misleading placeholder like [X] with a clearer, user-facing instruction like (fill in: team size), reducing the risk of fabricated data.

Medium
Enforce stricter output formatting

Tighten output constraints to prevent the model from emitting backticked code
fences or headings that weren't in the original. Explicitly forbid triple
backticks and require echoing only existing section headings by exact match.

apps/backend/app/prompt/resume_improvement.py [21-24]

-- Output ONLY the improved, updated resume in Markdown format.
-- Preserve the original structure and sections (e.g., # Heading, ## Summary, ## Experience) of the provided resume.
+- Output ONLY the improved, updated resume text; DO NOT use triple backticks or code fences.
+- Preserve the original structure and section headings by exact text match (e.g., reuse only headings that already exist in the original).
 - Do not add any new sections (like "Projects") unless they already exist in the original.
-- Do not include any explanations, commentary, or metadata outside of the resume itself.
+- Do not include any explanations, commentary, metadata, or any content outside of the resume itself.
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: This suggestion enhances the prompt's robustness by adding explicit instructions to avoid common LLM formatting issues like triple backticks, which aligns perfectly with the PR's goal of creating a more reliable output.

Medium
  • More

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/backend/app/prompt/resume_improvement.py (1)

26-34: Fix unbalanced Markdown code fences (Job Description block).

The "JOB DESCRIPTION" code fence is opened but never closed, which may cause the model to treat subsequent sections as part of the same fence and degrade parsing.

Apply this diff to properly close the code fence and keep all four blocks consistently fenced:

 JOB DESCRIPTION:
-```md
-{raw_job_description}
-
-Extracted Job Keywords:
-```md
+```md
+{raw_job_description}
+```
+
+Extracted Job Keywords:
+```md
 {extracted_job_keywords}

</blockquote></details>

</blockquote></details>
🧹 Nitpick comments (4)
apps/backend/app/prompt/resume_improvement.py (2)

1-2: Update reference to correct issue number in header comment.

Header references issue #374, while this PR is for #307. Avoid confusion by aligning the comment with the actual issue or keep it generic.

-# New optimised prompt which tackles the problems stated at (https://github.com/srbhr/Resume-Matcher/issues/374)
+# Optimized prompt designed to mitigate hallucinations (see issue #307)

49-52: Consider moving the legacy prompt out of this module or namespacing it.

Keeping a large commented-out alternative in code can invite accidental reactivation and adds noise to diffs. Either remove it after review, move it to documentation/tests, or, if you want A/B capability, expose it as LEGACY_PROMPT and keep it unused by the factory.

.github/PULL_REQUEST_TEMPLATE.md (2)

38-38: Provide actionable, generic testing steps.

“Do a general tool run” is vague for a template. Offer a reproducible outline authors can adapt.

-- Do a general tool run and feed the data. You'll witness the effect of the modified prompt.
+- 1. Steps to reproduce or verify (include sample data/IDs):
+- 2. Commands to run (backend/frontend), e.g., make targets or scripts:
+- 3. Expected result (logs, UI changes, API responses):

53-53: Remove PR-specific “Additional Information” content.

Keep this section generic so authors can add context relevant to their change.

-This change is critical for maintaining user trust and ensuring the resume improvement feature provides truthful, accurate enhancements rather than fabricated content. The new prompt structure can serve as a template for other AI-powered features that require similar constraints against hallucination.
+<!-- Add any other context, screenshots, performance notes, migration steps, etc. -->
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8c75adf and c7a0338.

📒 Files selected for processing (2)
  • .github/PULL_REQUEST_TEMPLATE.md (1 hunks)
  • apps/backend/app/prompt/resume_improvement.py (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
.github/PULL_REQUEST_TEMPLATE.md (1)
apps/backend/app/services/score_improvement_service.py (1)
  • get_resume_for_previewer (179-198)
apps/backend/app/prompt/resume_improvement.py (1)
apps/backend/app/services/score_improvement_service.py (2)
  • improve_score_with_llm (141-177)
  • run (200-257)
🪛 LanguageTool
.github/PULL_REQUEST_TEMPLATE.md

[grammar] ~16-~16: There might be a mistake here.
Context: ...n "x" in the brackets --> - [x] Bug Fix - [ ] Feature Enhancement - [ ] Documentat...

(QB_NEW_EN)


[grammar] ~17-~17: There might be a mistake here.
Context: ... - [x] Bug Fix - [ ] Feature Enhancement - [ ] Documentation Update - [x] Code Refa...

(QB_NEW_EN)


[grammar] ~18-~18: There might be a mistake here.
Context: ...e Enhancement - [ ] Documentation Update - [x] Code Refactoring - [ ] Other (please...

(QB_NEW_EN)


[grammar] ~19-~19: There might be a mistake here.
Context: ...umentation Update - [x] Code Refactoring - [ ] Other (please specify): ## Proposed...

(QB_NEW_EN)


[grammar] ~25-~25: There might be a mistake here.
Context: ...-> - Completely revamped the prompt in apps/backend/app/prompt/resume_improvement.py - Added explicit anti-hallucination direct...

(QB_NEW_EN)


[grammar] ~26-~26: There might be a mistake here.
Context: ...rectives forbidding invention of details - Implemented structured "Analyze then Rev...

(QB_NEW_EN)


[grammar] ~27-~27: There might be a mistake here.
Context: ...evise" framework for better AI reasoning - Enhanced quantification handling with pl...

(QB_NEW_EN)


[grammar] ~28-~28: There might be a mistake here.
Context: ...th placeholder usage for implied metrics - Strengthened output formatting rules for...

(QB_NEW_EN)

🔇 Additional comments (1)
apps/backend/app/prompt/resume_improvement.py (1)

8-9: Placeholders and formatting look correct for str.format usage.

All named placeholders match the call site in score_improvement_service.py and use appropriate formatting for the cosine similarity.

@@ -1,49 +1,53 @@
## Pull Request Title
<!-- Provide a concise and descriptive title for the pull request -->
fix: Harden resume improvement prompt to prevent AI hallucination
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Make the PR title field generic (don’t hardcode a specific fix).

Templates should not pre-fill a specific change; it will leak into unrelated PRs.

-fix: Harden resume improvement prompt to prevent AI hallucination
+<!-- e.g., fix: concise imperative summary (max 72 chars) -->
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
fix: Harden resume improvement prompt to prevent AI hallucination
<!-- e.g., fix: concise imperative summary (max 72 chars) -->
🤖 Prompt for AI Agents
.github/PULL_REQUEST_TEMPLATE.md around line 3 contains a hardcoded PR title
("fix: Harden resume improvement prompt to prevent AI hallucination") which will
leak into unrelated PRs; replace that specific line with a generic placeholder
such as "Short, descriptive title of your change" or an empty line/instruction
like "PR title:" (do not prefill a concrete fix or prefix like "fix:") so
contributors must enter an appropriate, context-specific title.


## Related Issue
<!-- If this pull request is related to an issue, please link it here using the "#" symbol followed by the issue number (e.g., #123) -->
- Issue number : #307
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Don’t hardcode an issue number in the template.

Defaulting to #307 will mislead authors opening unrelated PRs.

-- Issue number : #307
+- Issue number: #<issue_id>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Issue number : #307
- Issue number: #<issue_id>
🤖 Prompt for AI Agents
.github/PULL_REQUEST_TEMPLATE.md around line 7 currently hardcodes "Issue number
: #307"; remove the hardcoded issue number and replace it with an empty
placeholder or instructive placeholder text (e.g., "Issue number:
#<issue-number>" or "Issue number: (if applicable)") so authors must fill the
correct issue when opening a PR; update the template line accordingly and ensure
it does not point to a specific issue by default.


## Description
<!-- Describe the changes made in this pull request. What problem does it solve or what feature does it add/modify? -->
This PR addresses a critical issue with AI hallucination in the resume improvement feature where the model would fabricate details not present in the user's original resume. The prompt in `resume_improvement.py` has been completely overhauled with explicit anti-fabrication directives and a structured reasoning framework to ensure all output is truthful and grounded solely in the provided user data.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove PR-specific description from the template body.

Templates should guide authors; they shouldn’t contain content for a particular change.

-This PR addresses a critical issue with AI hallucination in the resume improvement feature where the model would fabricate details not present in the user's original resume. The prompt in `resume_improvement.py` has been completely overhauled with explicit anti-fabrication directives and a structured reasoning framework to ensure all output is truthful and grounded solely in the provided user data.
+<!-- Describe the changes made in this pull request. What problem does it solve or what feature does it add/modify? -->
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
This PR addresses a critical issue with AI hallucination in the resume improvement feature where the model would fabricate details not present in the user's original resume. The prompt in `resume_improvement.py` has been completely overhauled with explicit anti-fabrication directives and a structured reasoning framework to ensure all output is truthful and grounded solely in the provided user data.
<!-- Describe the changes made in this pull request. What problem does it solve or what feature does it add/modify? -->
🤖 Prompt for AI Agents
In .github/PULL_REQUEST_TEMPLATE.md around line 11, the template contains a
PR-specific description about a resume_improvement.py change; remove that
specific paragraph so the template remains generic, and replace it with a
neutral placeholder or guidance such as a short prompt like "Describe the
purpose and scope of this PR" or checklist items for authors to fill in; ensure
no file- or change-specific text remains in the template.

Comment on lines +16 to 21
- [x] Bug Fix
- [ ] Feature Enhancement
- [ ] Documentation Update
- [ ] Code Refactoring
- [ ] Other (please specify):
- [x] Code Refactoring
- [ ] Other (please specify):

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Leave type checkboxes unchecked by default.

Pre-checking biases unrelated PRs and reduces signal quality in triage.

-- [x] Bug Fix
+- [ ] Bug Fix
 - [ ] Feature Enhancement
 - [ ] Documentation Update
-- [x] Code Refactoring
+- [ ] Code Refactoring
 - [ ] Other (please specify):
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- [x] Bug Fix
- [ ] Feature Enhancement
- [ ] Documentation Update
- [ ] Code Refactoring
- [ ] Other (please specify):
- [x] Code Refactoring
- [ ] Other (please specify):
- [ ] Bug Fix
- [ ] Feature Enhancement
- [ ] Documentation Update
- [ ] Code Refactoring
- [ ] Other (please specify):
🧰 Tools
🪛 LanguageTool

[grammar] ~16-~16: There might be a mistake here.
Context: ...n "x" in the brackets --> - [x] Bug Fix - [ ] Feature Enhancement - [ ] Documentat...

(QB_NEW_EN)


[grammar] ~17-~17: There might be a mistake here.
Context: ... - [x] Bug Fix - [ ] Feature Enhancement - [ ] Documentation Update - [x] Code Refa...

(QB_NEW_EN)


[grammar] ~18-~18: There might be a mistake here.
Context: ...e Enhancement - [ ] Documentation Update - [x] Code Refactoring - [ ] Other (please...

(QB_NEW_EN)


[grammar] ~19-~19: There might be a mistake here.
Context: ...umentation Update - [x] Code Refactoring - [ ] Other (please specify): ## Proposed...

(QB_NEW_EN)

🤖 Prompt for AI Agents
In .github/PULL_REQUEST_TEMPLATE.md around lines 16 to 21, the template
currently pre-checks the Bug Fix and Code Refactoring boxes; update the template
so all checkbox items are unchecked by default. Remove the leading "x" from
those two lines (and ensure no other options are pre-checked) so contributors
must explicitly select the relevant type when opening a PR.

Comment on lines +25 to +30
- Completely revamped the prompt in `apps/backend/app/prompt/resume_improvement.py`
- Added explicit anti-hallucination directives forbidding invention of details
- Implemented structured "Analyze then Revise" framework for better AI reasoning
- Enhanced quantification handling with placeholder usage for implied metrics
- Strengthened output formatting rules for consistent parsing

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Replace PR-specific change list with placeholders.

The template should prompt authors to enumerate their changes rather than prescribe this PR’s content.

-- Completely revamped the prompt in `apps/backend/app/prompt/resume_improvement.py`
-- Added explicit anti-hallucination directives forbidding invention of details
-- Implemented structured "Analyze then Revise" framework for better AI reasoning
-- Enhanced quantification handling with placeholder usage for implied metrics
-- Strengthened output formatting rules for consistent parsing
+- <List the specific changes made in this pull request>
+- <Be concrete: file paths, functions/modules touched, migrations, configs>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Completely revamped the prompt in `apps/backend/app/prompt/resume_improvement.py`
- Added explicit anti-hallucination directives forbidding invention of details
- Implemented structured "Analyze then Revise" framework for better AI reasoning
- Enhanced quantification handling with placeholder usage for implied metrics
- Strengthened output formatting rules for consistent parsing
- <List the specific changes made in this pull request>
- <Be concrete: file paths, functions/modules touched, migrations, configs>
🧰 Tools
🪛 LanguageTool

[grammar] ~25-~25: There might be a mistake here.
Context: ...-> - Completely revamped the prompt in apps/backend/app/prompt/resume_improvement.py - Added explicit anti-hallucination direct...

(QB_NEW_EN)


[grammar] ~26-~26: There might be a mistake here.
Context: ...rectives forbidding invention of details - Implemented structured "Analyze then Rev...

(QB_NEW_EN)


[grammar] ~27-~27: There might be a mistake here.
Context: ...evise" framework for better AI reasoning - Enhanced quantification handling with pl...

(QB_NEW_EN)


[grammar] ~28-~28: There might be a mistake here.
Context: ...th placeholder usage for implied metrics - Strengthened output formatting rules for...

(QB_NEW_EN)

🤖 Prompt for AI Agents
In .github/PULL_REQUEST_TEMPLATE.md around lines 25 to 30, the template
currently contains a hard-coded PR changelist that prescribes this PR's content;
replace those specific bullet points with neutral placeholders prompting authors
to list their changes (e.g., a short instruction line and an empty bullet list
or checklist for changed files, features, and fixes). Ensure the wording guides
contributors to briefly describe what changed, why, and any migration or testing
notes, without including any PR-specific content.

Comment on lines +43 to +49
- [x] The code compiles successfully without any errors or warnings
- [x] The changes have been tested and verified
- [ ] The documentation has been updated (if applicable)
- [ ] The changes follow the project's coding guidelines and best practices
- [ ] The commit messages are descriptive and follow the project's guidelines
- [ ] All tests (if applicable) pass successfully
- [ ] This pull request has been linked to the related issue (if applicable)
- [x] The changes follow the project's coding guidelines and best practices
- [x] The commit messages are descriptive and follow the project's guidelines
- [x] All tests (if applicable) pass successfully
- [x] This pull request has been linked to the related issue (if applicable)
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Uncheck all checklist items by default.

Checked boxes in the template undermine their purpose.

-- [x] The code compiles successfully without any errors or warnings
- - [x] The changes have been tested and verified
+ - [ ] The code compiles successfully without any errors or warnings
+ - [ ] The changes have been tested and verified
  - [ ] The documentation has been updated (if applicable)
-- [x] The changes follow the project's coding guidelines and best practices
-- [x] The commit messages are descriptive and follow the project's guidelines
-- [x] All tests (if applicable) pass successfully
-- [x] This pull request has been linked to the related issue (if applicable)
+ - [ ] The changes follow the project's coding guidelines and best practices
+ - [ ] The commit messages are descriptive and follow the project's guidelines
+ - [ ] All tests (if applicable) pass successfully
+ - [ ] This pull request has been linked to the related issue (if applicable)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- [x] The code compiles successfully without any errors or warnings
- [x] The changes have been tested and verified
- [ ] The documentation has been updated (if applicable)
- [ ] The changes follow the project's coding guidelines and best practices
- [ ] The commit messages are descriptive and follow the project's guidelines
- [ ] All tests (if applicable) pass successfully
- [ ] This pull request has been linked to the related issue (if applicable)
- [x] The changes follow the project's coding guidelines and best practices
- [x] The commit messages are descriptive and follow the project's guidelines
- [x] All tests (if applicable) pass successfully
- [x] This pull request has been linked to the related issue (if applicable)
- [ ] The code compiles successfully without any errors or warnings
- [ ] The changes have been tested and verified
- [ ] The documentation has been updated (if applicable)
- [ ] The changes follow the project's coding guidelines and best practices
- [ ] The commit messages are descriptive and follow the project's guidelines
- [ ] All tests (if applicable) pass successfully
- [ ] This pull request has been linked to the related issue (if applicable)
🤖 Prompt for AI Agents
.github/PULL_REQUEST_TEMPLATE.md lines 43-49: the checklist currently has
several items pre-checked which defeats the template's purpose; change all
checked boxes ([x]) to unchecked ([ ]) so every checklist item is blank by
default, ensuring contributors must consciously confirm each item when opening a
PR.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 2 files

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

@@ -1,49 +1,53 @@
## Pull Request Title
<!-- Provide a concise and descriptive title for the pull request -->
fix: Harden resume improvement prompt to prevent AI hallucination
Copy link
Contributor

Choose a reason for hiding this comment

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

PR template incorrectly filled with specific PR content instead of remaining generic

Prompt for AI agents
Address the following comment on .github/PULL_REQUEST_TEMPLATE.md at line 3:

<comment>PR template incorrectly filled with specific PR content instead of remaining generic</comment>

<file context>
@@ -1,49 +1,53 @@
 ## Pull Request Title
 &lt;!-- Provide a concise and descriptive title for the pull request --&gt;
+fix: Harden resume improvement prompt to prevent AI hallucination
 
 ## Related Issue
</file context>

- Do not add any new sections (like "Projects") unless they already exist in the original.
- Do not include any explanations, commentary, or metadata outside of the resume itself.
JOB DESCRIPTION:
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing closing markdown delimiter for JOB DESCRIPTION section

Prompt for AI agents
Address the following comment on apps/backend/app/prompt/resume_improvement.py at line 26:

<comment>Missing closing markdown delimiter for JOB DESCRIPTION section</comment>

<file context>
@@ -1,21 +1,31 @@
+# New optimised prompt which tackles the problems stated at (https://github.com/srbhr/Resume-Matcher/issues/374)
+
 PROMPT = &quot;&quot;&quot;
-You are an expert resume editor and talent acquisition specialist. Your task is to revise the following resume so that it aligns as closely as possible with the provided job description and extracted job keywords, in order to maximize the cosine similarity between the resume and the job keywords.
-
-Instructions:
-- Carefully review the job description and the list of extracted job keywords.
-- Update the candidate&#39;s resume by:
-  - Emphasizing and naturally incorporating relevant skills, experiences, and keywords from the job description and keyword list.
</file context>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant