Skip to content

Commit 43e381c

Browse files
committed
Fixed python vector quickstart semantic hybrid example H2 and intro
1 parent a8bbcca commit 43e381c

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

articles/search/includes/quickstarts/search-get-started-vector-python.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ In the next sections, we run queries against the `hotels-vector-quickstart` inde
343343
- [Single vector search](#single-vector-search)
344344
- [Single vector search with filter](#single-vector-search-with-filter)
345345
- [Hybrid search](#hybrid-search)
346-
- [Semantic hybrid search with filter](#semantic-hybrid-search-with-a-filter)
346+
- [Semantic hybrid search](#semantic-hybrid-search)
347347

348348
### Create the vector query string
349349

@@ -674,9 +674,9 @@ Hybrid search consists of keyword queries and vector queries in a single search
674674
]
675675
```
676676

677-
### Semantic hybrid search with a filter
677+
### Semantic hybrid search
678678

679-
Here's the last query in the collection. This hybrid query with semantic ranking is filtered to show only the hotels within a 500-kilometer radius of Washington D.C. You can set `vectorFilterMode` to null, which is equivalent to the default (`preFilter` for newer indexes and `postFilter` for older ones).
679+
Here's the last query in the collection. This hybrid query specifies the semantic query type and a semantic configuration, demonstrating that you can build a hybrid query that uses semantic reranking.
680680

681681
- Find the cell below section titled "Semantic hybrid search" and execute the cell. This code block contains the request to query the search index.
682682

@@ -721,9 +721,9 @@ Here's the last query in the collection. This hybrid query with semantic ranking
721721
print("No vector loaded, skipping search.")
722722
```
723723

724-
Review the output below the cell. The response is three hotels, which are filtered by location and faceted by `StateProvince` and semantically reranked to promote results that are closest to the search string query (`historic hotel walk to restaurants and shopping`).
724+
Review the output below the cell.
725725

726-
The Swirling Currents Hotel now moves into the top spot. Without semantic ranking, Nordick's Valley Motel is number one. With semantic ranking, the machine comprehension models recognize that `historic` applies to "hotel, within walking distance to dining (restaurants) and shopping."
726+
With semantic ranking, the Swirling Currents Hotel now moves into the top spot. W
727727

728728
```output
729729
Total semantic hybrid results: 7
@@ -759,13 +759,15 @@ Here's the last query in the collection. This hybrid query with semantic ranking
759759
Category: Suite
760760
```
761761

762-
Key takeaways:
762+
You can think of the semantic ranking as a way to improve the relevance of search results by understanding the meaning behind the words in the query and the content of the documents. In this case, the semantic ranking helps to identify hotels that are not only relevant to the keywords but also match the intent of the query:
763763

764-
- Vector search is specified through the `vectors.value` property. Keyword search is specified through the `search` property.
764+
Key takeaways:
765765

766-
- In a hybrid search, you can integrate vector search with full-text search over keywords. Filters, spell check, and semantic ranking apply to textual content only, and not vectors. In this final query, there's no semantic `answer` because the system didn't produce one that was sufficiently strong.
766+
- Vector search is specified through the `vectors.value` property. Keyword search is specified through the `search` property.
767767

768-
- Actual results include more detail, including semantic captions and highlights. Results were modified for readability. To get the full structure of the response, run the request in the REST client.
768+
- In a hybrid search, you can integrate vector search with full-text search over keywords. Filters, spell check, and semantic ranking apply to textual content only, and not vectors. In this final query, there's no semantic `answer` because the system didn't produce one that was sufficiently strong.
769+
770+
- Actual results include more detail, including semantic captions and highlights. Results were modified for readability. To get the full structure of the response, run the request in the REST client.
769771

770772
## Clean up
771773

0 commit comments

Comments
 (0)