AI Code Generation Task¶
This assignment challenges you to craft a prompt that instructs an LLM to produce a small command‑line tool. You will iterate on the prompt, run the generated code, and document your results.
Objectives¶
- Write a clear, structured prompt asking the model to generate a basic CLI utility (such as a to‑do list manager or calculator).
- Evaluate the completeness of the generated code and fix any issues.
- Document how you refined the prompt and debugged the output.
Setup¶
- Reuse the Python environment from previous assignments or create a new one.
- Install required packages:
pip install openai python-dotenv - Create a working folder with a log file named
ai_code_gen_log.md.
Instructions¶
- Choose a Tool – decide on a simple CLI utility you want the model to build.
- Initial Prompt – use the prompt testing harness to request the full Python code for your tool.
- Run & Review – save the generated script, execute it, and note any errors.
- Refine – adjust your prompt to address the issues and request an improved version. Repeat until the tool works as intended.
- Document – record each prompt, the resulting code snippets, and your testing notes in
ai_code_gen_log.md.
Deliverables¶
- Final working Python script for the CLI utility.
ai_code_gen_log.mddetailing your prompt iterations and debugging steps.
Submission¶
Commit your script and log file to the repository. In your pull request description, summarize what changes to the prompt produced the best results and mention any remaining limitations.