In the era of generative AI, people are increasingly turning to ChatGPT, Claude, Perplexity, etc., to search for information.
Users write prompts to search and gather information in a specific format and are constantly on the lookout for new prompt ideas to help them search more efficiently and creatively.
The search process involves using special keywords or commands to improve the quality of the results. For instance, including contextual keywords like “in the context of” and “considering factors such as” in the prompt can help narrow down the search domain and area of interest.
Using keywords or phrases to refine searches is not a new concept. Similar techniques have been used in “traditional” search engines like Google long before generative AI.
Search operators are commands to filter or expand search results. Google offers several such operators. For example, “filetype:pdf
” allows you to refine your search to online PDF documents — a great way to discover scholarly journal articles for your project.
Perplexity also supports the search operators. Adding them to your prompt can enhance your search experience and productivity.
Search Operators in Perplexity
I rank the operators according to their practical utility.
filetype:
Look for a specific type of file. For example,filetype:pdf Midjourney
will retrieve PDF files about Midjourney. This operator is handy when looking for scholarly journals and technical papers for a research assignment.before:
andafter:
To limit the search to a specified period. For example,Midjourney after:2024–01–01
.-site:
This excludes search results from a particular website. For example:-site:https://openai.com
removes the results from the OpenAI website. It is useful to avoid citing websites with questionable credibility.site:
Restrict the search to a particular website. For example,site:wsava.org vaccination
retrieve pages about vaccination from the WSAVA website. It is helpful to limit your search to a reputable website. But I would rather go to that website and search directly from its search bar; the results are often more detailed than when using the operator.inurl:
Search for pages with a given keyword in the URL. For example,inurl:review Midjourney
retrieves information from the product review of Midjourney. It is helpful in finding product reviews and specific types of websites. However, it assumes that the keyword appears in the URL, which may not be true.
Powerful combinations
Nobody says you can only use one operator at a time.
Why not use several of them in the prompt to supercharge your search?
Here are two examples.
(1) filetype:[x] after:[x] -site:[x] prompt
This combo is ideal for searching scientific material in PDF files across a specific period.
You can also search for Excel or PowerPoint files by replacing the x with the appropriate file extensions (e.g., filetype:xls, filetype:ppt).
The example above looked for a PDF document about feline heartworm after 2020. The sources for the eight papers can be viewed by selecting the “View 5 more” link at the top.
To eliminate bias, -site:com
excludes files from commercial sources, such as publications from pharmaceutical companies, i.e., marketing information.
The search operators + prompt combo can save you time by eliminating the need to search for and download PDFs manually. It may even help you uncover new articles you did not know existed!
Another use case is to look for a PowerPoint file to see what others prepared for a presentation.
(2) Search operator(s) + Prompt + Do not paraphrase
You can use the following phrases in the prompt to reduce hallucinations: “do not paraphrase” or “please quote the phrases mentioned in the sources without paraphrasing.”
Doing so will retrieve results that contain the exact phrases, allowing you to link them back to their original sources.
The above example looked for information on the treatment options for a cat disease.
You can select a phrase at random, navigate to the source page, and use Ctrl-F to locate the exact position of that phrase in the source material to ensure that the bot did not paraphrase.
To demonstrate this, I selected the term “helpful during acute events,” clicked on the source (number 2 as the superscript), and found that phrase on its source webpage.
Reusing your favorite prompt
Once you’ve perfected your prompt, remember to save it to the Collection so you can use it again in the future.
Once you’ve perfected your prompt, remember to save it to the Collection so you can use it again in the future.
Usually, we add a thread to the Collection to compile all relevant answers or information together.
Here, we keep our favorite prompts in the Collection because we are too lazy to retype them.
All you have to do is edit the query/prompt and replace the previous search term with a new topic of interest.
I use the Collection feature to keep track of the prompts I use frequently. It is a terrific way to save time and become more organized!
Otherwise, I’m pretty sure that I won’t remember where I put that favorite prompt that I created months ago.
Conclusion
Search operators are commands that filter or expand search results in generative AI, similar to other search engines.
Perplexity supports several search operators:
filetype:
,before:
/after:
,-site:
,site:
, andinurl:
.Combining multiple search operators in a prompt can supercharge your search, such as using “
filetype:[x] after:[x] -site:[x]
” to find scientific material in specific file types across a certain period while excluding certain sites.Adding phrases like “do not paraphrase” to the prompt, along with search operators, can help minimize hallucination by retrieving exact words from the sources, allowing for easier verification of the information.
I hope you enjoyed this post!
Please subscribe, like, share, and comment so that more people can discover Geeky Curiosity newsletter.
Geeky Curiosity is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.
Use this promo code: YQGPR1B9 to save $10 on a new Perplexity Pro subscription.
Awesome! I use Perplexity reasonably often, never knew you could do this. Thanks for sharing.