该存储库包含利用法学硕士在人力资源管理 (HRM) 领域执行问卷生成任务的所有数据集、代码和补充材料。目前我们专注于调查,通常缺乏正确/错误或评分答案。具体来说,调查问卷有助于收集员工的持续反馈和意见,使组织能够监控和增强员工满意度和潜力评估等各个方面。
鉴于缺乏足够的数据集,我们建立了新的人力资源调查集合。有关数据集的详细信息可以在数据卡中找到。我们在不同的设置下测试了两种 GPT 模型(GPT-3.5-Turbo 和 GPT-4-Turbo),以便找出哪些因素最有助于提高调查质量。这些详细信息可以在模型卡中找到。在我们的工作中,由于原始 ROUGE 和 BLEU 等传统指标的限制,我们设计了一个新颖的框架来自动评估生成的内容。因此,我们的指标能够根据参与度、内部主题变异性和流程来评估调查的质量。模型卡中报告了更多详细信息。
笔记本显示有关新数据集、代码示例使用情况和获得的结果的统计信息。
我们建议使用 Python 3.11.5 来运行我们的代码,因为可能与新版本不兼容。
安装过程描述如下:
git clone https://github.com/llaraspata/HRMQuestionnaireGenerationUsingLLM.git
python -m venv your_venv_name
source <your_venv_name>/bin/activate # On Windows, use: <your_venv_name>Scriptsactivate
pip install -r requirements.txt
几个实验设置在 JSON 文件中配置。要运行所有配置,请使用以下命令:
python -W ignore <path_to_repo_folder>/src/models/predict.py
否则,要运行特定配置,请使用以下命令:
python -W ignore <path_to_repo_folder>/src/models/predict.py --experiment-id "<experiment_id>"
警告
确保您拥有有效的 (Azure) OpenAI 访问密钥,否则调用 OpenAI 服务将被禁止。然后将其设置为名为AZURE_OPENAI_KEY
的环境变量。
此外,请注意,我们使用了私有部署,因此 Talentia HCM 研发团队外部的用户无法访问它。因此,我们建议在 API 调用中将azure_endpoint
参数值替换为有效参数值。
笔记
选项-W ignore
允许在脚本执行期间不显示潜在的警告。要显示它们,只需删除这样的选项即可。
要运行评估步骤,请执行以下命令:
python -W ignore <path_to_repo_folder>/src/models/evaluate.py
要将增强数据从非结构化文本自动转换为 JSON,请运行以下命令:
python -W ignore <path_to_repo_folder>/src/data/convert_qst_to_json.py
@inproceedings { laraspata2024SurveyGeneration4HCM ,
author = { Lucrezia Laraspata and Fabio Cardilli and Giovanna Castellano and Gennaro Vessio } ,
title = { Enhancing human capital management through GPT-driven questionnaire generation } ,
year = { 2024 } ,
booktitle = { Proceedings of the Eighth Workshop on Natural Language for Artificial Intelligence (NL4AI 2024) co-located with 23th International Conference of the Italian Association for Artificial Intelligence (AI*IA 2024) } ,
year = { 2024 }
}
├── LICENSE
├── Makefile <- Makefile with commands like `make data` or `make train`
├── README.md <- The top-level README for developers using this project.
├── data
│ ├── external <- Raw questionnaires derived from the augmentation process.
│ ├── interim <- Intermediate augmented data that has been transformed to JSON.
│ ├── processed <- The final, canonical data sets for modeling.
│ └── raw <- The data used as starting point from this project
│ (taken from Talentia Software HCM).
│
├── docs <- A default Sphinx project; see sphinx-doc.org for details
│
├── models <- Predictions for each run experiments. For each of the a log and a picke file are saved.
│
├── notebooks <- Jupyter notebooks used to illustrate class usage, dataset insights, and experimental results.
│
├── requirements.txt <- The requirements file for reproducing the analysis environment.
│
├── setup.py <- makes project pip installable (pip install -e .) so src can be imported
│
├── src <- Source code for use in this project.
│ ├── __init__.py <- Makes src a Python module
│ │
│ ├── data <- Scripts to download or generate data
│ │ ├── convert_qst_to_json.py
│ │ └── TFQuestionnairesDataset.py
│ │
│ ├── prompts <- Catalog of the employed prompts
│ │ ├── qst_to_json_prompts.py
│ │ ├── QstToJsonPromptGenerator.py
│ │ ├── QstToJsonScenarioGenerator.py
│ │ │
│ │ ├── prediction_prompts.py
│ │ ├── PredictionPromptGenerator.py
│ │ ├── PredictionScenarioGenerator.py
│ │ │
│ │ ├── topic_modeling_prompts.py
│ │ ├── TopicModelingPromptGenerator.py
│ │ └── TopicModelingScenarioGenerator.py
│ │
│ ├── models <- Scripts to run experiments and evaluations
│ │ ├── experiment_config.json
│ │ │
│ │ ├── predict.py
│ │ │
│ │ ├── QuestionnairesEvaluator.py
│ │ ├── ModelEvaluator.py
│ │ └── evaluate.py
│ │
│ └── visualization <- Scripts to create exploratory and results oriented visualizations
│ ├── experiment_pairs.json
│ │
│ ├── GlobalResultVisualizer.py
│ ├── PairResultVisualizer.py
│ └── visualize.py
│
└── tox.ini <- tox file with settings for running tox; see tox.readthedocs.io
基于 cookiecutter 数据科学项目模板的项目。 #cookiecutter数据科学