From 2b8bef2b5b12470be831cd9fe517037c96b8bade Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Sep 2025 01:28:06 +0000 Subject: [PATCH 1/2] Initial plan From 332ea570ad3d7e5e86fed744e79ed3cd7c1fe3e8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Sep 2025 01:34:26 +0000 Subject: [PATCH 2/2] Complete Google Form generator for LLM4ChipDesign prerequisite survey Co-authored-by: FCHXWH823 <176723341+FCHXWH823@users.noreply.github.com> --- GOOGLE_FORM_README.md | 79 ++++ GOOGLE_FORM_SETUP_INSTRUCTIONS.md | 105 ++++++ create_google_form.py | 589 ++++++++++++++++++++++++++++++ create_llm4chipdesign_survey.gs | 191 ++++++++++ preview_survey.py | 191 ++++++++++ survey_structure.json | 447 +++++++++++++++++++++++ validate_survey.py | 211 +++++++++++ 7 files changed, 1813 insertions(+) create mode 100644 GOOGLE_FORM_README.md create mode 100644 GOOGLE_FORM_SETUP_INSTRUCTIONS.md create mode 100644 create_google_form.py create mode 100644 create_llm4chipdesign_survey.gs create mode 100644 preview_survey.py create mode 100644 survey_structure.json create mode 100644 validate_survey.py diff --git a/GOOGLE_FORM_README.md b/GOOGLE_FORM_README.md new file mode 100644 index 0000000..ebd7cd5 --- /dev/null +++ b/GOOGLE_FORM_README.md @@ -0,0 +1,79 @@ +# LLM4ChipDesign Course Prerequisite Survey - Google Form + +This directory contains everything needed to create a Google Form for the LLM4ChipDesign course prerequisite survey. + +## šŸš€ Quick Start + +1. **Generate the form files** (if not already done): + ```bash + python3 create_google_form.py + ``` + +2. **Validate the structure**: + ```bash + python3 validate_survey.py + ``` + +3. **Create the Google Form**: + - Open [script.google.com](https://script.google.com) + - Create a new project + - Copy content from `create_llm4chipdesign_survey.gs` + - Run the `createSurveyForm` function + +## šŸ“ Generated Files + +| File | Description | +|------|-------------| +| `create_llm4chipdesign_survey.gs` | Google Apps Script to automatically create the form | +| `survey_structure.json` | Complete survey structure in JSON format | +| `GOOGLE_FORM_SETUP_INSTRUCTIONS.md` | Detailed setup instructions | +| `validate_survey.py` | Validation script to verify the survey structure | + +## šŸ“Š Survey Structure + +The survey contains **41 questions** across **7 sections**: + +1. **Student Information** (6 questions) - Basic student details +2. **Prerequisite Course Assessment** (15 questions) - Experience ratings for key subjects +3. **Specific Course Experience** (8 questions) - Detailed course background +4. **Tools and Software Experience** (3 questions) - Familiarity with relevant tools +5. **Project Experience** (4 questions) - Hands-on experience +6. **Learning Goals and Expectations** (4 questions) - Course objectives +7. **Additional Information** (1 question) - Open feedback + +## šŸŽÆ Key Features + +- āœ… **Email collection** enabled for tracking responses +- āœ… **Response editing** allowed for students to update answers +- āœ… **Mobile-friendly** design works on all devices +- āœ… **Automatic validation** ensures data quality +- āœ… **Export capabilities** to Google Sheets or CSV + +## šŸ”§ Customization + +After creating the form, you can: +- Modify questions or add new ones +- Change styling and themes +- Set response limits and deadlines +- Configure email notifications +- Add logic branching for conditional questions + +## šŸ“ˆ Response Analysis + +Responses can be analyzed using: +- Google Forms built-in analytics +- Export to Google Sheets for advanced analysis +- Integration with other data analysis tools + +## šŸ†˜ Support + +For detailed instructions, see `GOOGLE_FORM_SETUP_INSTRUCTIONS.md` + +For troubleshooting: +1. Verify you're signed into the correct Google account +2. Check that the script has proper permissions +3. Ensure all code is copied correctly without truncation + +--- + +*Generated for LLM4ChipDesign - Generative AI for Chip Design Course* \ No newline at end of file diff --git a/GOOGLE_FORM_SETUP_INSTRUCTIONS.md b/GOOGLE_FORM_SETUP_INSTRUCTIONS.md new file mode 100644 index 0000000..356bc5a --- /dev/null +++ b/GOOGLE_FORM_SETUP_INSTRUCTIONS.md @@ -0,0 +1,105 @@ +# LLM4ChipDesign Course Prerequisite Survey - Google Form Setup + +This directory contains the necessary files to create a Google Form for the LLM4ChipDesign course prerequisite survey. + +## Files Generated + +1. **create_llm4chipdesign_survey.gs** - Google Apps Script code to create the form +2. **survey_structure.json** - JSON structure of the survey for reference +3. **GOOGLE_FORM_SETUP_INSTRUCTIONS.md** - This instruction file + +## Quick Setup Instructions + +### Method 1: Using Google Apps Script (Recommended) + +1. **Open Google Apps Script** + - Go to [script.google.com](https://script.google.com) + - Sign in with your Google account + +2. **Create New Project** + - Click "New Project" + - Give it a name like "LLM4ChipDesign Survey Creator" + +3. **Add the Script** + - Delete the default `myFunction()` code + - Copy and paste the entire content from `create_llm4chipdesign_survey.gs` + - Save the project (Ctrl+S) + +4. **Run the Script** + - Select the `createSurveyForm` function from the dropdown + - Click the "Run" button (ā–¶ļø) + - Grant necessary permissions when prompted + - Check the execution log for the form URLs + +5. **Access Your Form** + - The script will output two URLs: + - **Form URL**: Share this with students to fill out the survey + - **Edit URL**: Use this to modify the form if needed + +### Method 2: Manual Form Creation + +If you prefer to create the form manually, use the `survey_structure.json` file as a reference for: +- Question types and titles +- Answer choices and scales +- Section organization +- Required vs. optional fields + +## Form Structure + +The survey includes 7 main sections: + +1. **Student Information** (6 questions) +2. **Prerequisite Course Assessment** (15 questions) +3. **Specific Course Experience** (8 questions) +4. **Tools and Software Experience** (3 questions) +5. **Project Experience** (4 questions) +6. **Learning Goals and Expectations** (4 questions) +7. **Additional Information** (1 questions) + +## Form Settings + +- **Email Collection**: Enabled +- **Response Editing**: Allowed +- **Public Access**: Accepting responses +- **Confirmation Message**: Custom thank you message + +## Customization Options + +After creating the form, you can: + +1. **Modify Questions**: Add, remove, or edit questions as needed +2. **Adjust Styling**: Change colors, fonts, and themes +3. **Set Response Limits**: Control who can respond and when +4. **Configure Notifications**: Get email alerts for new responses +5. **Export Responses**: Download data to Google Sheets or CSV + +## Response Collection + +- Responses are automatically collected in Google Forms +- Can be viewed in the form's "Responses" tab +- Can be exported to Google Sheets for analysis +- Individual response summary and analytics available + +## Troubleshooting + +### Common Issues: + +1. **Permission Errors**: Make sure you're signed in to the correct Google account +2. **Script Timeout**: The script should complete in under 30 seconds +3. **Form Not Found**: Check the execution log for error messages + +### Getting Help: + +- Check Google Apps Script documentation +- Verify all quotation marks and syntax in the script +- Test with a simpler version first if issues persist + +## Form URL Distribution + +Once created, you can: +- Share the form URL directly with students +- Embed the form in a website or learning management system +- Create a QR code for easy mobile access +- Add it to course materials and announcements + +Generated on: September 03, 2025 at 01:31 AM diff --git a/create_google_form.py b/create_google_form.py new file mode 100644 index 0000000..c575003 --- /dev/null +++ b/create_google_form.py @@ -0,0 +1,589 @@ +#!/usr/bin/env python3 +""" +LLM4ChipDesign Course Prerequisite Survey - Google Form Generator +This script generates Google Apps Script code to create a Google Form for the prerequisite survey. +""" + +import json +from datetime import datetime +from pathlib import Path + + +class GoogleFormGenerator: + """Generator for Google Form creation scripts and data structures.""" + + def __init__(self): + self.form_title = "LLM4ChipDesign Course Prerequisite Survey" + self.form_description = self._get_form_description() + self.sections = self._define_survey_sections() + + def _get_form_description(self): + """Get the form description text.""" + return ( + "Welcome to the LLM4ChipDesign course! This course explores the intersection of " + "Large Language Models (LLMs) and chip design, covering topics such as automated " + "Verilog generation, testbench creation, SystemVerilog assertions, and hardware-software " + "co-design using AI.\n\n" + "To ensure you have the necessary background knowledge and to tailor the course content " + "to your experience level, please complete this prerequisite assessment survey. " + "Your responses will help us understand your current knowledge and provide appropriate " + "support during the course.\n\n" + "Please answer all questions honestly. This survey is for assessment purposes only " + "and will not affect your grade." + ) + + def _define_survey_sections(self): + """Define all sections and questions for the survey.""" + return { + "student_info": { + "title": "Student Information", + "questions": [ + {"type": "text", "title": "Name", "required": True}, + {"type": "text", "title": "Student ID", "required": True}, + {"type": "text", "title": "Email", "required": True}, + {"type": "text", "title": "Academic Year/Level", "required": True}, + {"type": "text", "title": "Major/Program", "required": True}, + {"type": "date", "title": "Date", "required": True} + ] + }, + "prerequisite_assessment": { + "title": "Prerequisite Course Assessment", + "description": ( + "Please indicate your experience level with the following subject areas " + "that are fundamental to this course. Rate your experience using the scale:\n" + "• No Experience (0): Never studied or worked with this area\n" + "• Basic (1): Introductory course or minimal exposure\n" + "• Intermediate (2): One or more courses with practical experience\n" + "• Advanced (3): Extensive coursework and/or professional experience\n" + "• Expert (4): Teaching/research level knowledge" + ), + "questions": [ + { + "type": "scale", + "title": "Digital Logic Design & Boolean Algebra", + "scale": {"min": 0, "max": 4, "labels": ["No Experience", "Basic", "Intermediate", "Advanced", "Expert"]}, + "required": True + }, + { + "type": "scale", + "title": "Computer Architecture & Organization", + "scale": {"min": 0, "max": 4, "labels": ["No Experience", "Basic", "Intermediate", "Advanced", "Expert"]}, + "required": True + }, + { + "type": "scale", + "title": "Hardware Description Languages (Verilog/SystemVerilog)", + "scale": {"min": 0, "max": 4, "labels": ["No Experience", "Basic", "Intermediate", "Advanced", "Expert"]}, + "required": True + }, + { + "type": "scale", + "title": "Programming Languages (Python, C/C++)", + "scale": {"min": 0, "max": 4, "labels": ["No Experience", "Basic", "Intermediate", "Advanced", "Expert"]}, + "required": True + }, + { + "type": "scale", + "title": "Data Structures & Algorithms", + "scale": {"min": 0, "max": 4, "labels": ["No Experience", "Basic", "Intermediate", "Advanced", "Expert"]}, + "required": True + }, + { + "type": "scale", + "title": "Machine Learning & Artificial Intelligence", + "scale": {"min": 0, "max": 4, "labels": ["No Experience", "Basic", "Intermediate", "Advanced", "Expert"]}, + "required": True + }, + { + "type": "scale", + "title": "Natural Language Processing (NLP)", + "scale": {"min": 0, "max": 4, "labels": ["No Experience", "Basic", "Intermediate", "Advanced", "Expert"]}, + "required": True + }, + { + "type": "scale", + "title": "Formal Verification & Model Checking", + "scale": {"min": 0, "max": 4, "labels": ["No Experience", "Basic", "Intermediate", "Advanced", "Expert"]}, + "required": True + }, + { + "type": "scale", + "title": "Electronic Design Automation (EDA) Tools", + "scale": {"min": 0, "max": 4, "labels": ["No Experience", "Basic", "Intermediate", "Advanced", "Expert"]}, + "required": True + }, + { + "type": "scale", + "title": "FPGA/ASIC Design Flow", + "scale": {"min": 0, "max": 4, "labels": ["No Experience", "Basic", "Intermediate", "Advanced", "Expert"]}, + "required": True + }, + { + "type": "scale", + "title": "High-Level Synthesis (HLS)", + "scale": {"min": 0, "max": 4, "labels": ["No Experience", "Basic", "Intermediate", "Advanced", "Expert"]}, + "required": True + }, + { + "type": "scale", + "title": "Hardware-Software Co-design", + "scale": {"min": 0, "max": 4, "labels": ["No Experience", "Basic", "Intermediate", "Advanced", "Expert"]}, + "required": True + }, + { + "type": "scale", + "title": "Computer Systems & Operating Systems", + "scale": {"min": 0, "max": 4, "labels": ["No Experience", "Basic", "Intermediate", "Advanced", "Expert"]}, + "required": True + }, + { + "type": "scale", + "title": "Software Engineering & Version Control", + "scale": {"min": 0, "max": 4, "labels": ["No Experience", "Basic", "Intermediate", "Advanced", "Expert"]}, + "required": True + }, + { + "type": "scale", + "title": "Mathematics (Linear Algebra, Statistics)", + "scale": {"min": 0, "max": 4, "labels": ["No Experience", "Basic", "Intermediate", "Advanced", "Expert"]}, + "required": True + } + ] + }, + "specific_courses": { + "title": "Specific Course Experience", + "description": "Please list any specific courses you have completed in the following areas (include course names/codes if possible):", + "questions": [ + {"type": "paragraph", "title": "Digital Circuit Design / Logic Design", "required": False}, + {"type": "paragraph", "title": "Computer Architecture", "required": False}, + {"type": "paragraph", "title": "Verilog/VHDL/SystemVerilog", "required": False}, + {"type": "paragraph", "title": "Machine Learning / AI", "required": False}, + {"type": "paragraph", "title": "Programming (Python/C/C++)", "required": False}, + {"type": "paragraph", "title": "Formal Methods / Verification", "required": False}, + {"type": "paragraph", "title": "Embedded Systems", "required": False}, + {"type": "paragraph", "title": "Other Relevant Courses", "required": False} + ] + }, + "tools_experience": { + "title": "Tools and Software Experience", + "description": "Please indicate your familiarity with the following tools and software (check all that apply):", + "questions": [ + { + "type": "checkbox", + "title": "EDA Tools", + "choices": [ + "Vivado (Xilinx)", + "Quartus (Intel)", + "ModelSim/QuestaSim", + "Synopsys Tools", + "Cadence Tools", + "Verilator", + "GTKWave" + ], + "required": False + }, + { + "type": "checkbox", + "title": "Programming Tools", + "choices": [ + "Python", + "C/C++", + "MATLAB", + "Git/GitHub", + "Jupyter Notebooks", + "Linux/Unix", + "Command Line" + ], + "required": False + }, + { + "type": "checkbox", + "title": "AI/ML Frameworks", + "choices": [ + "TensorFlow", + "PyTorch", + "OpenAI API", + "Hugging Face", + "scikit-learn", + "NLTK/spaCy", + "Google Colab" + ], + "required": False + } + ] + }, + "project_experience": { + "title": "Project Experience", + "questions": [ + { + "type": "paragraph", + "title": "Have you worked on any hardware design projects? If yes, please describe briefly:", + "required": False + }, + { + "type": "paragraph", + "title": "Have you used any AI/ML tools or APIs in your projects? If yes, please describe:", + "required": False + }, + { + "type": "paragraph", + "title": "Have you written Verilog or VHDL code before? What was the complexity level?", + "required": False + }, + { + "type": "paragraph", + "title": "Have you used any LLMs (ChatGPT, Claude, etc.) for coding assistance? Please describe your experience:", + "required": False + } + ] + }, + "learning_goals": { + "title": "Learning Goals and Expectations", + "questions": [ + { + "type": "paragraph", + "title": "What specific aspects of LLM-based chip design are you most interested in learning?", + "required": False + }, + { + "type": "paragraph", + "title": "Do you have any specific career goals related to hardware design or AI?", + "required": False + }, + { + "type": "paragraph", + "title": "What challenges do you expect to face in this course?", + "required": False + }, + { + "type": "paragraph", + "title": "How do you prefer to learn new technical concepts? (hands-on, theory-first, examples, etc.)", + "required": False + } + ] + }, + "additional_info": { + "title": "Additional Information", + "questions": [ + { + "type": "paragraph", + "title": "Please provide any additional information about your background, interests, or concerns that might be relevant to this course:", + "required": False + } + ] + } + } + + def generate_google_apps_script(self): + """Generate Google Apps Script code to create the form.""" + script = [ + "/**", + " * LLM4ChipDesign Course Prerequisite Survey - Google Form Creator", + f" * Generated on: {datetime.now().strftime('%B %d, %Y')}", + " * ", + " * Instructions:", + " * 1. Open Google Apps Script (script.google.com)", + " * 2. Create a new project", + " * 3. Replace the default code with this script", + " * 4. Run the 'createSurveyForm' function", + " * 5. Check your Google Drive for the created form", + " */", + "", + "function createSurveyForm() {", + " // Create the form", + f" var form = FormApp.create('{self.form_title}');", + f" form.setDescription(`{self.form_description}`);", + " ", + " // Configure form settings", + " form.setCollectEmail(true);", + " form.setAllowResponseEdits(true);", + " form.setAcceptingResponses(true);", + " ", + " // Add sections and questions", + "" + ] + + for section_key, section_data in self.sections.items(): + script.extend(self._generate_section_script(section_data)) + script.append("") + + script.extend([ + " // Set confirmation message", + " form.setConfirmationMessage(", + " 'Thank you for completing the LLM4ChipDesign Course Prerequisite Survey! ' +", + " 'This information will help us provide the best possible learning experience ' +", + " 'tailored to your background and goals.'", + " );", + " ", + " // Log the form URL", + " var formUrl = form.getPublishedUrl();", + " Logger.log('Form created successfully!');", + " Logger.log('Form URL: ' + formUrl);", + " Logger.log('Edit URL: ' + form.getEditUrl());", + " ", + " // Also display in console", + " console.log('Form created successfully!');", + " console.log('Form URL: ' + formUrl);", + " console.log('Edit URL: ' + form.getEditUrl());", + " ", + " return {", + " formUrl: formUrl,", + " editUrl: form.getEditUrl(),", + " formId: form.getId()", + " };", + "}" + ]) + + return "\n".join(script) + + def _generate_section_script(self, section_data): + """Generate script for a specific section.""" + script = [ + f" // {section_data['title']} Section", + f" var section = form.addPageBreakItem().setTitle('{section_data['title']}');" + ] + + if 'description' in section_data: + script.append(f" section.setHelpText(`{section_data['description']}`);") + + for question in section_data['questions']: + script.extend(self._generate_question_script(question)) + + return script + + def _generate_question_script(self, question): + """Generate script for a specific question.""" + script = [] + + if question['type'] == 'text': + script.append(f" var q = form.addTextItem().setTitle('{question['title']}');") + if question.get('required', False): + script.append(" q.setRequired(true);") + + elif question['type'] == 'date': + script.append(f" var q = form.addDateItem().setTitle('{question['title']}');") + if question.get('required', False): + script.append(" q.setRequired(true);") + + elif question['type'] == 'paragraph': + script.append(f" var q = form.addParagraphTextItem().setTitle('{question['title']}');") + if question.get('required', False): + script.append(" q.setRequired(true);") + + elif question['type'] == 'scale': + scale = question['scale'] + script.append(f" var q = form.addScaleItem().setTitle('{question['title']}');") + script.append(f" q.setBounds({scale['min']}, {scale['max']});") + script.append(f" q.setLeftLabel('{scale['labels'][0]}');") + script.append(f" q.setRightLabel('{scale['labels'][-1]}');") + if question.get('required', False): + script.append(" q.setRequired(true);") + + elif question['type'] == 'checkbox': + script.append(f" var q = form.addCheckboxItem().setTitle('{question['title']}');") + choices = "', '".join(question['choices']) + script.append(f" q.setChoices(['{choices}'].map(choice => q.createChoice(choice)));") + if question.get('required', False): + script.append(" q.setRequired(true);") + + return script + + def generate_json_structure(self): + """Generate JSON structure of the form for reference.""" + return { + "title": self.form_title, + "description": self.form_description, + "settings": { + "collect_email": True, + "allow_response_edits": True, + "accepting_responses": True + }, + "sections": self.sections, + "generated_on": datetime.now().isoformat() + } + + def save_files(self, output_dir="."): + """Save the generated files.""" + output_path = Path(output_dir) + output_path.mkdir(exist_ok=True) + + # Save Google Apps Script + script_content = self.generate_google_apps_script() + script_file = output_path / "create_llm4chipdesign_survey.gs" + with open(script_file, 'w', encoding='utf-8') as f: + f.write(script_content) + + # Save JSON structure + json_content = self.generate_json_structure() + json_file = output_path / "survey_structure.json" + with open(json_file, 'w', encoding='utf-8') as f: + json.dump(json_content, f, indent=2, ensure_ascii=False) + + # Save instructions + instructions = self._generate_instructions() + instructions_file = output_path / "GOOGLE_FORM_SETUP_INSTRUCTIONS.md" + with open(instructions_file, 'w', encoding='utf-8') as f: + f.write(instructions) + + return { + "script_file": str(script_file), + "json_file": str(json_file), + "instructions_file": str(instructions_file) + } + + def _generate_instructions(self): + """Generate setup and usage instructions.""" + return f"""# LLM4ChipDesign Course Prerequisite Survey - Google Form Setup + +This directory contains the necessary files to create a Google Form for the LLM4ChipDesign course prerequisite survey. + +## Files Generated + +1. **create_llm4chipdesign_survey.gs** - Google Apps Script code to create the form +2. **survey_structure.json** - JSON structure of the survey for reference +3. **GOOGLE_FORM_SETUP_INSTRUCTIONS.md** - This instruction file + +## Quick Setup Instructions + +### Method 1: Using Google Apps Script (Recommended) + +1. **Open Google Apps Script** + - Go to [script.google.com](https://script.google.com) + - Sign in with your Google account + +2. **Create New Project** + - Click "New Project" + - Give it a name like "LLM4ChipDesign Survey Creator" + +3. **Add the Script** + - Delete the default `myFunction()` code + - Copy and paste the entire content from `create_llm4chipdesign_survey.gs` + - Save the project (Ctrl+S) + +4. **Run the Script** + - Select the `createSurveyForm` function from the dropdown + - Click the "Run" button (ā–¶ļø) + - Grant necessary permissions when prompted + - Check the execution log for the form URLs + +5. **Access Your Form** + - The script will output two URLs: + - **Form URL**: Share this with students to fill out the survey + - **Edit URL**: Use this to modify the form if needed + +### Method 2: Manual Form Creation + +If you prefer to create the form manually, use the `survey_structure.json` file as a reference for: +- Question types and titles +- Answer choices and scales +- Section organization +- Required vs. optional fields + +## Form Structure + +The survey includes {len(self.sections)} main sections: + +{self._generate_section_list()} + +## Form Settings + +- **Email Collection**: Enabled +- **Response Editing**: Allowed +- **Public Access**: Accepting responses +- **Confirmation Message**: Custom thank you message + +## Customization Options + +After creating the form, you can: + +1. **Modify Questions**: Add, remove, or edit questions as needed +2. **Adjust Styling**: Change colors, fonts, and themes +3. **Set Response Limits**: Control who can respond and when +4. **Configure Notifications**: Get email alerts for new responses +5. **Export Responses**: Download data to Google Sheets or CSV + +## Response Collection + +- Responses are automatically collected in Google Forms +- Can be viewed in the form's "Responses" tab +- Can be exported to Google Sheets for analysis +- Individual response summary and analytics available + +## Troubleshooting + +### Common Issues: + +1. **Permission Errors**: Make sure you're signed in to the correct Google account +2. **Script Timeout**: The script should complete in under 30 seconds +3. **Form Not Found**: Check the execution log for error messages + +### Getting Help: + +- Check Google Apps Script documentation +- Verify all quotation marks and syntax in the script +- Test with a simpler version first if issues persist + +## Form URL Distribution + +Once created, you can: +- Share the form URL directly with students +- Embed the form in a website or learning management system +- Create a QR code for easy mobile access +- Add it to course materials and announcements + +Generated on: {datetime.now().strftime('%B %d, %Y at %I:%M %p')} +""" + + def _generate_section_list(self): + """Generate a formatted list of sections for documentation.""" + sections_list = [] + for i, (key, section) in enumerate(self.sections.items(), 1): + question_count = len(section['questions']) + sections_list.append(f"{i}. **{section['title']}** ({question_count} questions)") + return "\n".join(sections_list) + + +def main(): + """Main function to generate the Google Form creation files.""" + print("šŸš€ Generating LLM4ChipDesign Course Prerequisite Survey Google Form...") + print("=" * 70) + + # Create generator instance + generator = GoogleFormGenerator() + + # Generate and save files + try: + files = generator.save_files() + print("āœ… Files generated successfully!") + print() + + for file_type, file_path in files.items(): + print(f"šŸ“„ {file_type.replace('_', ' ').title()}: {file_path}") + + print() + print("šŸ“‹ Survey Summary:") + print(f" - Title: {generator.form_title}") + print(f" - Sections: {len(generator.sections)}") + + total_questions = sum(len(section['questions']) for section in generator.sections.values()) + print(f" - Total Questions: {total_questions}") + + print() + print("šŸŽÆ Next Steps:") + print(" 1. Open script.google.com") + print(" 2. Create a new project") + print(" 3. Copy the content from 'create_llm4chipdesign_survey.gs'") + print(" 4. Run the 'createSurveyForm' function") + print(" 5. Check the execution log for your form URLs") + print() + print("šŸ“– For detailed instructions, see: GOOGLE_FORM_SETUP_INSTRUCTIONS.md") + + return 0 + + except Exception as e: + print(f"āŒ Error generating files: {e}") + return 1 + + +if __name__ == "__main__": + exit(main()) \ No newline at end of file diff --git a/create_llm4chipdesign_survey.gs b/create_llm4chipdesign_survey.gs new file mode 100644 index 0000000..b15e8c7 --- /dev/null +++ b/create_llm4chipdesign_survey.gs @@ -0,0 +1,191 @@ +/** + * LLM4ChipDesign Course Prerequisite Survey - Google Form Creator + * Generated on: September 03, 2025 + * + * Instructions: + * 1. Open Google Apps Script (script.google.com) + * 2. Create a new project + * 3. Replace the default code with this script + * 4. Run the 'createSurveyForm' function + * 5. Check your Google Drive for the created form + */ + +function createSurveyForm() { + // Create the form + var form = FormApp.create('LLM4ChipDesign Course Prerequisite Survey'); + form.setDescription(`Welcome to the LLM4ChipDesign course! This course explores the intersection of Large Language Models (LLMs) and chip design, covering topics such as automated Verilog generation, testbench creation, SystemVerilog assertions, and hardware-software co-design using AI. + +To ensure you have the necessary background knowledge and to tailor the course content to your experience level, please complete this prerequisite assessment survey. Your responses will help us understand your current knowledge and provide appropriate support during the course. + +Please answer all questions honestly. This survey is for assessment purposes only and will not affect your grade.`); + + // Configure form settings + form.setCollectEmail(true); + form.setAllowResponseEdits(true); + form.setAcceptingResponses(true); + + // Add sections and questions + + // Student Information Section + var section = form.addPageBreakItem().setTitle('Student Information'); + var q = form.addTextItem().setTitle('Name'); + q.setRequired(true); + var q = form.addTextItem().setTitle('Student ID'); + q.setRequired(true); + var q = form.addTextItem().setTitle('Email'); + q.setRequired(true); + var q = form.addTextItem().setTitle('Academic Year/Level'); + q.setRequired(true); + var q = form.addTextItem().setTitle('Major/Program'); + q.setRequired(true); + var q = form.addDateItem().setTitle('Date'); + q.setRequired(true); + + // Prerequisite Course Assessment Section + var section = form.addPageBreakItem().setTitle('Prerequisite Course Assessment'); + section.setHelpText(`Please indicate your experience level with the following subject areas that are fundamental to this course. Rate your experience using the scale: +• No Experience (0): Never studied or worked with this area +• Basic (1): Introductory course or minimal exposure +• Intermediate (2): One or more courses with practical experience +• Advanced (3): Extensive coursework and/or professional experience +• Expert (4): Teaching/research level knowledge`); + var q = form.addScaleItem().setTitle('Digital Logic Design & Boolean Algebra'); + q.setBounds(0, 4); + q.setLeftLabel('No Experience'); + q.setRightLabel('Expert'); + q.setRequired(true); + var q = form.addScaleItem().setTitle('Computer Architecture & Organization'); + q.setBounds(0, 4); + q.setLeftLabel('No Experience'); + q.setRightLabel('Expert'); + q.setRequired(true); + var q = form.addScaleItem().setTitle('Hardware Description Languages (Verilog/SystemVerilog)'); + q.setBounds(0, 4); + q.setLeftLabel('No Experience'); + q.setRightLabel('Expert'); + q.setRequired(true); + var q = form.addScaleItem().setTitle('Programming Languages (Python, C/C++)'); + q.setBounds(0, 4); + q.setLeftLabel('No Experience'); + q.setRightLabel('Expert'); + q.setRequired(true); + var q = form.addScaleItem().setTitle('Data Structures & Algorithms'); + q.setBounds(0, 4); + q.setLeftLabel('No Experience'); + q.setRightLabel('Expert'); + q.setRequired(true); + var q = form.addScaleItem().setTitle('Machine Learning & Artificial Intelligence'); + q.setBounds(0, 4); + q.setLeftLabel('No Experience'); + q.setRightLabel('Expert'); + q.setRequired(true); + var q = form.addScaleItem().setTitle('Natural Language Processing (NLP)'); + q.setBounds(0, 4); + q.setLeftLabel('No Experience'); + q.setRightLabel('Expert'); + q.setRequired(true); + var q = form.addScaleItem().setTitle('Formal Verification & Model Checking'); + q.setBounds(0, 4); + q.setLeftLabel('No Experience'); + q.setRightLabel('Expert'); + q.setRequired(true); + var q = form.addScaleItem().setTitle('Electronic Design Automation (EDA) Tools'); + q.setBounds(0, 4); + q.setLeftLabel('No Experience'); + q.setRightLabel('Expert'); + q.setRequired(true); + var q = form.addScaleItem().setTitle('FPGA/ASIC Design Flow'); + q.setBounds(0, 4); + q.setLeftLabel('No Experience'); + q.setRightLabel('Expert'); + q.setRequired(true); + var q = form.addScaleItem().setTitle('High-Level Synthesis (HLS)'); + q.setBounds(0, 4); + q.setLeftLabel('No Experience'); + q.setRightLabel('Expert'); + q.setRequired(true); + var q = form.addScaleItem().setTitle('Hardware-Software Co-design'); + q.setBounds(0, 4); + q.setLeftLabel('No Experience'); + q.setRightLabel('Expert'); + q.setRequired(true); + var q = form.addScaleItem().setTitle('Computer Systems & Operating Systems'); + q.setBounds(0, 4); + q.setLeftLabel('No Experience'); + q.setRightLabel('Expert'); + q.setRequired(true); + var q = form.addScaleItem().setTitle('Software Engineering & Version Control'); + q.setBounds(0, 4); + q.setLeftLabel('No Experience'); + q.setRightLabel('Expert'); + q.setRequired(true); + var q = form.addScaleItem().setTitle('Mathematics (Linear Algebra, Statistics)'); + q.setBounds(0, 4); + q.setLeftLabel('No Experience'); + q.setRightLabel('Expert'); + q.setRequired(true); + + // Specific Course Experience Section + var section = form.addPageBreakItem().setTitle('Specific Course Experience'); + section.setHelpText(`Please list any specific courses you have completed in the following areas (include course names/codes if possible):`); + var q = form.addParagraphTextItem().setTitle('Digital Circuit Design / Logic Design'); + var q = form.addParagraphTextItem().setTitle('Computer Architecture'); + var q = form.addParagraphTextItem().setTitle('Verilog/VHDL/SystemVerilog'); + var q = form.addParagraphTextItem().setTitle('Machine Learning / AI'); + var q = form.addParagraphTextItem().setTitle('Programming (Python/C/C++)'); + var q = form.addParagraphTextItem().setTitle('Formal Methods / Verification'); + var q = form.addParagraphTextItem().setTitle('Embedded Systems'); + var q = form.addParagraphTextItem().setTitle('Other Relevant Courses'); + + // Tools and Software Experience Section + var section = form.addPageBreakItem().setTitle('Tools and Software Experience'); + section.setHelpText(`Please indicate your familiarity with the following tools and software (check all that apply):`); + var q = form.addCheckboxItem().setTitle('EDA Tools'); + q.setChoices(['Vivado (Xilinx)', 'Quartus (Intel)', 'ModelSim/QuestaSim', 'Synopsys Tools', 'Cadence Tools', 'Verilator', 'GTKWave'].map(choice => q.createChoice(choice))); + var q = form.addCheckboxItem().setTitle('Programming Tools'); + q.setChoices(['Python', 'C/C++', 'MATLAB', 'Git/GitHub', 'Jupyter Notebooks', 'Linux/Unix', 'Command Line'].map(choice => q.createChoice(choice))); + var q = form.addCheckboxItem().setTitle('AI/ML Frameworks'); + q.setChoices(['TensorFlow', 'PyTorch', 'OpenAI API', 'Hugging Face', 'scikit-learn', 'NLTK/spaCy', 'Google Colab'].map(choice => q.createChoice(choice))); + + // Project Experience Section + var section = form.addPageBreakItem().setTitle('Project Experience'); + var q = form.addParagraphTextItem().setTitle('Have you worked on any hardware design projects? If yes, please describe briefly:'); + var q = form.addParagraphTextItem().setTitle('Have you used any AI/ML tools or APIs in your projects? If yes, please describe:'); + var q = form.addParagraphTextItem().setTitle('Have you written Verilog or VHDL code before? What was the complexity level?'); + var q = form.addParagraphTextItem().setTitle('Have you used any LLMs (ChatGPT, Claude, etc.) for coding assistance? Please describe your experience:'); + + // Learning Goals and Expectations Section + var section = form.addPageBreakItem().setTitle('Learning Goals and Expectations'); + var q = form.addParagraphTextItem().setTitle('What specific aspects of LLM-based chip design are you most interested in learning?'); + var q = form.addParagraphTextItem().setTitle('Do you have any specific career goals related to hardware design or AI?'); + var q = form.addParagraphTextItem().setTitle('What challenges do you expect to face in this course?'); + var q = form.addParagraphTextItem().setTitle('How do you prefer to learn new technical concepts? (hands-on, theory-first, examples, etc.)'); + + // Additional Information Section + var section = form.addPageBreakItem().setTitle('Additional Information'); + var q = form.addParagraphTextItem().setTitle('Please provide any additional information about your background, interests, or concerns that might be relevant to this course:'); + + // Set confirmation message + form.setConfirmationMessage( + 'Thank you for completing the LLM4ChipDesign Course Prerequisite Survey! ' + + 'This information will help us provide the best possible learning experience ' + + 'tailored to your background and goals.' + ); + + // Log the form URL + var formUrl = form.getPublishedUrl(); + Logger.log('Form created successfully!'); + Logger.log('Form URL: ' + formUrl); + Logger.log('Edit URL: ' + form.getEditUrl()); + + // Also display in console + console.log('Form created successfully!'); + console.log('Form URL: ' + formUrl); + console.log('Edit URL: ' + form.getEditUrl()); + + return { + formUrl: formUrl, + editUrl: form.getEditUrl(), + formId: form.getId() + }; +} \ No newline at end of file diff --git a/preview_survey.py b/preview_survey.py new file mode 100644 index 0000000..737d6f4 --- /dev/null +++ b/preview_survey.py @@ -0,0 +1,191 @@ +#!/usr/bin/env python3 +""" +LLM4ChipDesign Survey Demo - Shows what the Google Form will look like +This script provides a preview of the survey structure and questions. +""" + +import json +from datetime import datetime + + +def display_form_preview(): + """Display a preview of what the Google Form will contain.""" + + print("šŸŽ“ LLM4ChipDesign Course Prerequisite Survey") + print("=" * 80) + print() + + # Load survey structure + try: + with open('survey_structure.json', 'r') as f: + survey = json.load(f) + except FileNotFoundError: + print("āŒ Error: Please run 'python3 create_google_form.py' first to generate the survey files.") + return False + + # Display form header + print("šŸ“‹ FORM DESCRIPTION:") + print("-" * 50) + print(survey['description']) + print() + + # Display each section + section_count = 0 + question_count = 0 + + for section_key, section_data in survey['sections'].items(): + section_count += 1 + print(f"šŸ“„ SECTION {section_count}: {section_data['title'].upper()}") + print("=" * 60) + + if 'description' in section_data: + print(f"ā„¹ļø {section_data['description']}") + print() + + for i, question in enumerate(section_data['questions'], 1): + question_count += 1 + question_title = question['title'] + question_type = question['type'] + required = "* " if question.get('required', False) else " " + + print(f"{required}Q{question_count}: {question_title}") + + # Show question type details + if question_type == 'scale': + scale = question['scale'] + labels = " | ".join(scale['labels']) + print(f" šŸ“Š Scale ({scale['min']}-{scale['max']}): {labels}") + + elif question_type == 'checkbox': + print(f" ā˜‘ļø Multiple choice (select all that apply):") + for choice in question['choices']: + print(f" ☐ {choice}") + + elif question_type == 'text': + print(f" šŸ“ Short text answer") + + elif question_type == 'paragraph': + print(f" šŸ“ Long text answer") + + elif question_type == 'date': + print(f" šŸ“… Date picker") + + print() + + print() # Extra space between sections + + # Display summary + print("šŸ“Š SURVEY SUMMARY") + print("=" * 60) + print(f"Total Sections: {section_count}") + print(f"Total Questions: {question_count}") + + required_count = sum( + len([q for q in section['questions'] if q.get('required', False)]) + for section in survey['sections'].values() + ) + print(f"Required Questions: {required_count}") + print(f"Optional Questions: {question_count - required_count}") + + print() + print("šŸ”§ FORM SETTINGS") + print("-" * 30) + settings = survey['settings'] + print(f"Email Collection: {'Enabled' if settings['collect_email'] else 'Disabled'}") + print(f"Response Editing: {'Allowed' if settings['allow_response_edits'] else 'Not Allowed'}") + print(f"Accepting Responses: {'Yes' if settings['accepting_responses'] else 'No'}") + + return True + + +def show_prerequisites_detail(): + """Show detailed view of the prerequisite assessment section.""" + + try: + with open('survey_structure.json', 'r') as f: + survey = json.load(f) + except FileNotFoundError: + print("āŒ Error: survey_structure.json not found!") + return False + + print("\nšŸŽÆ PREREQUISITE COURSE ASSESSMENT DETAIL") + print("=" * 80) + + prereq_section = survey['sections']['prerequisite_assessment'] + print(f"Description: {prereq_section['description']}") + print() + + print("Subject Areas to be Assessed:") + print("-" * 40) + + for i, question in enumerate(prereq_section['questions'], 1): + print(f"{i:2d}. {question['title']}") + + print() + print("Rating Scale:") + print(" 0 = No Experience (Never studied or worked with this area)") + print(" 1 = Basic (Introductory course or minimal exposure)") + print(" 2 = Intermediate (One or more courses with practical experience)") + print(" 3 = Advanced (Extensive coursework and/or professional experience)") + print(" 4 = Expert (Teaching/research level knowledge)") + + return True + + +def show_tools_detail(): + """Show detailed view of the tools and software section.""" + + try: + with open('survey_structure.json', 'r') as f: + survey = json.load(f) + except FileNotFoundError: + print("āŒ Error: survey_structure.json not found!") + return False + + print("\nšŸ› ļø TOOLS AND SOFTWARE EXPERIENCE DETAIL") + print("=" * 80) + + tools_section = survey['sections']['tools_experience'] + + for question in tools_section['questions']: + print(f"\nšŸ“¦ {question['title']}:") + print(" " + "─" * (len(question['title']) + 1)) + for choice in question['choices']: + print(f" ☐ {choice}") + + return True + + +def main(): + """Main function to display the survey preview.""" + + print("šŸ” LLM4ChipDesign Survey Preview Tool") + print("=" * 80) + print("This tool shows you exactly what the Google Form will contain.") + print() + + if not display_form_preview(): + return 1 + + # Show additional details + show_prerequisites_detail() + show_tools_detail() + + print("\nšŸš€ NEXT STEPS") + print("=" * 80) + print("1. If the preview looks good, create the actual Google Form:") + print(" • Open script.google.com") + print(" • Create a new project") + print(" • Copy the content from 'create_llm4chipdesign_survey.gs'") + print(" • Run the 'createSurveyForm' function") + print() + print("2. For detailed instructions, see: GOOGLE_FORM_SETUP_INSTRUCTIONS.md") + print("3. For validation, run: python3 validate_survey.py") + print() + print(f"šŸ“… Preview generated on: {datetime.now().strftime('%B %d, %Y at %I:%M %p')}") + + return 0 + + +if __name__ == "__main__": + exit(main()) \ No newline at end of file diff --git a/survey_structure.json b/survey_structure.json new file mode 100644 index 0000000..cc90cbe --- /dev/null +++ b/survey_structure.json @@ -0,0 +1,447 @@ +{ + "title": "LLM4ChipDesign Course Prerequisite Survey", + "description": "Welcome to the LLM4ChipDesign course! This course explores the intersection of Large Language Models (LLMs) and chip design, covering topics such as automated Verilog generation, testbench creation, SystemVerilog assertions, and hardware-software co-design using AI.\n\nTo ensure you have the necessary background knowledge and to tailor the course content to your experience level, please complete this prerequisite assessment survey. Your responses will help us understand your current knowledge and provide appropriate support during the course.\n\nPlease answer all questions honestly. This survey is for assessment purposes only and will not affect your grade.", + "settings": { + "collect_email": true, + "allow_response_edits": true, + "accepting_responses": true + }, + "sections": { + "student_info": { + "title": "Student Information", + "questions": [ + { + "type": "text", + "title": "Name", + "required": true + }, + { + "type": "text", + "title": "Student ID", + "required": true + }, + { + "type": "text", + "title": "Email", + "required": true + }, + { + "type": "text", + "title": "Academic Year/Level", + "required": true + }, + { + "type": "text", + "title": "Major/Program", + "required": true + }, + { + "type": "date", + "title": "Date", + "required": true + } + ] + }, + "prerequisite_assessment": { + "title": "Prerequisite Course Assessment", + "description": "Please indicate your experience level with the following subject areas that are fundamental to this course. Rate your experience using the scale:\n• No Experience (0): Never studied or worked with this area\n• Basic (1): Introductory course or minimal exposure\n• Intermediate (2): One or more courses with practical experience\n• Advanced (3): Extensive coursework and/or professional experience\n• Expert (4): Teaching/research level knowledge", + "questions": [ + { + "type": "scale", + "title": "Digital Logic Design & Boolean Algebra", + "scale": { + "min": 0, + "max": 4, + "labels": [ + "No Experience", + "Basic", + "Intermediate", + "Advanced", + "Expert" + ] + }, + "required": true + }, + { + "type": "scale", + "title": "Computer Architecture & Organization", + "scale": { + "min": 0, + "max": 4, + "labels": [ + "No Experience", + "Basic", + "Intermediate", + "Advanced", + "Expert" + ] + }, + "required": true + }, + { + "type": "scale", + "title": "Hardware Description Languages (Verilog/SystemVerilog)", + "scale": { + "min": 0, + "max": 4, + "labels": [ + "No Experience", + "Basic", + "Intermediate", + "Advanced", + "Expert" + ] + }, + "required": true + }, + { + "type": "scale", + "title": "Programming Languages (Python, C/C++)", + "scale": { + "min": 0, + "max": 4, + "labels": [ + "No Experience", + "Basic", + "Intermediate", + "Advanced", + "Expert" + ] + }, + "required": true + }, + { + "type": "scale", + "title": "Data Structures & Algorithms", + "scale": { + "min": 0, + "max": 4, + "labels": [ + "No Experience", + "Basic", + "Intermediate", + "Advanced", + "Expert" + ] + }, + "required": true + }, + { + "type": "scale", + "title": "Machine Learning & Artificial Intelligence", + "scale": { + "min": 0, + "max": 4, + "labels": [ + "No Experience", + "Basic", + "Intermediate", + "Advanced", + "Expert" + ] + }, + "required": true + }, + { + "type": "scale", + "title": "Natural Language Processing (NLP)", + "scale": { + "min": 0, + "max": 4, + "labels": [ + "No Experience", + "Basic", + "Intermediate", + "Advanced", + "Expert" + ] + }, + "required": true + }, + { + "type": "scale", + "title": "Formal Verification & Model Checking", + "scale": { + "min": 0, + "max": 4, + "labels": [ + "No Experience", + "Basic", + "Intermediate", + "Advanced", + "Expert" + ] + }, + "required": true + }, + { + "type": "scale", + "title": "Electronic Design Automation (EDA) Tools", + "scale": { + "min": 0, + "max": 4, + "labels": [ + "No Experience", + "Basic", + "Intermediate", + "Advanced", + "Expert" + ] + }, + "required": true + }, + { + "type": "scale", + "title": "FPGA/ASIC Design Flow", + "scale": { + "min": 0, + "max": 4, + "labels": [ + "No Experience", + "Basic", + "Intermediate", + "Advanced", + "Expert" + ] + }, + "required": true + }, + { + "type": "scale", + "title": "High-Level Synthesis (HLS)", + "scale": { + "min": 0, + "max": 4, + "labels": [ + "No Experience", + "Basic", + "Intermediate", + "Advanced", + "Expert" + ] + }, + "required": true + }, + { + "type": "scale", + "title": "Hardware-Software Co-design", + "scale": { + "min": 0, + "max": 4, + "labels": [ + "No Experience", + "Basic", + "Intermediate", + "Advanced", + "Expert" + ] + }, + "required": true + }, + { + "type": "scale", + "title": "Computer Systems & Operating Systems", + "scale": { + "min": 0, + "max": 4, + "labels": [ + "No Experience", + "Basic", + "Intermediate", + "Advanced", + "Expert" + ] + }, + "required": true + }, + { + "type": "scale", + "title": "Software Engineering & Version Control", + "scale": { + "min": 0, + "max": 4, + "labels": [ + "No Experience", + "Basic", + "Intermediate", + "Advanced", + "Expert" + ] + }, + "required": true + }, + { + "type": "scale", + "title": "Mathematics (Linear Algebra, Statistics)", + "scale": { + "min": 0, + "max": 4, + "labels": [ + "No Experience", + "Basic", + "Intermediate", + "Advanced", + "Expert" + ] + }, + "required": true + } + ] + }, + "specific_courses": { + "title": "Specific Course Experience", + "description": "Please list any specific courses you have completed in the following areas (include course names/codes if possible):", + "questions": [ + { + "type": "paragraph", + "title": "Digital Circuit Design / Logic Design", + "required": false + }, + { + "type": "paragraph", + "title": "Computer Architecture", + "required": false + }, + { + "type": "paragraph", + "title": "Verilog/VHDL/SystemVerilog", + "required": false + }, + { + "type": "paragraph", + "title": "Machine Learning / AI", + "required": false + }, + { + "type": "paragraph", + "title": "Programming (Python/C/C++)", + "required": false + }, + { + "type": "paragraph", + "title": "Formal Methods / Verification", + "required": false + }, + { + "type": "paragraph", + "title": "Embedded Systems", + "required": false + }, + { + "type": "paragraph", + "title": "Other Relevant Courses", + "required": false + } + ] + }, + "tools_experience": { + "title": "Tools and Software Experience", + "description": "Please indicate your familiarity with the following tools and software (check all that apply):", + "questions": [ + { + "type": "checkbox", + "title": "EDA Tools", + "choices": [ + "Vivado (Xilinx)", + "Quartus (Intel)", + "ModelSim/QuestaSim", + "Synopsys Tools", + "Cadence Tools", + "Verilator", + "GTKWave" + ], + "required": false + }, + { + "type": "checkbox", + "title": "Programming Tools", + "choices": [ + "Python", + "C/C++", + "MATLAB", + "Git/GitHub", + "Jupyter Notebooks", + "Linux/Unix", + "Command Line" + ], + "required": false + }, + { + "type": "checkbox", + "title": "AI/ML Frameworks", + "choices": [ + "TensorFlow", + "PyTorch", + "OpenAI API", + "Hugging Face", + "scikit-learn", + "NLTK/spaCy", + "Google Colab" + ], + "required": false + } + ] + }, + "project_experience": { + "title": "Project Experience", + "questions": [ + { + "type": "paragraph", + "title": "Have you worked on any hardware design projects? If yes, please describe briefly:", + "required": false + }, + { + "type": "paragraph", + "title": "Have you used any AI/ML tools or APIs in your projects? If yes, please describe:", + "required": false + }, + { + "type": "paragraph", + "title": "Have you written Verilog or VHDL code before? What was the complexity level?", + "required": false + }, + { + "type": "paragraph", + "title": "Have you used any LLMs (ChatGPT, Claude, etc.) for coding assistance? Please describe your experience:", + "required": false + } + ] + }, + "learning_goals": { + "title": "Learning Goals and Expectations", + "questions": [ + { + "type": "paragraph", + "title": "What specific aspects of LLM-based chip design are you most interested in learning?", + "required": false + }, + { + "type": "paragraph", + "title": "Do you have any specific career goals related to hardware design or AI?", + "required": false + }, + { + "type": "paragraph", + "title": "What challenges do you expect to face in this course?", + "required": false + }, + { + "type": "paragraph", + "title": "How do you prefer to learn new technical concepts? (hands-on, theory-first, examples, etc.)", + "required": false + } + ] + }, + "additional_info": { + "title": "Additional Information", + "questions": [ + { + "type": "paragraph", + "title": "Please provide any additional information about your background, interests, or concerns that might be relevant to this course:", + "required": false + } + ] + } + }, + "generated_on": "2025-09-03T01:31:55.013897" +} \ No newline at end of file diff --git a/validate_survey.py b/validate_survey.py new file mode 100644 index 0000000..0be0fa6 --- /dev/null +++ b/validate_survey.py @@ -0,0 +1,211 @@ +#!/usr/bin/env python3 +""" +LLM4ChipDesign Survey Validation Script +This script validates that the generated Google Form structure matches the original survey content. +""" + +import json +from pathlib import Path + + +def validate_survey_structure(): + """Validate the generated survey structure against requirements.""" + print("šŸ” Validating LLM4ChipDesign Survey Structure...") + print("=" * 60) + + # Load the generated structure + try: + with open('survey_structure.json', 'r') as f: + survey = json.load(f) + except FileNotFoundError: + print("āŒ Error: survey_structure.json not found!") + print(" Please run create_google_form.py first.") + return False + + # Validation tests + tests_passed = 0 + total_tests = 0 + + # Test 1: Basic structure + total_tests += 1 + if all(key in survey for key in ['title', 'description', 'settings', 'sections']): + print("āœ… Test 1: Basic JSON structure is complete") + tests_passed += 1 + else: + print("āŒ Test 1: Missing required JSON fields") + + # Test 2: Required sections + total_tests += 1 + required_sections = [ + 'student_info', 'prerequisite_assessment', 'specific_courses', + 'tools_experience', 'project_experience', 'learning_goals', 'additional_info' + ] + + if all(section in survey['sections'] for section in required_sections): + print("āœ… Test 2: All required sections are present") + tests_passed += 1 + else: + missing = [s for s in required_sections if s not in survey['sections']] + print(f"āŒ Test 2: Missing sections: {missing}") + + # Test 3: Question count validation + total_tests += 1 + expected_counts = { + 'student_info': 6, + 'prerequisite_assessment': 15, + 'specific_courses': 8, + 'tools_experience': 3, + 'project_experience': 4, + 'learning_goals': 4, + 'additional_info': 1 + } + + counts_correct = True + for section_key, expected_count in expected_counts.items(): + if section_key in survey['sections']: + actual_count = len(survey['sections'][section_key]['questions']) + if actual_count != expected_count: + print(f"āŒ Section '{section_key}': Expected {expected_count} questions, got {actual_count}") + counts_correct = False + + if counts_correct: + print("āœ… Test 3: All sections have correct question counts") + tests_passed += 1 + + # Test 4: Prerequisite subjects validation + total_tests += 1 + expected_subjects = [ + "Digital Logic Design & Boolean Algebra", + "Computer Architecture & Organization", + "Hardware Description Languages (Verilog/SystemVerilog)", + "Programming Languages (Python, C/C++)", + "Data Structures & Algorithms", + "Machine Learning & Artificial Intelligence", + "Natural Language Processing (NLP)", + "Formal Verification & Model Checking", + "Electronic Design Automation (EDA) Tools", + "FPGA/ASIC Design Flow", + "High-Level Synthesis (HLS)", + "Hardware-Software Co-design", + "Computer Systems & Operating Systems", + "Software Engineering & Version Control", + "Mathematics (Linear Algebra, Statistics)" + ] + + prereq_questions = survey['sections']['prerequisite_assessment']['questions'] + prereq_titles = [q['title'] for q in prereq_questions] + + if all(subject in prereq_titles for subject in expected_subjects): + print("āœ… Test 4: All prerequisite subjects are included") + tests_passed += 1 + else: + missing_subjects = [s for s in expected_subjects if s not in prereq_titles] + print(f"āŒ Test 4: Missing prerequisite subjects: {missing_subjects}") + + # Test 5: Tools categories validation + total_tests += 1 + tools_section = survey['sections']['tools_experience']['questions'] + tool_categories = [q['title'] for q in tools_section] + expected_categories = ["EDA Tools", "Programming Tools", "AI/ML Frameworks"] + + if all(cat in tool_categories for cat in expected_categories): + print("āœ… Test 5: All tool categories are included") + tests_passed += 1 + else: + missing_cats = [c for c in expected_categories if c not in tool_categories] + print(f"āŒ Test 5: Missing tool categories: {missing_cats}") + + # Summary + print("\n" + "=" * 60) + print(f"šŸ“Š Validation Summary: {tests_passed}/{total_tests} tests passed") + + if tests_passed == total_tests: + print("šŸŽ‰ All validation tests passed! The survey structure is correct.") + return True + else: + print("āš ļø Some validation tests failed. Please review the issues above.") + return False + + +def display_survey_overview(): + """Display an overview of the survey structure.""" + try: + with open('survey_structure.json', 'r') as f: + survey = json.load(f) + except FileNotFoundError: + print("āŒ Error: survey_structure.json not found!") + return + + print("\nšŸ“‹ Survey Overview:") + print("=" * 60) + print(f"šŸ“ Title: {survey['title']}") + print(f"šŸ“Š Total Sections: {len(survey['sections'])}") + + total_questions = sum(len(section['questions']) for section in survey['sections'].values()) + print(f"ā“ Total Questions: {total_questions}") + + print("\nšŸ“‘ Section Breakdown:") + for i, (key, section) in enumerate(survey['sections'].items(), 1): + question_count = len(section['questions']) + print(f" {i}. {section['title']}: {question_count} questions") + + # Show question types for each section + question_types = {} + for question in section['questions']: + q_type = question['type'] + question_types[q_type] = question_types.get(q_type, 0) + 1 + + type_summary = ", ".join([f"{count} {qtype}" for qtype, count in question_types.items()]) + print(f" └─ Types: {type_summary}") + + print(f"\nāš™ļø Form Settings:") + settings = survey['settings'] + for setting, value in settings.items(): + print(f" - {setting.replace('_', ' ').title()}: {value}") + + +def main(): + """Main validation function.""" + print("šŸ”¬ LLM4ChipDesign Survey Validation Tool") + print("=" * 60) + + # Check if required files exist + required_files = [ + 'survey_structure.json', + 'create_llm4chipdesign_survey.gs', + 'GOOGLE_FORM_SETUP_INSTRUCTIONS.md' + ] + + missing_files = [f for f in required_files if not Path(f).exists()] + + if missing_files: + print("āŒ Missing required files:") + for file in missing_files: + print(f" - {file}") + print("\nšŸ’” Please run 'python3 create_google_form.py' first to generate all files.") + return 1 + + print("āœ… All required files are present") + + # Run validation + validation_passed = validate_survey_structure() + + # Display overview + display_survey_overview() + + if validation_passed: + print("\nšŸš€ Ready for Google Form Creation!") + print(" Next steps:") + print(" 1. Open script.google.com") + print(" 2. Create a new project") + print(" 3. Copy content from 'create_llm4chipdesign_survey.gs'") + print(" 4. Run the script to create your form") + print("\nšŸ“– See GOOGLE_FORM_SETUP_INSTRUCTIONS.md for detailed instructions.") + return 0 + else: + print("\nāš ļø Please fix the validation issues before proceeding.") + return 1 + + +if __name__ == "__main__": + exit(main()) \ No newline at end of file