← Build Log

Perplexity + Claude + SERP: The Three-Layer Research Stack I Use for Competitive Intelligence

Ryan Cunningham
Ryan Cunningham
AI Architect & Co-Founder

Perplexity + SERP API + Claude - Three Layer Research Stack Architecture

Most people pick one AI tool for research and ask it everything. That is the wrong approach. Different tools have different strengths, and when you chain them in the right order you get something none of them can produce alone.

Here is the three-layer research stack I built into the RPG Intel Dashboard for competitive intelligence.

Layer 1: Perplexity - Live Web Intelligence

Perplexity goes first because it has something the other tools do not: live web access with source citations.

When I need to understand what is happening in a market right now - what competitors are saying, what content is ranking, what the current conversation looks like - Perplexity pulls it from the live web and tells me where it came from. That is the foundation. You cannot score what you cannot see.

The key is the prompt structure. I am not asking Perplexity open-ended questions. I am giving it a specific keyword or topic and asking for a structured sweep: what is ranking, what is the content angle, what questions are being answered, what is missing. The output is a raw intelligence brief, not a finished answer.

One thing that bit us early: we were using a deprecated model (llama-3.1-sonar-small-128k-online) that was silently returning 400 errors. The API was not complaining loudly, it was just returning nothing. Switched to sonar and the sweeps started working. Always check your model names against the current API docs.

Layer 2: SERP API - Keyword and Ranking Data

Perplexity tells me what the content looks like. SERP API tells me the numbers behind it.

Position, search volume, click-through rate, featured snippet ownership, related queries. This is the data layer that turns qualitative intelligence into something you can prioritize. A topic that looks important in a Perplexity sweep might be a 50-search-per-month keyword. A topic that looks minor might be sitting at 5,000 monthly searches with weak competition.

The SERP layer runs against the keywords surfaced in the Perplexity sweep. It is not a separate research pass - it is the validation and prioritization pass. What is worth building content around? What is already dominated by strong players? Where is the gap?

Layer 3: Claude - Scoring and Synthesis

This is where the raw intelligence becomes a decision.

Claude takes the Perplexity brief and the SERP data and produces a scored output: relevance to ICP, competition level, content opportunity, recommended angle. It is not summarizing - it is evaluating. The prompt is structured around specific scoring criteria tied to the RPG ICP (small business owners who need practical business education, not AI tool adopters).

The output is a competitive intelligence brief that tells me exactly what to build, why, and in what order.

Why the Order Matters

You cannot reverse this stack. If you start with Claude and ask it to research a topic, you get a confident answer based on training data that may be months out of date. If you start with SERP data alone, you have numbers without context. Perplexity first gives you the live picture. SERP second gives you the weight. Claude third gives you the judgment.

Each layer feeds the next. The brief that comes out the bottom is something none of the three tools could produce independently.

The Auto-Populate Problem We Solved

When we first wired this into the Intel Dashboard, the deep sweep results were not showing up in the Synthesis tab. The background job was completing but the UI had no way to know it was done.

The fix was a polling loop in the frontend - every 4 seconds, check if the sweep result is back. When it lands, auto-populate the Synthesis tab and kill the polling. We also added an orange pulsing status indicator while Perplexity is running so you know the sweep is in progress. Small UX detail, big difference in usability.

The sweep results now auto-save to three tables: intel_sweeps, seo_snapshots, and neo_suggestions. Every sweep becomes a data point in the recursive learning loop.

What This Looks Like in Practice

A typical deep sweep takes about 90 seconds end to end. Perplexity runs first (30-45 seconds for a thorough sweep), SERP data pulls in parallel where possible, Claude scores on the way out. The brief lands in the Synthesis tab with a history dropdown showing all past sweeps for that keyword.

Over time, the history dropdown becomes a trend line. You can see how a keyword’s competitive landscape is shifting, what content angles have emerged, and whether your own content is moving the needle.

That is the point of the three-layer stack. Not just intelligence for today. Intelligence that compounds.