๐ search
.search()
enables you to uncover the most pertinent context by performing a semantic search across your data sources based on a given query. Refer to the function signature below:
Parameters
Question
Number of relevant documents to fetch. Defaults to 3
Key value pair for metadata filtering.
Pass raw filter query based on your vector database.
Currently, raw_filter
param is only supported for Pinecone vector database.
Returns
Return list of dictionaries that contain the relevant chunk and their source information.
Usage
Basic
Refer to the following example on how to use the search api:
Advanced
Metadata filtering using where
params
Here is an advanced example of search()
API with metadata filtering on pinecone database:
Metadata filtering using raw_filter
params
Following is an example of metadata filtering by passing the raw filter query that pinecone vector database follows: