Similarity Search Demystified
Finding Relevant Needles in the Data Haystack!
Introduction
The Bigdata.com API provides powerful retrieval capabilities, enabling you to search and analyze news articles, transcripts, corporate filings, and other documents. Notably, it supports both keyword-based searches and similarity searches, along with a range of other advanced search features.
In this notebook, weβll demonstrate how to use the Bigdata.com API to perform a similarity search effectively.
Helper Functions
We define a helper function to show the search results in a nicely formatted HTML:
Define Search Query and Parameters
We define our search parameters, including the query, time period, and the number of documents to retrieve. In this example, we are searching for articles related to the Federal Reserveβs actions on inflation and concerns about tariffs.
Execute Search
We now run the search using the specified parameters.
One of the key features of the Bigdata API is the ability to rerank the search results based on relevance scores. This is a cross-encoder reranking that can help you find the most relevant documents quickly. You can read more about the reranking feature here.
We activate this feature by setting the rerank_threshold
:
Display Results
Now that we have the search results, we can display them in a readable format:
Conclusion
For more details and documentation on the Bigdata.com API, refer to the official documentation. There are many more filters that you can apply to narrow down your search results.
Happy Searching! π