Skip to content

Commit e47180e

Browse files
Merge pull request #668 from HeidiSteen/heidist-rag
Added linebreaks in sample output for readability
2 parents 13097c9 + c150376 commit e47180e

File tree

3 files changed

+64
-27
lines changed

3 files changed

+64
-27
lines changed

articles/search/tutorial-rag-build-solution-maximize-relevance.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,12 @@ print(response.choices[0].message.content)
107107
Output from this request might look like the following example.
108108

109109
```
110-
Yes, there are cloud formations specific to oceans and large bodies of water. A notable example is "cloud streets," which are parallel rows of clouds that form over the Bering Strait in the Arctic Ocean. These cloud streets occur when wind blows from a cold surface like sea ice over warmer, moister air near the open ocean, leading to the formation of spinning air cylinders. Clouds form along the upward cycle of these cylinders, while skies remain clear along the downward cycle (Source: page-21.pdf).
110+
Yes, there are cloud formations specific to oceans and large bodies of water.
111+
A notable example is "cloud streets," which are parallel rows of clouds that form over
112+
the Bering Strait in the Arctic Ocean. These cloud streets occur when wind blows from
113+
a cold surface like sea ice over warmer, moister air near the open ocean, leading to
114+
the formation of spinning air cylinders. Clouds form along the upward cycle of these cylinders,
115+
while skies remain clear along the downward cycle (Source: page-21.pdf).
111116
```
112117

113118
## Update the index for semantic ranking and scoring profiles
@@ -264,13 +269,20 @@ Output from a semantically ranked and boosted query might look like the followin
264269
```
265270
Yes, there are specific cloud formations influenced by oceans and large bodies of water:
266271

267-
- **Stratus Clouds Over Icebergs**: Low stratus clouds can frame holes over icebergs, such as Iceberg A-56 in the South Atlantic Ocean, likely due to thermal instability caused by the iceberg (source: page-39.pdf).
272+
- **Stratus Clouds Over Icebergs**: Low stratus clouds can frame holes over icebergs,
273+
such as Iceberg A-56 in the South Atlantic Ocean, likely due to thermal instability caused
274+
by the iceberg (source: page-39.pdf).
268275

269-
- **Undular Bores**: These are wave structures in the atmosphere created by the collision of cool, dry air from a continent with warm, moist air over the ocean, as seen off the coast of Mauritania (source: page-23.pdf).
276+
- **Undular Bores**: These are wave structures in the atmosphere created by the collision
277+
of cool, dry air from a continent with warm, moist air over the ocean, as seen off the
278+
coast of Mauritania (source: page-23.pdf).
270279

271-
- **Ship Tracks**: These are narrow clouds formed by water vapor condensing around tiny particles from ship exhaust. They are observed over the oceans, such as in the Pacific Ocean off the coast of California (source: page-31.pdf).
280+
- **Ship Tracks**: These are narrow clouds formed by water vapor condensing around tiny
281+
particles from ship exhaust. They are observed over the oceans, such as in the Pacific Ocean
282+
off the coast of California (source: page-31.pdf).
272283

273-
These specific formations are influenced by unique interactions between atmospheric conditions and the presence of large water bodies or objects within them.
284+
These specific formations are influenced by unique interactions between atmospheric conditions
285+
and the presence of large water bodies or objects within them.
274286
```
275287

276288
Adding semantic ranking and scoring profiles positively affects the response from the LLM by promoting results that meet scoring criteria and are semantically relevant.

articles/search/tutorial-rag-build-solution-pipeline.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,20 +346,26 @@ Chunk:
346346
Swirling Bloom off Patagonia
347347
Argentina
348348

349-
Interesting art often springs out of the convergence of different ideas and influences. And so it is with nature.
349+
Interesting art often springs out of the convergence of different ideas and influences.
350+
And so it is with nature.
350351

351-
Off the coast of Argentina, two strong ocean currents converge and often stir up a colorful brew, as shown in this Aqua image from
352+
Off the coast of Argentina, two strong ocean currents converge and often stir up a colorful
353+
brew, as shown in this Aqua image from
352354

353355
December 2010.
354356

355-
This milky green and blue bloom formed on the continental shelf off of Patagonia, where warmer, saltier waters from the subtropics
357+
This milky green and blue bloom formed on the continental shelf off of Patagonia, where warmer,
358+
saltier waters from the subtropics
356359

357-
meet colder, fresher waters flowing from the south. Where these currents collide, turbulent eddies and swirls form, pulling nutrients
360+
meet colder, fresher waters flowing from the south. Where these currents collide, turbulent
361+
eddies and swirls form, pulling nutrients
358362

359-
up from the deep ocean. The nearby Rio de la Plata also deposits nitrogen- and iron-laden sediment into the sea. Add in some
363+
up from the deep ocean. The nearby Rio de la Plata also deposits nitrogen- and iron-laden
364+
sediment into the sea. Add in some
360365
...
361366

362-
while others terminate in water. The San Rafael and San Quintín glaciers (shown at the right) are the icefield’s largest. Both have
367+
while others terminate in water. The San Rafael and San Quintín glaciers (shown at the right)
368+
are the icefield’s largest. Both have
363369

