{"id":23315199,"url":"https://github.com/ruban2205/question-generation","last_synced_at":"2026-07-17T23:35:49.271Z","repository":{"id":268975535,"uuid":"905531972","full_name":"Ruban2205/question-generation","owner":"Ruban2205","description":"This repository provides a solution for generating detailed and thoughtful questions based on workout plans and evaluating their quality using the G-Eval metric. It is designed to assist fitness enthusiasts, trainers, and developers working with structured workout plans in improving the clarity, relevance, and usability of their questions.","archived":false,"fork":false,"pushed_at":"2024-12-20T04:02:58.000Z","size":4017,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T08:16:48.310Z","etag":null,"topics":["chain-of-thought-prompting","fewshot-learning","g-eval","large-language-model","llm","prompt-engineering","question-generation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ruban2205.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-19T02:52:00.000Z","updated_at":"2024-12-20T04:03:02.000Z","dependencies_parsed_at":"2024-12-20T04:32:55.161Z","dependency_job_id":"36593d14-c5d0-4779-8e62-2f2d9e79f6c0","html_url":"https://github.com/Ruban2205/question-generation","commit_stats":null,"previous_names":["ruban2205/question-generation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruban2205%2Fquestion-generation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruban2205%2Fquestion-generation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruban2205%2Fquestion-generation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruban2205%2Fquestion-generation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ruban2205","download_url":"https://codeload.github.com/Ruban2205/question-generation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247585783,"owners_count":20962399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chain-of-thought-prompting","fewshot-learning","g-eval","large-language-model","llm","prompt-engineering","question-generation"],"created_at":"2024-12-20T15:32:47.737Z","updated_at":"2025-10-13T05:39:23.039Z","avatar_url":"https://github.com/Ruban2205.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n\n  \u003ch1 align=\"center\"\u003eCoach MO: Question Generation\u003c/h1\u003e\n\n  \u003cp align=\"center\"\u003e\n    This repository provides a solution for generating detailed and thoughtful questions based on workout plans and evaluating their quality using the **G-Eval** metric. It is designed to assist fitness enthusiasts, trainers, and developers working with structured workout plans in improving the clarity, relevance, and usability of their fitness-related questions.\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"report/MM811___Project_Report___Coach_MO__Question_Generation.pdf\"\u003eView Final Report\u003c/a\u003e\n    ·\n    \u003ca href=\"ppt/MM811_Presentation.pdf\"\u003eView PPT\u003c/a\u003e\n    ·\n    \u003ca href=\"results/evaluation_results.csv\"\u003eView Results\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n---\n\n## Features\n\n### 1. **Workout Question Generation**\n\n- **Script**: `generate_questions.py`\n- **Description**:\n  - Automatically generates thoughtful questions based on attributes of workout plans, such as title, phase, purpose, duration, and more.\n  - Utilizes **Few-shot + Chain-of-Thought Prompting** with OpenAI's GPT-3.5-turbo model for generating specific and context-aware questions.\n- **Input**: JSON file containing workout plans (`data/workout_data.json`).\n- **Output**: Generated questions saved in a text file (`outputqns/generated_questions.txt`).\n\n### 2. **Question Evaluation**\n\n- **Script**: `test_geval.py`\n- **Description**:\n  - Evaluates the quality of the generated questions using the **G-Eval** metric.\n  - The evaluation focuses on correctness, relevance, and alignment with the context of workout plans.\n  - Results are saved in a CSV file (`results/evaluation_results.csv`) for further analysis.\n- **Metrics Used**:\n  - **Correctness**: Ensures the questions are factually accurate and relevant.\n\n---\n\n## File Structure\n\n```plaintext\nproject-root/\n│\n├── data/\n│   └── workout_data.json    # Input JSON with workout plan details.\n│\n├── outputqns/\n│   └── generated_questions.txt  # Text file containing generated questions.\n│\n├── results/\n│   └── evaluation_results.csv   # CSV file with evaluation results.\n│\n├── generate_questions.py    # Script for generating workout questions.\n├── test_geval.py            # Script for evaluating generated questions.\n└── README.md                # Project documentation.\n```\n\n## Requirements\n\n### Libraries and Tools\n\n- Python 3.8+\n- OpenAI Package\n- DeepEval Package for metrics evaluation\n- Pandas for result processing\n\n## Python Packages\n\nInstall the the required packages using pip:\n\n```bash\npip install -r requirements.txt\n```\n\nor\n\n```bash\npip install pandas openai deepeval\n```\n\n## Setup and Usage\n\n### 1. Environment Variables\n\nEnsure that you are having the following environment variable\n\n- `OPENAI_API_KEY:` API Key for OpenAI GPT Models.\n\n### 2. Running the Question Generation\n\nExecute the script `generate_questions.py` to generate questions based on the workout data:\n\n```bash\npython generate_questions.py\n```\n\n- **Note:** Use `openai==0.28` for this script.\n\n### 3. Running the Evaluation\n\nRun the `test_geval.py` script to evaluate the generated questions.\n\n- **Note:** Use Deepeval framework to Run\n\n```bash\npip install -U deepeval\n```\n\n```bash\ndeepeval login\n```\n\n- **Note:** Paste the DeepEval API Key if prompted.\n\n```bash\ndeepeval test run test_geval.py\n```\n\n- **Note:** Use the above script to run the evaluation file.\n- Also, ensure that the latest version of `openai` is installed for this script.\n\n## Authors\n\n- Ruban Gino Singh Arul Peppin Raj - [rubangin@ualberta.ca](https://mailto:rubangin@ualberta.ca)\n- Raja Priya Mariappan - [rajapriy@ualberta.ca](https://rajapriy@ualberta.ca)\n- Raju Bhattarai - [raju2@ualberta.ca](https://mailto:raju2@ualberta.ca)\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruban2205%2Fquestion-generation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruban2205%2Fquestion-generation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruban2205%2Fquestion-generation/lists"}