P3_104 Queries 2 (Python)
This course was written for the Weaviate Python client API (v3
), and is now deprecated.
If you are new to Weaviate, we recommend you start with one of the 100-level courses written with the v4
client API, such as those for working with text data, your own vectors, or multimodal data.
Unit overview
In this unit, you will learn about even more types of queries that you can run with Weaviate.
We will start by looking how to use keyword searches with the BM25F ranking algorithm, as well as hybrid searches that combines keyword searches with vector searches.
Then, we will look at generative searches and question and answer (QnA) searches. These searches allow you to not only retrieve data objects, but to transform the results before returning them to you.
By the end of this unit, you will have a suite of query types to choose from, so that you can retrieve the right information in the form that you want.
Let's get started.
Prerequisites
- (Required) A Python (3) environment with
weaviate-client
installed. - (Required) Complete 101A Weaviate Academy Preparation
- (Recommended) Complete Hello, Weaviate
- (Recommended) Complete Queries 1
- (Recommended) Complete Schema and Imports
Learning objectives
What are these?
- Learning Goals describe the unit's key topics and ideas.
- Learning Outcomes on the other hand describe tangible skills that the learner should be able to demonstrate
Here, we will cover:
Learning Goals- How to formulate and perform keyword or BM25 searches.
- What Hybrid searches are, how they are ranked and how to use them.
- How Generative searches utilize language models to transform data before delivery.
- How you can extract the exact answers from data with the Question & Answer (QnA) module.
By the time you are finished, you will be able to:
Learning Outcomes- Perform BM25 and hybrid searches.
- Differentiate between vector, BM25 and hybrid searches.
- Transform data before delivery with generative searches.
- Extract answers from data with QnA searches.
Questions and feedback
If you have any questions or feedback, let us know in the user forum.