|
40 | 40 | }, |
41 | 41 | { |
42 | 42 | "cell_type": "code", |
43 | | - "execution_count": null, |
| 43 | + "execution_count": 1, |
44 | 44 | "metadata": { |
45 | 45 | "dotnet_interactive": { |
46 | 46 | "language": "pwsh" |
|
49 | 49 | "kernelName": "pwsh" |
50 | 50 | } |
51 | 51 | }, |
52 | | - "outputs": [], |
| 52 | + "outputs": [ |
| 53 | + { |
| 54 | + "data": { |
| 55 | + "text/html": [ |
| 56 | + "<table><thead><tr><th><i>key</i></th><th>value</th></tr></thead><tbody><tr><td><div class=\"dni-plaintext\"><pre>FullName</pre></div></td><td><div class=\"dni-plaintext\"><pre>AITools.DefaultTool</pre></div></td></tr><tr><td><div class=\"dni-plaintext\"><pre>Value</pre></div></td><td><div class=\"dni-plaintext\"><pre>Copilot</pre></div></td></tr></tbody></table><style>\r\n", |
| 57 | + ".dni-code-hint {\r\n", |
| 58 | + " font-style: italic;\r\n", |
| 59 | + " overflow: hidden;\r\n", |
| 60 | + " white-space: nowrap;\r\n", |
| 61 | + "}\r\n", |
| 62 | + ".dni-treeview {\r\n", |
| 63 | + " white-space: nowrap;\r\n", |
| 64 | + "}\r\n", |
| 65 | + ".dni-treeview td {\r\n", |
| 66 | + " vertical-align: top;\r\n", |
| 67 | + " text-align: start;\r\n", |
| 68 | + "}\r\n", |
| 69 | + "details.dni-treeview {\r\n", |
| 70 | + " padding-left: 1em;\r\n", |
| 71 | + "}\r\n", |
| 72 | + "table td {\r\n", |
| 73 | + " text-align: start;\r\n", |
| 74 | + "}\r\n", |
| 75 | + "table tr { \r\n", |
| 76 | + " vertical-align: top; \r\n", |
| 77 | + " margin: 0em 0px;\r\n", |
| 78 | + "}\r\n", |
| 79 | + "table tr td pre \r\n", |
| 80 | + "{ \r\n", |
| 81 | + " vertical-align: top !important; \r\n", |
| 82 | + " margin: 0em 0px !important;\r\n", |
| 83 | + "} \r\n", |
| 84 | + "table th {\r\n", |
| 85 | + " text-align: start;\r\n", |
| 86 | + "}\r\n", |
| 87 | + "</style>" |
| 88 | + ] |
| 89 | + }, |
| 90 | + "metadata": {}, |
| 91 | + "output_type": "display_data" |
| 92 | + } |
| 93 | + ], |
53 | 94 | "source": [ |
54 | 95 | "# Anthropic's having outages. PIVOTTT\n", |
55 | 96 | "Set-AIToolDefault -Tool Copilot\n", |
|
64 | 105 | }, |
65 | 106 | { |
66 | 107 | "cell_type": "code", |
67 | | - "execution_count": null, |
| 108 | + "execution_count": 2, |
68 | 109 | "metadata": { |
69 | 110 | "dotnet_interactive": { |
70 | 111 | "language": "pwsh" |
|
105 | 146 | "outputs": [], |
106 | 147 | "source": [ |
107 | 148 | "$designPrompt = @\"\n", |
108 | | - "Review this pet vaccination PDF and design a normalized database schema.\n", |
| 149 | + "Review Tests/pdf/immunization.pdf carefully and design a normalized database schema.\n", |
109 | 150 | "\n", |
110 | 151 | "Requirements:\n", |
111 | 152 | "- Create properly normalized tables (at least 2 tables with foreign key relationship)\n", |
112 | 153 | "- Use best practices for data types, constraints, and indexing\n", |
113 | | - "- Target database: SQL Server tempdb\n", |
| 154 | + "- Target DB: SQL Server, localhost, windows auth, tempdb\n", |
114 | 155 | "\n", |
115 | 156 | "Output:\n", |
116 | 157 | "1. First, explain your design decisions (table structure, why you normalized this way)\n", |
117 | 158 | "2. Then provide the complete T-SQL DDL to create the tables\n", |
118 | | - "3. Format the DDL in a code block so I can execute it\n", |
| 159 | + "3. Execute ONLY DDL against local SQL Server\n", |
119 | 160 | "\"@\n", |
120 | 161 | "\n", |
121 | | - "Get-ChildItem ./Tests/pdf/immunization.pdf |\n", |
122 | | - " ConvertTo-AITImage |\n", |
123 | | - " Invoke-AITool -Prompt $designPrompt" |
124 | | - ] |
125 | | - }, |
126 | | - { |
127 | | - "cell_type": "markdown", |
128 | | - "metadata": {}, |
129 | | - "source": [ |
130 | | - "### Now go check SSMS!\n", |
131 | | - "\n", |
132 | | - "Or... let's have Claude create AND show us what it built:" |
133 | | - ] |
134 | | - }, |
135 | | - { |
136 | | - "cell_type": "code", |
137 | | - "execution_count": null, |
138 | | - "metadata": { |
139 | | - "dotnet_interactive": { |
140 | | - "language": "pwsh" |
141 | | - }, |
142 | | - "polyglot_notebook": { |
143 | | - "kernelName": "pwsh" |
144 | | - } |
145 | | - }, |
146 | | - "outputs": [], |
147 | | - "source": [ |
148 | | - "$createPrompt = \"Review this pet vaccination PDF and design a normalized database schema.\n", |
149 | | - "\n", |
150 | | - "Requirements:\n", |
151 | | - "- Create properly normalized tables (at least 2 tables with foreign key relationship)\n", |
152 | | - "- Use best practices for data types, constraints, and indexing\n", |
153 | | - "- Target database: tempdb on localhost with windows auth. dbatools is available on the machine, use it.\n", |
154 | | - "\n", |
155 | | - "DO NOT IMPORT DATA, JUST SCHEMA\"\n", |
156 | | - "\n", |
157 | | - "\n", |
158 | | - "Get-ChildItem ./Tests/pdf/immunization.pdf |\n", |
159 | | - " ConvertTo-AITImage |\n", |
160 | | - " Invoke-AITool -Prompt $createPrompt\n", |
161 | | - "\n", |
162 | | - "# Show what was created\n", |
163 | | - "Get-DbaDbTable -SqlInstance $sqlInstance -Database $database -Table Pets, Vaccinations |\n", |
164 | | - " Select-Object Name, RowCount, DataSpaceUsed" |
| 162 | + "Invoke-AITool -Prompt $designPrompt" |
165 | 163 | ] |
166 | 164 | }, |
167 | 165 | { |
|
189 | 187 | }, |
190 | 188 | "outputs": [], |
191 | 189 | "source": [ |
192 | | - "$extractPrompt = \"Extract the data from this pet vaccination PDF.\n", |
| 190 | + "$extractPrompt = \"Extract the data from /Tests/pdf/immunization.md\n", |
193 | 191 | "\n", |
194 | 192 | "I have vaccine tables in tempdb on localhost (sql server/windows auth),\n", |
195 | 193 | "figure out the structure, insert the data from the PDF then show me what\n", |
196 | 194 | "you inserted\"\n", |
197 | 195 | "\n", |
198 | | - "Get-ChildItem ./Tests/pdf/immunization.pdf |\n", |
199 | | - " ConvertTo-AITImage |\n", |
200 | | - " Invoke-AITool -Prompt $extractPrompt" |
201 | | - ] |
202 | | - }, |
203 | | - { |
204 | | - "cell_type": "code", |
205 | | - "execution_count": null, |
206 | | - "metadata": { |
207 | | - "dotnet_interactive": { |
208 | | - "language": "pwsh" |
209 | | - }, |
210 | | - "polyglot_notebook": { |
211 | | - "kernelName": "pwsh" |
212 | | - } |
213 | | - }, |
214 | | - "outputs": [], |
215 | | - "source": [ |
216 | | - "# Let's see what we imported in SSMS" |
| 196 | + "Invoke-AITool -Prompt $extractPrompt" |
217 | 197 | ] |
218 | 198 | }, |
219 | 199 | { |
220 | 200 | "cell_type": "markdown", |
221 | 201 | "metadata": {}, |
222 | 202 | "source": [ |
223 | | - "### Notice anything wrong?\n", |
| 203 | + "### Go look in SSMS, notice anything wrong?\n", |
224 | 204 | "\n", |
225 | 205 | "The data is in there exactly as the PDF showed it. But there might be problems...\n", |
226 | 206 | "\n", |
|
243 | 223 | }, |
244 | 224 | "outputs": [], |
245 | 225 | "source": [ |
246 | | - "Get-ChildItem ./Tests/pdf/immunization.pdf |\n", |
247 | | - " ConvertTo-AITImage |\n", |
248 | | - " Invoke-AITool -Prompt C:\\github\\aitools\\unattended.md" |
| 226 | + "Invoke-AITool -Prompt C:\\github\\aitools\\unattended.md -Tool Claude" |
249 | 227 | ] |
250 | 228 | }, |
251 | 229 | { |
|
274 | 252 | "outputs": [], |
275 | 253 | "source": [ |
276 | 254 | "$reportPrompt = @\"\n", |
277 | | - "Review this pet vaccination PDF and generate a data quality report.\n", |
| 255 | + "Review /Tests/pdf/immunization.pdf carefully and generate a data quality report.\n", |
278 | 256 | "\n", |
279 | 257 | "Analyze the document thoroughly for:\n", |
280 | | - "- Data inconsistencies (breed vs. physical characteristics, weight ranges, etc.)\n", |
281 | 258 | "- Missing or incomplete information\n", |
282 | 259 | "- Suspicious or potentially incorrect values\n", |
283 | 260 | "- Format issues\n", |
|
292 | 269 | "Be thorough - this report helps humans catch shit data before it pollutes the database.\n", |
293 | 270 | "\"@\n", |
294 | 271 | "\n", |
295 | | - "$report = Get-ChildItem ./Tests/pdf/immunization.pdf |\n", |
296 | | - " ConvertTo-AITImage |\n", |
297 | | - " Invoke-AITool -Prompt $reportPrompt\n", |
| 272 | + "$report = Invoke-AITool -Prompt $reportPrompt\n", |
298 | 273 | "\n", |
299 | 274 | "# Save the report\n", |
300 | 275 | "$report | Set-Content ./Tests/pdf/data_quality_report.md\n", |
|
343 | 318 | "\n", |
344 | 319 | "\"Labrador\" is a valid breed. Traditional validation would pass it.\n", |
345 | 320 | "\n", |
346 | | - "But AI looks at the *whole picture* and says \"wait, this doesn't add up.\"" |
| 321 | + "But AI looks at the *whole picture* and knows it doesn't quite add up." |
347 | 322 | ] |
348 | 323 | } |
349 | 324 | ], |
|
0 commit comments