364370
been receding rapidly in the past 30 years.
365371
```

articles/search/tutorial-rag-build-solution-query.md

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,13 @@ In this response, the answer is based on five inputs (`top=5`) consisting of chu
130130
Results from the first query `"What's the NASA earth book about?"` should look similar to the following example.
131131

132132
```
133-
The NASA Earth book is about the intricate and captivating science of our planet, studied through NASA's unique perspective and tools. It presents Earth as a dynamic and complex system, observed through various cycles and processes such as the water cycle and ocean circulation. The book combines stunning satellite images with detailed scientific insights, portraying Earth’s beauty and the continuous interaction of land, wind, water, ice, and air seen from above. It aims to inspire and demonstrate that the truth of our planet is as compelling as any fiction.
133+
The NASA Earth book is about the intricate and captivating science of our planet, studied
134+
through NASA's unique perspective and tools. It presents Earth as a dynamic and complex
135+
system, observed through various cycles and processes such as the water cycle and ocean
136+
circulation. The book combines stunning satellite images with detailed scientific insights,
137+
portraying Earth’s beauty and the continuous interaction of land, wind, water, ice, and
138+
air seen from above. It aims to inspire and demonstrate that the truth of our planet is
139+
as compelling as any fiction.
134140
135141
Source: page-8.pdf
136142
```
@@ -173,13 +179,19 @@ search_results = search_client.search(
173179
Results from the filtered query should now look similar to the following response. Notice the emphasis on ice cover.
174180

175181
```
176-
The NASA Earth book showcases various geographic and environmental features of Earth through satellite imagery, highlighting remarkable landscapes and natural phenomena.
177-
178-
- It features extraordinary views like the Holuhraun Lava Field in Iceland, captured by Landsat 8 during an eruption in 2014, with false-color images illustrating different elements such as ice, steam, sulfur dioxide, and fresh lava ([source](page-43.pdf)).
179-
- Other examples include the North Patagonian Icefield in South America, depicted through clear satellite images showing glaciers and their changes over time ([source](page-147.pdf)).
180-
- It documents melt ponds in the Arctic, exploring their effects on ice melting and heat absorption ([source](page-153.pdf)).
182+
The NASA Earth book showcases various geographic and environmental features of Earth through
183+
satellite imagery, highlighting remarkable landscapes and natural phenomena.
184+
185+
- It features extraordinary views like the Holuhraun Lava Field in Iceland, captured by
186+
Landsat 8 during an eruption in 2014, with false-color images illustrating different elements
187+
such as ice, steam, sulfur dioxide, and fresh lava ([source](page-43.pdf)).
188+
- Other examples include the North Patagonian Icefield in South America, depicted through
189+
clear satellite images showing glaciers and their changes over time ([source](page-147.pdf)).
190+
- It documents melt ponds in the Arctic, exploring their effects on ice melting and
191+
- heat absorption ([source](page-153.pdf)).
181192

182-
Overall, the book uses satellite imagery to give insights into Earth's dynamic systems and natural changes.
193+
Overall, the book uses satellite imagery to give insights into Earth's dynamic systems
194+
and natural changes.
183195
```
184196

185197
## Change the inputs
@@ -189,14 +201,20 @@ Increasing or decreasing the number of inputs to the LLM can have a large effect
189201
Here's one example of what the model returns after increasing the inputs to 8.
190202

191203
```
192-
The NASA Earth book features a range of satellite images capturing various natural phenomena across the globe. These include:
193-
194-
- The Holuhraun Lava Field in Iceland documented by Landsat 8 during a 2014 volcanic eruption (Source: page-43.pdf).
195-
- The North Patagonian Icefield in South America, highlighting glacial landscapes captured in a rare cloud-free view in 2017 (Source: page-147.pdf).
196-
- The impact of melt ponds on ice sheets and sea ice in the Arctic, with images from an airborne research campaign in Alaska during July 2014 (Source: page-153.pdf).
197-
- Sea ice formations at Shikotan, Japan, and other notable geographic features in various locations recorded by different Landsat missions (Source: page-168.pdf).
198-
199-
Summary: The book showcases satellite images of diverse Earth phenomena, such as volcanic eruptions, icefields, and sea ice, to provide insights into natural processes and landscapes.
204+
The NASA Earth book features a range of satellite images capturing various natural phenomena
205+
across the globe. These include:
206+
207+
- The Holuhraun Lava Field in Iceland documented by Landsat 8 during a 2014 volcanic
208+
eruption (Source: page-43.pdf).
209+
- The North Patagonian Icefield in South America, highlighting glacial landscapes
210+
captured in a rare cloud-free view in 2017 (Source: page-147.pdf).
211+
- The impact of melt ponds on ice sheets and sea ice in the Arctic, with images from
212+
an airborne research campaign in Alaska during July 2014 (Source: page-153.pdf).
213+
- Sea ice formations at Shikotan, Japan, and other notable geographic features in various
214+
locations recorded by different Landsat missions (Source: page-168.pdf).
215+
216+
Summary: The book showcases satellite images of diverse Earth phenomena, such as volcanic
217+
eruptions, icefields, and sea ice, to provide insights into natural processes and landscapes.
200218
```
201219

202220
Because the model is bound to the grounding data, the answer becomes more expansive as you increase size of the input. You can use relevance tuning to potentially generate more focused answers.
@@ -224,7 +242,8 @@ Sources:\n{sources}
224242
Output from changing just the prompt, otherwise retaining all aspects of the previous query, might look like this example.
225243

226244
```
227-
The NASA Earth book appears to showcase various locations on Earth captured through satellite imagery, highlighting natural phenomena and geographic features. For instance, the book includes:
245+
The NASA Earth book appears to showcase various locations on Earth captured through satellite imagery,
246+
highlighting natural phenomena and geographic features. For instance, the book includes:
228247

229248
- The Holuhraun Lava Field in Iceland, detailing volcanic activity and its observation via Landsat 8.
230249
- The North Patagonian Icefield in South America, covering its glaciers and changes over time as seen by Landsat 8.

0 commit comments

Comments
 (0)