Add Lab 1 solution - #1552
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Lab 1 notebook with your exercise solution by changing the introductory prompt example and expanding the “commercial application” exercise code cell to run multiple LLM calls, plus it updates notebook kernel metadata.
Changes:
- Updated the initial “messages” example prompt text.
- Replaced the exercise scaffold with a concrete multi-call chat-completions flow that prints intermediate outputs.
- Changed the notebook kernelspec display name metadata.
Suppressed comments (1)
1_foundations/1_lab1.ipynb:408
- Add a third API call that uses the second response as input to propose an Agentic AI solution (per the exercise prompt). Also rename the second response variable to avoid implying it contains a business area when it’s actually a follow-up analysis.
"# Extract the second AI response\n",
"\n",
"business_area = response.choices[0].message.content\n",
"\n",
"print(\"\\nSECOND AI RESPONSE:\")\n",
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "# Create a list of messages in the familiar OpenAI format\n", | ||
| "\n", | ||
| "messages = [{\"role\": \"user\", \"content\": \"Tell me a fun fact\"}]" | ||
| "messages = [{\"role\": \"user\", \"content\": \"tell me how llm works?\"}]" |
| "# First create the messages\n", | ||
| "\n", | ||
| "messages = [\n", | ||
| " {\n", | ||
| " \"role\": \"user\",\n", |
| "metadata": { | ||
| "kernelspec": { | ||
| "display_name": ".venv", | ||
| "display_name": "agents (3.12.12)", |
|
Hey, The most common issue is that you've included a file outside community-contributions. This would impact all students on the course. You can see this by going to the "Files changed" tab in this PR; the only changes should be to files in community-contributions. If there's a good reason to change files outside community-contributions, like an important bug fix, then please let me know (and thank you!) The 2nd most common reason is that you've not cleared outputs of Notebooks, leading to large code changes. Instructions at the link above. The 3rd common reason is that you've included too many changes, such as many thousands of lines of code, or a large number of files. I'm grateful for your work, but see the link above for ways we can include this without the repo getting too large. The PR details in this Github screen shows you the files changed, and at the top right the number of lines added (in Green) and deleted (in Red) by this PR. Typically the Green number should be less than 2,000 and the red number should be 0. I very much look forward to merging when this is addressed. Thanks so much |
Added my solution for Lab 1 of the Agentic AI Engineering course.