Skip to content

Commit 8c1c086

Browse files
committed
fix index schema
1 parent 4a4b40e commit 8c1c086

File tree

2 files changed

+85
-64
lines changed

2 files changed

+85
-64
lines changed

Quickstart-Agentic-Retrieval/quickstart.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
},
5656
{
5757
"cell_type": "code",
58-
"execution_count": 2,
58+
"execution_count": null,
5959
"id": "ee48bec5",
6060
"metadata": {},
6161
"outputs": [
@@ -77,8 +77,7 @@
7777
" SearchField(name=\"id\", type=\"Edm.String\", key=True, filterable=True, sortable=True, facetable=True),\n",
7878
" SearchField(name=\"page_chunk\", type=\"Edm.String\", filterable=False, sortable=False, facetable=False),\n",
7979
" SearchField(name=\"page_embedding_text_3_large\", type=\"Collection(Edm.Single)\", stored=False, vector_search_dimensions=3072, vector_search_profile_name=\"hnsw_text_3_large\"),\n",
80-
" SearchField(name=\"page_number\", type=\"Edm.Int32\", filterable=True, sortable=True, facetable=True),\n",
81-
" SearchField(name=\"chapter_number\", type=\"Edm.Int32\", filterable=True, sortable=True, facetable=True)\n",
80+
" SearchField(name=\"page_number\", type=\"Edm.Int32\", filterable=True, sortable=True, facetable=True)\n",
8281
" ],\n",
8382
" vector_search=VectorSearch(\n",
8483
" profiles=[VectorSearchProfile(name=\"hnsw_text_3_large\", algorithm_configuration_name=\"alg\", vectorizer_name=\"azure_openai_text_3_large\")],\n",

agent-example/agent-example.ipynb

Lines changed: 83 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
},
5656
{
5757
"cell_type": "code",
58-
"execution_count": 2,
58+
"execution_count": null,
5959
"id": "91fd6810",
6060
"metadata": {},
6161
"outputs": [
@@ -77,8 +77,7 @@
7777
" SearchField(name=\"id\", type=\"Edm.String\", key=True, filterable=True, sortable=True, facetable=True),\n",
7878
" SearchField(name=\"page_chunk\", type=\"Edm.String\", filterable=False, sortable=False, facetable=False),\n",
7979
" SearchField(name=\"page_embedding_text_3_large\", type=\"Collection(Edm.Single)\", stored=False, vector_search_dimensions=3072, vector_search_profile_name=\"hnsw_text_3_large\"),\n",
80-
" SearchField(name=\"page_number\", type=\"Edm.Int32\", filterable=True, sortable=True, facetable=True),\n",
81-
" SearchField(name=\"chapter_number\", type=\"Edm.Int32\", filterable=True, sortable=True, facetable=True)\n",
80+
" SearchField(name=\"page_number\", type=\"Edm.Int32\", filterable=True, sortable=True, facetable=True)\n",
8281
" ],\n",
8382
" vector_search=VectorSearch(\n",
8483
" profiles=[VectorSearchProfile(name=\"hnsw_text_3_large\", algorithm_configuration_name=\"alg\", vectorizer_name=\"azure_openai_text_3_large\")],\n",
@@ -317,10 +316,46 @@
317316
},
318317
{
319318
"cell_type": "code",
320-
"execution_count": null,
319+
"execution_count": 12,
321320
"id": "f1fc04fc",
322321
"metadata": {},
323-
"outputs": [],
322+
"outputs": [
323+
{
324+
"name": "stdout",
325+
"output_type": "stream",
326+
"text": [
327+
"Agent response: ### Suburban Belts vs\n",
328+
" Urban Cores December Brightening\n",
329+
"\n",
330+
"Suburban belts often have a larger increase in brightness during December compared to urban cores, even though absolute light levels are higher downtown\n",
331+
" This phenomenon can be attributed to the prevalent use of holiday light displays in residential areas\n",
332+
" During the holiday season, many suburban homes are decorated with extensive light displays for Christmas and New Year celebrations, causing a significant increase in local brightness\n",
333+
" In contrast, urban cores, which typically comprise commercial and industrial areas, may not see such a dramatic increase in lighting because these areas are already brightly lit and may not participate as extensively in the holiday light decorations ([ref_id: 0])\n",
334+
"\n",
335+
"\n",
336+
"### Phoenix Nighttime Street Grid\n",
337+
"\n",
338+
"The Phoenix nighttime street grid is sharply visible from space due to the urban structure and meticulous grid layout of city blocks and streets\n",
339+
" Phoenix, like many large urban areas in the central and western United States, is planned along a regular grid system\n",
340+
" This grid is clearly illuminated by streetlights, making it highly visible from the low-Earth-orbit vantage point of satellites\n",
341+
" Major thoroughfares, such as Grand Avenue, are brightly lit and cut diagonally across the grid, further enhancing visibility\n",
342+
" Additionally, Phoenix's extensive urban and suburban sprawl, with its many residential and commercial areas, contributes to the well-defined grid pattern seen from space ([ref_id: 1])\n",
343+
"\n",
344+
"\n",
345+
"In contrast, large stretches of the interstate between midwestern cities remain comparatively dim because these areas are often rural and less densely populated, resulting in fewer streetlights and less overall illumination\n",
346+
" The focus of lighting in rural areas tends to be around key nodal points such as intersections and town centers, rather than continuous bright lighting along highways or interstates ([ref_id: 2])\n",
347+
" \n",
348+
"\n",
349+
"References:\n",
350+
"- [ref_id: 0]: Holiday light increase in suburban belts\n",
351+
"\n",
352+
"- [ref_id: 1]: Grid layout and brightly lit thoroughfares in Phoenix\n",
353+
"\n",
354+
"- [ref_id: 2]: Lighting patterns in rural areas along interstates\n",
355+
"\n"
356+
]
357+
}
358+
],
324359
"source": [
325360
"message = project_client.agents.create_message(\n",
326361
" thread_id=thread.id,\n",
@@ -349,7 +384,7 @@
349384
},
350385
{
351386
"cell_type": "code",
352-
"execution_count": null,
387+
"execution_count": 13,
353388
"id": "7b90fefa",
354389
"metadata": {},
355390
"outputs": [
@@ -363,7 +398,7 @@
363398
" \"type\": \"ModelQueryPlanning\",\n",
364399
" \"id\": 0,\n",
365400
" \"inputTokens\": 1359,\n",
366-
" \"outputTokens\": 516\n",
401+
" \"outputTokens\": 518\n",
367402
" },\n",
368403
" {\n",
369404
" \"type\": \"AzureSearchQuery\",\n",
@@ -373,8 +408,8 @@
373408
" \"search\": \"suburban belts December brightening compared to urban cores\",\n",
374409
" \"filter\": null\n",
375410
" },\n",
376-
" \"queryTime\": \"2025-04-30T03:45:03.614Z\",\n",
377-
" \"elapsedMs\": 437\n",
411+
" \"queryTime\": \"2025-05-01T23:27:06.679Z\",\n",
412+
" \"elapsedMs\": 361\n",
378413
" },\n",
379414
" {\n",
380415
" \"type\": \"AzureSearchQuery\",\n",
@@ -384,20 +419,20 @@
384419
" \"search\": \"Phoenix nighttime street grid visibility from space\",\n",
385420
" \"filter\": null\n",
386421
" },\n",
387-
" \"queryTime\": \"2025-04-30T03:45:03.957Z\",\n",
422+
" \"queryTime\": \"2025-05-01T23:27:07.021Z\",\n",
388423
" \"count\": 2,\n",
389-
" \"elapsedMs\": 342\n",
424+
" \"elapsedMs\": 341\n",
390425
" },\n",
391426
" {\n",
392427
" \"type\": \"AzureSearchQuery\",\n",
393428
" \"id\": 3,\n",
394429
" \"targetIndex\": \"earth_at_night\",\n",
395430
" \"query\": {\n",
396-
" \"search\": \"dim interstates between midwestern cities compared to Phoenix\",\n",
431+
" \"search\": \"dim interstates between midwestern cities at night\",\n",
397432
" \"filter\": null\n",
398433
" },\n",
399-
" \"queryTime\": \"2025-04-30T03:45:04.250Z\",\n",
400-
" \"elapsedMs\": 293\n",
434+
" \"queryTime\": \"2025-05-01T23:27:07.423Z\",\n",
435+
" \"elapsedMs\": 401\n",
401436
" }\n",
402437
"]\n",
403438
"Retrieval results\n",
@@ -441,37 +476,47 @@
441476
},
442477
{
443478
"cell_type": "code",
444-
"execution_count": null,
479+
"execution_count": 14,
445480
"id": "d9478191",
446481
"metadata": {},
447482
"outputs": [
448483
{
449484
"name": "stdout",
450485
"output_type": "stream",
451486
"text": [
452-
"Agent response: To find lava at night, you can use the following methods:\n",
487+
"Agent response: To find lava at night, you can rely on a combination of visual and infrared imaging techniques from satellite observations:\n",
453488
"\n",
454489
"1\n",
455-
" **Infrared Imaging:**\n",
456-
" - Satellite instruments such as the Thermal Infrared Sensor (TIRS) on Landsat 8 can detect the thermal (infrared) signature of lava\n",
457-
" This allows for the observation of both hot and cooling lava flows which are not visible in regular imagery ([ref: 2, 3, 4])\n",
458-
"\n",
459-
" - Combining thermal imaging with nightlight data provides a comprehensive view of volcanic activity, distinguishing the hot lava from the cooler surroundings\n",
490+
" **Thermal Imaging**: Satellites with thermal infrared sensors, like the Operational Land Imager (OLI) and the Thermal Infrared Sensor (TIRS) on the Landsat 8 satellite, can detect the thermal signature of hot lava\n",
491+
" These sensors can differentiate between the very hot bright white areas, cooling lava appearing red, and lava flows obstructed by clouds appearing purple ([ref_id: 3])\n",
460492
"\n",
461493
"\n",
462494
"2\n",
463-
" **Visible Light Monitoring:**\n",
464-
" - The Visible Infrared Imaging Radiometer Suite (VIIRS) Day/Night Band (DNB) on polar-orbiting satellites can detect faint sources of illumination such as moonlight, which can highlight glowing lava flows at night ([ref: 4, 5])\n",
465-
"\n",
466-
" - The DNB can capture the glow from active vents and lava flows, making it possible to track volcanic activity even in the absence of sunlight\n",
495+
" **Nightlight Images**: The VIIRS Day/Night Band (DNB) on polar-orbiting satellites captures faint light sources such as moonlight and starlight\n",
496+
" These nightlight images can reveal the glow of lava flows, especially in the presence of sufficient moonlight ([ref_id: 0])\n",
467497
"\n",
468498
"\n",
469499
"3\n",
470-
" **Astronaut Photography:**\n",
471-
" - Nighttime photographs taken by astronauts aboard the International Space Station (ISS) can capture the glow of lava against the backdrop of city lights, providing a visual reference for volcanic activity ([ref: 2, 3])\n",
500+
" **Combining Thermal and Visual Data**: Combining thermal data with nightlight images can provide a more comprehensive view of volcanic activity at night\n",
501+
" This approach has been used to monitor lava flows from volcanoes like Mount Etna and Kilauea ([ref_id: 2], [ref_id: 0])\n",
502+
"\n",
503+
"\n",
504+
"4\n",
505+
" **Using Satellite Observations**: Satellites like Suomi NPP and Landsat 8 provide valuable data for monitoring volcanic activity\n",
506+
" These satellites allow for continuous observation and help detect changes in the lava flow and volcanic ash plumes ([ref_id: 5])\n",
507+
"\n",
508+
"\n",
509+
"By leveraging these satellite imaging techniques, you can effectively monitor and locate lava flows during nighttime hours\n",
472510
"\n",
473511
"\n",
474-
"Overall, infrared and visible light satellite imagery, combined with thermal data, are effective tools for locating and monitoring lava flows at night\n",
512+
"References:\n",
513+
"- [ref_id: 0]: Nighttime glow of lava at Mount Etna\n",
514+
"\n",
515+
"- [ref_id: 2]: Visibility of hot lava at Mount Etna\n",
516+
"\n",
517+
"- [ref_id: 3]: Thermal imaging of Kilauea's lava flows\n",
518+
"\n",
519+
"- [ref_id: 5]: Use of VIIRS and thermal sensors for volcanic activity observation\n",
475520
"\n"
476521
]
477522
}
@@ -501,7 +546,7 @@
501546
},
502547
{
503548
"cell_type": "code",
504-
"execution_count": null,
549+
"execution_count": 15,
505550
"id": "c063c45e",
506551
"metadata": {},
507552
"outputs": [
@@ -514,43 +559,20 @@
514559
" {\n",
515560
" \"type\": \"ModelQueryPlanning\",\n",
516561
" \"id\": 0,\n",
517-
" \"inputTokens\": 1816,\n",
518-
" \"outputTokens\": 291\n",
562+
" \"inputTokens\": 1788,\n",
563+
" \"outputTokens\": 100\n",
519564
" },\n",
520565
" {\n",
521566
" \"type\": \"AzureSearchQuery\",\n",
522567
" \"id\": 1,\n",
523568
" \"targetIndex\": \"earth_at_night\",\n",
524569
" \"query\": {\n",
525-
" \"search\": \"locating lava flows at night\",\n",
570+
" \"search\": \"locating lava at night\",\n",
526571
" \"filter\": null\n",
527572
" },\n",
528-
" \"queryTime\": \"2025-04-30T03:45:39.901Z\",\n",
573+
" \"queryTime\": \"2025-05-01T23:27:22.983Z\",\n",
529574
" \"count\": 6,\n",
530-
" \"elapsedMs\": 19627\n",
531-
" },\n",
532-
" {\n",
533-
" \"type\": \"AzureSearchQuery\",\n",
534-
" \"id\": 2,\n",
535-
" \"targetIndex\": \"earth_at_night\",\n",
536-
" \"query\": {\n",
537-
" \"search\": \"nighttime visibility of lava\",\n",
538-
" \"filter\": null\n",
539-
" },\n",
540-
" \"queryTime\": \"2025-04-30T03:45:40.301Z\",\n",
541-
" \"count\": 6,\n",
542-
" \"elapsedMs\": 400\n",
543-
" },\n",
544-
" {\n",
545-
" \"type\": \"AzureSearchQuery\",\n",
546-
" \"id\": 3,\n",
547-
" \"targetIndex\": \"earth_at_night\",\n",
548-
" \"query\": {\n",
549-
" \"search\": \"equipment for finding lava at night\",\n",
550-
" \"filter\": null\n",
551-
" },\n",
552-
" \"queryTime\": \"2025-04-30T03:45:40.584Z\",\n",
553-
" \"elapsedMs\": 282\n",
575+
" \"elapsedMs\": 407\n",
554576
" }\n",
555577
"]\n",
556578
"Retrieval results\n",
@@ -572,7 +594,7 @@
572594
" {\n",
573595
" \"type\": \"AzureSearchDoc\",\n",
574596
" \"id\": \"2\",\n",
575-
" \"activitySource\": 2,\n",
597+
" \"activitySource\": 1,\n",
576598
" \"docKey\": \"earth_at_night_508_page_66_verbalized\",\n",
577599
" \"sourceData\": null\n",
578600
" },\n",
@@ -586,15 +608,15 @@
586608
" {\n",
587609
" \"type\": \"AzureSearchDoc\",\n",
588610
" \"id\": \"4\",\n",
589-
" \"activitySource\": 2,\n",
590-
" \"docKey\": \"earth_at_night_508_page_46_verbalized\",\n",
611+
" \"activitySource\": 1,\n",
612+
" \"docKey\": \"earth_at_night_508_page_44_verbalized\",\n",
591613
" \"sourceData\": null\n",
592614
" },\n",
593615
" {\n",
594616
" \"type\": \"AzureSearchDoc\",\n",
595617
" \"id\": \"5\",\n",
596618
" \"activitySource\": 1,\n",
597-
" \"docKey\": \"earth_at_night_508_page_44_verbalized\",\n",
619+
" \"docKey\": \"earth_at_night_508_page_46_verbalized\",\n",
598620
" \"sourceData\": null\n",
599621
" }\n",
600622
"]\n"

0 commit comments

Comments
 (0)