From 2429bed1ff3d65172240cc2f31226f146e9625f3 Mon Sep 17 00:00:00 2001 From: Deepika Reddygari <156540315+DeepikaReddygari@users.noreply.github.com> Date: Sat, 3 Jan 2026 19:44:31 -0500 Subject: [PATCH 1/2] Few shot prompt enhancement --- laiser/skill_extractor_refactored.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/laiser/skill_extractor_refactored.py b/laiser/skill_extractor_refactored.py index 9755e84..9c36838 100644 --- a/laiser/skill_extractor_refactored.py +++ b/laiser/skill_extractor_refactored.py @@ -321,8 +321,9 @@ def strong_preprocessing_prompt(self,raw_description): self.tokenizer, self.model, self.api_key) cleaned = response.split("### CLEANED JOB DESCRIPTION:")[-1].strip() return cleaned - def skill_extraction_prompt(self, cleaned_description): - prompt = f""" + + def fs_gold_skill_extraction_prompt(cleaned_description): + standard_prompt = f""" task: "Skill Extraction from Job Descriptions" description: | @@ -336,6 +337,13 @@ def skill_extraction_prompt(self, cleaned_description): - Use only concise skill phrases (prefer noun phrases, avoid sentences). - Do not invent new skills or make assumptions beyond the provided text. + examples: + Example 1 (Focus: Soft Skills & Communication) Input: "Strong verbal and written communication skills, with the ability to explain complex technical concepts clearly to both technical and non-technical audiences. Confident presenter, capable of articulating insights, results, and strategies to stakeholders." Output: ['Strong verbal and written communication skills', 'explain complex technical concepts', 'Confident presenter', 'capable of articulating insights'] + + Example 2 (Focus: Math & Technical Background) Input: "Qualified candidates will have a strong mathematical background (statistics, linear algebra, calculus, probability, and optimization). Experience with deep learning, natural language processing, or application of large language models is preferred." Output: ['Strong mathematical background', 'statistics, linear algebra, calculus, probability, and optimization', 'deep learning', 'natural language processing', 'application of large language models'] + + Example 3 (Focus: Core Responsibilities) Input: "Lead the research, design, implementation, and deployment of Machine Learning algorithms. Assist and enable C3 AI’s federal customers to build their own applications on the C3 AI Suite. Contribute to the design of new features." Output: ['Lead the research, design, implementation, and deployment of Machine Learning algorithms', 'Assist and enable C3 AI’s federal customers to build their own applications on the C3 AI Suite.', 'Contribute to the design and implementation of new features of the C3 AI Suite.'] + formatting_rules: - Return the output as valid JSON. - The JSON must have a single key "skills" whose value is a list of skill strings. @@ -354,7 +362,9 @@ def skill_extraction_prompt(self, cleaned_description): ] }} """ - return prompt + return standard_prompt + +fs_gold_prompt = fs_gold_skill_extraction_prompt(cleaned_description) def extract_and_map_skills(self,input_data,text_columns): # 1. Clean job description (build text from dict) From c69be39a73c1f8f2ab6cfaa53dc3ca3bcca4c11a Mon Sep 17 00:00:00 2001 From: DeepikaReddygari <156540315+DeepikaReddygari@users.noreply.github.com> Date: Sat, 3 Jan 2026 20:04:48 -0500 Subject: [PATCH 2/2] Version bump and bug fixes --- laiser/__init__.py | 2 +- laiser/skill_extractor_refactored.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/laiser/__init__.py b/laiser/__init__.py index 861cf20..cbd642a 100644 --- a/laiser/__init__.py +++ b/laiser/__init__.py @@ -4,7 +4,7 @@ A Python package for extracting and aligning skills from text using AI models. """ -__version__ = "0.3.12" +__version__ = "0.3.2" # Import main classes for easy access try: diff --git a/laiser/skill_extractor_refactored.py b/laiser/skill_extractor_refactored.py index 9c36838..3a5ee51 100644 --- a/laiser/skill_extractor_refactored.py +++ b/laiser/skill_extractor_refactored.py @@ -322,7 +322,7 @@ def strong_preprocessing_prompt(self,raw_description): cleaned = response.split("### CLEANED JOB DESCRIPTION:")[-1].strip() return cleaned - def fs_gold_skill_extraction_prompt(cleaned_description): + def skill_extraction_prompt(self, cleaned_description): standard_prompt = f""" task: "Skill Extraction from Job Descriptions" @@ -364,8 +364,6 @@ def fs_gold_skill_extraction_prompt(cleaned_description): """ return standard_prompt -fs_gold_prompt = fs_gold_skill_extraction_prompt(cleaned_description) - def extract_and_map_skills(self,input_data,text_columns): # 1. Clean job description (build text from dict) text_blob = " ".join(str(input_data.get(col, "")) for col in text_columns).strip()