該儲存庫包含所有利用法學碩士在人力資源管理 (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資料科學