Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion laiser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 10 additions & 2 deletions laiser/skill_extractor_refactored.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
standard_prompt = f"""
task: "Skill Extraction from Job Descriptions"

description: |
Expand All @@ -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.
Expand All @@ -354,7 +362,7 @@ def skill_extraction_prompt(self, cleaned_description):
]
}}
"""
return prompt
return standard_prompt

def extract_and_map_skills(self,input_data,text_columns):
# 1. Clean job description (build text from dict)
Expand Down