Return

Return

Return

Return

Published Nov 28, 2024

Perplexity as a Research Assistant

While working with early stage LLM startups over the past year, I’ve refined a workflow that integrates Perplexity API and Zapier to automate competitor research. As the field of AI is currently advancing at a rapid pace, keeping up with all the updates often felt burdensome. This system helped me offload the constant task of crawling the internet by generating weekly summaries of competitor updates and storing them in a dedicated Notion database.

The prompt is very simple - assuming that we’re interested in keeping on top of what news the leading LLM companies have posted recently:

What new features, news or articles related to the companies Perplexity, OpenAI and Anthropic have been released in the past week? Include URL links to each new content with additional information describing the content in bullet points

Step 1: Setting Up the Perplexity API

Start by obtaining a Perplexity API key. With its single endpoint, “Chat Completions”, you can send POST requests that include your prompt.


The prompt is included in the “content” field with the ability to choose which model to use. The request looks like this:

{
  "model": "llama-3.1-sonar-small-128k-online",
  "messages": [
    {
      "role": "system",
      "content": "Be precise and concise."
    },
    {
      "role": "user",
      "content": "What new features, news or articles related to the companies Perplexity, OpenAI and Anthropic have been released in the past  month? Include URL links to each new feature with more information about the new feature where possible. "
    }
  ],
  "max_tokens": "500",
  "temperature": 0.2,
  "top_p": 0.9,
  "search_domain_filter": [
    "perplexity.ai"
  ],
  "return_images": false,
  "return_related_questions": false,
  "search_recency_filter": "month",
  "top_k": 0,
  "stream": false,
  "presence_penalty": 0,
  "frequency_penalty": 1
}

Step 2: Automating with Zapier

Zapier handles the automation, running the following sequence weekly:

  1. A scheduled trigger activates the process

  2. Perplexity’s API processes the prompt

  3. Results are forwarded to Notion for easy reference


The free plan offers a set number of interactions but for something relatively straightforward like this, it’s enough to get started. The setup streamlines monitoring competitor updates, offering insights without manual overhead.


In the example I’m using just a basic query but Perplexity’s API allows refining queries using additional parameters like:

  • search_domain_filter: Focus results on specific domains, e.g., competitor blogs.

  • Return_citations: Include references for deeper validation.

Let's work together.

My expertise leans towards 0 to 1, product development in highly regulated environments, and leading cross-functional teams through end-to-end development.

Contact

Copy email

Copied

Let's work together.

My expertise leans towards 0 to 1, product development in highly regulated environments, and leading cross-functional teams through end-to-end development.

Contact

Copy email

Copied