Skip to content

Commit 97f7491

Browse files
committed
fix(llm): relaxed suggestion cap from hard 5 to 3-5 range
- Gemini was consistently returning only 2 suggestions due to aggressive deduplication language - changed to 3 minimum, 5 maximum at model discretion based on actual resume issues
1 parent c8183ef commit 97f7491

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/lib/engine/llm/prompts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ CRITICAL RULES:
188188
- ${jdSlice ? 'keyword match scores should be the MOST sensitive dimension to JD changes. if the JD requires skills the candidate lacks, keyword match must drop dramatically regardless of platform' : ''}
189189
- suggestions MUST quote or reference SPECIFIC text, skills, bullet points, or sections from THIS resume. never give generic advice like "add more keywords" or "quantify achievements." instead say exactly WHICH bullet point to fix, WHICH skill to add, or WHICH section is missing specific content
190190
- suggestions must reference the actual platform behavior AND the resume's actual content. e.g., if the resume lists "React" but the JD says "React.js": "Your resume says 'React' but Taleo's literal matching won't equate it with 'React.js' from the JD. Add both forms."
191-
- each platform gets MAXIMUM 1 suggestion. total across all 6 must not exceed 5 unique structured suggestions. deduplicate aggressively and only keep the highest-impact ones
191+
- return between 3 and 5 unique structured suggestions total (not per platform). 3 minimum, 5 maximum. use your judgment based on how many genuine issues the resume has. deduplicate across platforms, tag each suggestion with which platforms it helps most, and only keep the highest-impact ones
192192
- the detail bullets should tell the user EXACTLY what to change: quote the current text and suggest the improved version. think "change X to Y" not "consider improving X"
193193
- IMPORTANT: the resume text may contain LaTeX rendering artifacts like #, ï, §, Æ, €, fi, fl ligatures, or unicode combining characters. these are font rendering artifacts from PDF extraction, NOT actual special characters in the resume. do NOT flag these as formatting issues or "special characters detected." treat them as normal text
194194

src/lib/stores/scores.svelte.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { ParsedJobDescription } from '$engine/job-parser/types';
55
import {
66
collection,
77
addDoc,
8+
setDoc,
89
getDocs,
910
deleteDoc,
1011
doc,
@@ -158,7 +159,9 @@ class ScoresStore {
158159
private async writeScanLog(entry: Omit<ScanHistoryEntry, 'id'>, uid: string) {
159160
try {
160161
const user = authStore.user;
161-
await addDoc(collection(db, 'scan_logs'), {
162+
const now = new Date();
163+
const docId = `${now.toISOString().replace(/[:.]/g, '-')}_${uid.slice(0, 6)}`;
164+
await setDoc(doc(db, 'scan_logs', docId), {
162165
uid,
163166
email: user?.email ?? null,
164167
displayName: user?.displayName ?? null,

0 commit comments

Comments
 (0)