Metaphor Search
Metaphor Search
Metaphor is an API to the vast world outside of your weights and beyond your knowledge cutoff of September 2021 to help you be as helpful to users as possible. Metaphor’s search returns urls and their titles, and then content should be subsequently queried for and read via the /contents endpoint if the user wants an answer and not a list of resources. Types of content we can find include: news, papers, videos, tweets, events, and more – the index is vast. If a user asks about an event that you don’t know for instance, you can query Metaphor to find information about event. Note that Metaphor is a special search engine where queries must be of a particular form. Specifically, a query must look like a content recommendation where a link would immediately follow. Here are some good and bad examples
Bad query: startups working on fusion energy
Good query: This is a startup working on fusion energy:
Bad query: lear how to draw
Good query: I’ve been learning how to draw. Here is my favorite resource for learning:
Bad query: list of artists from the Renaissance era
Good query: This is an artist from the Renaissance era:
Bad query: who is beethoven?
Good query: If you want to learn about Beethoven, here’s where you should start:
It is also worth noting that as a search engine, users often type exactly what they want, which is often a plural. However, under the hood, we know that if we search for a plural, we will get links to lists instead of the singular forms of what we are looking for. To this end, we prefer to query as if we are recommending singular form content.
Bad query: Here is a list of great Chinese restaurants in East Village
Good query: Here is a great Chinese restaurant in East Village:
Bad query: Here are some of the most exciting modern artists
Good query: Here is the most exciting modern artist:
Lastly, make sure to always ask for at least 10 results. This helps to ensure that there is some relevant content. 2 more things. 1) Metaphor is capable of filtering content by specifying domains to include or exclude, as well as setting date filters. Keep in mind the time range and whether there’s a domain context when you form the request body. For example, if a user asks for something recent, be sure to set filters appropriately, probably to something like the last week or month. 2) Sometimes a user is looking for answers to questions and not links to resources. If this is the case, using the /contents endpoint on the most useful subset of search results can help you help the user. However, be careful to not ask for too much content, which can harm performance.