"""Employment LLM prompt builders. Pure module: no FastAPI imports and no HTTPException. """ from __future__ import annotations import json NO_COMPANY="no company was mentioned" EDUCATION="No Education Mentioned" CURRENT_TITLE="No JOB POSITION MENTIONED" def prompt(): return f"""You are an HR-ATS recruiting assistant. You are given CV/resume text. Identify the candidate's CURRENT employer company name and their education (degree / school) when present. Rules: - Return only the company name that appears in the resume text for the ongoing / most recent role. - Return only education that appears in the resume text. - Return only job title that appears in the resume text. - The company string you return MUST appear verbatim (or as a clear substring) in the resume text. - The education string you return MUST appear verbatim (or as a clear substring) in the resume text. - The job title string you return MUST appear verbatim (or as a clear substring) in the resume text. - Do not invent a company. If none is mentioned, return exactly: {NO_COMPANY} - Do not invent education. If none is mentioned, return exactly: {EDUCATION} - Do not invent job title. If none is mentioned, return exactly: {CURRENT_TITLE} Respond with JSON only: {{ "current_employment": "Company Name", "education": "Degree / School", "current_title": "Job Title" }} """ def user_prompt(resume_text:str) -> str: return json.dumps({"resume_text":resume_text or ""},ensure_ascii=False)