Skip to content

Commit 9b362e5

Browse files
committed
updating labs
1 parent 573e261 commit 9b362e5

36 files changed

Lines changed: 2103 additions & 518 deletions

Lab_4_Intro_to_Bedrock_and_Agents/basic_langgraph_agent.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,29 +254,29 @@
254254
{
255255
"cell_type": "markdown",
256256
"id": "b1pdivtjrsl",
257-
"source": "## 9. Query with Sample Company Data\n\nThis section demonstrates how to provide context to the agent. We load sample company data and ask the agent questions about it.\n\nThis pattern is useful for:\n- **RAG (Retrieval-Augmented Generation)**: Injecting retrieved documents into prompts\n- **In-context learning**: Providing examples or data for the agent to reference\n- **Domain-specific Q&A**: Answering questions based on proprietary information",
257+
"source": "## 9. Query with Sample Manufacturing Data\n\nThis section demonstrates how to provide context to the agent. We load sample manufacturing data and ask the agent questions about it.\n\nThis pattern is useful for:\n- **RAG (Retrieval-Augmented Generation)**: Injecting retrieved documents into prompts\n- **In-context learning**: Providing examples or data for the agent to reference\n- **Domain-specific Q&A**: Answering questions based on proprietary information",
258258
"metadata": {}
259259
},
260260
{
261261
"cell_type": "code",
262262
"id": "o1qri9pwatb",
263-
"source": "# Load sample company data\nfrom load_sample_data import load_company_data, print_info\n\ncompany_text = load_company_data()\nprint_info(company_text)",
263+
"source": "# Load sample manufacturing data\nfrom load_sample_data import load_manufacturing_data, print_info\n\nmanufacturing_text = load_manufacturing_data()\nprint_info(manufacturing_text)",
264264
"metadata": {},
265265
"execution_count": null,
266266
"outputs": []
267267
},
268268
{
269269
"cell_type": "code",
270270
"id": "0jv7ule45vm5",
271-
"source": "# Ask the agent questions about the company data\ndef ask_about_data(question: str, context: str):\n \"\"\"Ask the agent a question with context.\"\"\"\n prompt = f\"\"\"Based on this company information:\n\n{context}\n\nQuestion: {question}\"\"\"\n return run_agent(prompt)\n\n# Sample questions\nask_about_data(\"What products does this company make?\", company_text)",
271+
"source": "# Ask the agent questions about the manufacturing data\ndef ask_about_data(question: str, context: str):\n \"\"\"Ask the agent a question with context.\"\"\"\n prompt = f\"\"\"Based on this manufacturing information:\n\n{context}\n\nQuestion: {question}\"\"\"\n return run_agent(prompt)\n\n# Sample questions\nask_about_data(\"What components are in the Electric Powertrain domain?\", manufacturing_text)",
272272
"metadata": {},
273273
"execution_count": null,
274274
"outputs": []
275275
},
276276
{
277277
"cell_type": "code",
278278
"id": "7u7fqe1mf8w",
279-
"source": "# Another sample question\nask_about_data(\"What services does the company offer?\", company_text)",
279+
"source": "# Another sample question\nask_about_data(\"What defects have been found and what are their severities?\", manufacturing_text)",
280280
"metadata": {},
281281
"execution_count": null,
282282
"outputs": []
@@ -295,4 +295,4 @@
295295
},
296296
"nbformat": 4,
297297
"nbformat_minor": 5
298-
}
298+
}
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
"""Simple loader for sample company data."""
1+
"""Simple loader for sample manufacturing data."""
22

3-
def load_company_data(filepath: str = "sample_company_data.txt") -> str:
4-
"""Load and return the company data text."""
3+
4+
def load_manufacturing_data(filepath: str = "sample_manufacturing_data.txt") -> str:
5+
"""Load and return the manufacturing data text."""
56
with open(filepath, "r") as f:
67
text = f.read().strip()
78
return text
89

910

11+
# Keep backward-compatible alias
12+
load_company_data = load_manufacturing_data
13+
14+
1015
def print_info(text: str) -> None:
1116
"""Print basic info about the text."""
1217
lines = text.split("\n")
@@ -18,5 +23,5 @@ def print_info(text: str) -> None:
1823

1924

2025
if __name__ == "__main__":
21-
data = load_company_data()
26+
data = load_manufacturing_data()
2227
print_info(data)
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
R2D2 is a next-generation robotic vehicle product currently under development. The product
2+
encompasses four technology domains: Electric Powertrain, Chassis, Body, and Infotainment.
3+
4+
Components
5+
6+
The Electric Powertrain domain includes the HVB_3900 High-Voltage Battery, PDU_1500 Power
7+
Distribution Unit, INV_2300 Inverter, and EMC_1800 E-Machine. The Chassis domain covers the
8+
SUS_4200 Suspension and BRK_3800 Brakes systems. The Body domain includes EXT_5600 Exterior
9+
and INT_6700 Interior components, along with SEA_7500 Seats.
10+
11+
Requirements
12+
13+
The HVB_3900 High-Voltage Battery has extensive engineering requirements covering battery cell
14+
and module design, housing and structural integrity, high-voltage wiring and connectors,
15+
thermal management, energy management, electrical safety, durability and lifecycle, crash
16+
safety, and electromagnetic compatibility. Each requirement includes detailed specifications
17+
in both German and English.
18+
19+
Testing
20+
21+
Requirements are validated through structured test sets containing individual test cases.
22+
For example, the Cell Design Tests (TS_1_1) include test cases for Voltage, Capacity,
23+
Energy Density, and Power Density. Test cases track status (Planned, Passed, Failed,
24+
In Progress), required resources, duration, schedule, and responsible engineer.
25+
26+
Defects
27+
28+
Testing has identified several defects including DEF001 (energy density does not meet
29+
specifications, High severity), DEF003 (high voltage interlock system not functioning
30+
correctly, Critical severity), and DEF005 (battery management system communication failure,
31+
High severity). Defects are tracked with severity, priority, assigned engineer, and
32+
resolution status.
33+
34+
Change Proposals
35+
36+
Change proposals address issues found during development. CP001 proposes increasing energy
37+
density requirements to meet Chinese standards (development cost: $500,000). CP002 proposes
38+
enhancing water ingress protection to IP68 (development cost: $250,000). CP003 addresses
39+
compliance with Chinese national standards for high-voltage wiring (development cost: $300,000).

0 commit comments

Comments
 (0)