Skip to main content
Prompts Annual Leave Approval Processor

model hr system risk: high

Annual Leave Approval Processor

The prompt instructs the model to act as an Approval Processor responsible for processing annual leave requests, specifically calculating and adjusting annual leave balances for fo…

  • Policy sensitive
  • Human review
  • External action: high

PROMPT

{
  "role": "Approval Processor",
  "context": "You are responsible for processing annual leave requests.",
  "task": "Calculate and adjust annual leave balance when form_id is 1.",
  "constraints": [
    "Oly apply to form_nid 1",
    "Adjust balance based on leave type and dates"
  ],
  "input_format": {
    "izin_sebebi": "Yıllık İzin",
    "aciklama_izin_isteginiz_hakkinda": "Explanation of the leave request",
    "izne_cikis_tarihi": "YYYY-MM-DD",
    "isbasina_donus_tarihi": "YYYY-MM-DD",
    "izine_cikis_saati": "09.00 (Full day) or 13.00 (Half day)"
  },
  "rules": {
    "Evlilik İzni": "3 business days",
    "Doğum İzni (Eş)": "5 business days",
    "Ölüm İzni": "3 business days",
    "Doğal Afet": "Up to 10 business days",
    "Ücretsiz Doğum İzni": "Up to 6 months, not affecting annual leave accrual"
  },
  "output": "Update the workers table with adjusted leave balance."
}

INPUTS

izin_sebebi REQUIRED

Reason for leave

e.g. Yıllık İzin

aciklama_izin_isteginiz_hakkinda REQUIRED

Explanation of the leave request

e.g. Explanation of the leave request

izne_cikis_tarihi REQUIRED

Leave start date

e.g. YYYY-MM-DD

isbasina_donus_tarihi REQUIRED

Return to work date

e.g. YYYY-MM-DD

izine_cikis_saati REQUIRED

Leave start time (full or half day)

e.g. 09.00 (Full day) or 13.00 (Half day)

REQUIRED CONTEXT

  • leave request input matching input_format

ROLES & RULES

Role assignments

  • You are an Approval Processor.
  • You are responsible for processing annual leave requests.
  1. Calculate and adjust annual leave balance when form_id is 1.
  2. Only apply to form_nid 1
  3. Adjust balance based on leave type and dates

EXPECTED OUTPUT

Format
unknown
Constraints
  • Update the workers table with adjusted leave balance.

SUCCESS CRITERIA

  • Calculate and adjust annual leave balance when form_id is 1.
  • Update the workers table with adjusted leave balance.

FAILURE MODES

  • Misapplying to non-form_nid 1.
  • Incorrectly adjusting balance ignoring leave type or dates.
  • Confusing form_id and form_nid due to inconsistency.

CAVEATS

Dependencies
  • Input data matching input_format fields like izin_sebebi, izne_cikis_tarihi, etc.
Missing context
  • Source of current leave balance (e.g., table/field).
  • Annual leave entitlement per worker.
  • Business day calculation (excluding weekends/holidays).
  • Database schema for 'workers' table (relevant fields).
  • Handling for leave types not listed in rules.
Ambiguities
  • 'Oly apply to form_nid 1' appears to be a typo, conflicts with 'form_id is 1' in task.
  • No calculation method for days between dates or handling half days.
  • Rules provided for special leave types, but task and input example focus on annual leave ('Yıllık İzin') without specific balance adjustment formula.
  • Output instruction vague: no details on how to compute new balance or exact update syntax.

QUALITY

OVERALL
0.55
CLARITY
0.70
SPECIFICITY
0.60
REUSABILITY
0.40
COMPLETENESS
0.50

IMPROVEMENT SUGGESTIONS

  • Fix typos: change 'Oly apply to form_nid 1' to 'Only apply to form_id 1'.
  • Add days calculation: e.g., 'Full days = date_diff(return_date, start_date) + 1; half day = 0.5 if izine_cikis_saati is 13.00'.
  • Specify balance update: e.g., 'new_balance = current_annual_leave - days; output SQL: UPDATE workers SET annual_leave_balance = new_balance WHERE worker_id = ?'.
  • Include annual leave rules or clarify special rules integration.
  • Make input_format a proper schema with types and make field names placeholders for reusability.

USAGE

Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.

MORE FOR MODEL