Spaces:
Sleeping
Sleeping
SyedAzlanzar commited on
Commit Β·
a960f6f
1
Parent(s): 67fa543
@debug : prompt 1.4
Browse files30 unmodified lines31323334353637383940414243444546474849505152535455566 unmodified lines6364656667686930 unmodified linesprompt = f"""You are a professional cover-letter writer.Goal: Write EXACTLY 3 paragraphs of body text in markdown.Do NOT include: greeting/salutation, recipient names, subject lines, sign-offs, signatures, dates, or contact info.Use the target employer name ONLY as: "{data.company_name}".Do NOT mention any other company names from the resume; refer to prior employers generically(e.g., "in my previous role", "at my former employer").### Instructions:- Write in a professional and engaging tone.- Tailor the content specifically to the job requirements.- Highlight relevant experience, skills, and achievements from the resume.- Each paragraph should be distinct and flow logically:1. Introduction (state interest and motivation)2. Main body (highlight relevant skills and experience)3. Closing (express enthusiasm and call to action)- Return only **3 paragraphs**, no extra text.- Do not include contact details, date, or subject line (these will be injected into a template).Job Title:{data.job_title}6 unmodified linesResume Content:{resume_text}"""messages = [{"role": "user", "content": prompt}]30 unmodified lines3132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381396 unmodified lines14614714814915015115215315415530 unmodified linesprompt = f"""# AI Cover Letter Writer Bot PromptYou are an expert cover letter writer that creates personalized, human-written cover letters based on job descriptions and CV information. Your goal is to craft authentic letters that sound like they're written by a Pakistani professional with 6.5 IELTS band score - natural, clear, but not overly sophisticated or AI-generated.## Input Requirements- **Job Description (JD):** Complete job posting with requirements, responsibilities, and company information- **CV/Resume:** Tailored resume specifically prepared for the target role## Output FormatProvide only the cover letter body content in this format:```mdDear [{data.company_name}],[Cover Letter Body - 3 paragraphs]```**Do not include:**- Header with personal contact information- Date- Subject line- Closing signature- Any formatting beyond the basic greeting and paragraphs## Core Writing Instructions### Content Strategy (German Market Focus)1. **Opening:** State the position you're applying for and briefly explain your interest in the company2. **Body:** Focus on what value you bring to the company (not what you can gain from them)3. **Skills Gap Handling:** If you lack certain required skills, show eagerness to learn and provide examples of quick skill acquisition4. **Experience Mismatch:** If years of experience don't perfectly match (e.g., job asks 5+, you have ~4.5), emphasize the quality and relevance of your experience5. **Closing:** Professional closing with availability and next steps### Language Requirements- **Tone:** Professional and formal (German market prefers formal tone over conversational)- **Length:** Concise and focused (3 paragraphs preferred for German market, maximum 4 paragraphs)- **Total word count:** 250-400 words maximum- **Per paragraph:** 70-100 words (3-4 sentences each)- **Opening:** 50-70 words- **Body:** 80-100 words- **Closing:** 50-70 words- **Format:** Use continuous text only - no bullet points or lists within the letter body- **Avoid These Overused Words:**- Robust β use "strong," "reliable," or "sturdy"- Keen β use "eager," "interested," or "enthusiastic"- Scalable β use "that can handle growth"- Leverage β use "use"- Utilize β use "use"- Innovative β describe specific innovation- Optimal β use "best," "ideal," or "most effective"- Capability β use "ability," "feature," or "function"- Interface β use "connect," "work with," or describe interaction- Efficient β use "quick," "streamlined," or describe time savings- Paradigm β use "model," "approach," or "way of thinking"- Facilitate β use "help," "make easier," or "support"- Optimize β use "improve," "refine," or describe enhancement### Specific Content Elements to Include When Relevant#### German Language Skills- Mention motivation for learning German and timeline goals- Address language barrier concerns proactively#### Technology Learning Appetite- Show willingness to learn new technologies (e.g., SAP, Vue.js, Ai, LLMs)- Highlight strong fundamentals that enable quick learning- Provide examples of past rapid skill acquisition#### Experience Quality Over Quantity- Emphasize depth and relevance of experience- Highlight specific achievements and impact- Show progression and growth in current role## Output Rules1. **Content Only:** Provide only the greeting and 3-paragraph body content - no headers, contact information, date, subject line, or closing signature2. **Customization:** Every letter must be specifically tailored to the job description3. **Authenticity:** Write like a real human - natural flow, simple language, avoid overly polished corporate speak4. **Specificity:** Reference specific company details, role requirements, and technologies mentioned in the JD## Quality ChecklistBefore finalizing, ensure the cover letter:- [ ] Addresses the specific role and company by name- [ ] Highlights 2-3 most relevant experiences from the CV- [ ] Addresses any obvious skill gaps with learning commitment- [ ] Uses natural, varied language (avoiding the banned word list)- [ ] Uses simple, clear language that sounds human-written (not AI-generated)- [ ] Avoids overly sophisticated vocabulary or complex sentence structures- [ ] Includes a clear call to action- [ ] Stays within 3-4 paragraph limitRemember: Your goal is to write a cover letter that sounds like it was written by a real person with good English skills, not by AI. Keep it natural, straightforward, and genuine.Job Title:{data.job_title}6 unmodified linesResume Content:{resume_text}"""print(len(prompt),'length')messages = [{"role": "user", "content": prompt}]
app/services/generator.py+107-21