Perplexity PhD-level tutorial
Deep technical Perplexity tutorial: how it works, automation, evaluation, agents and failure modes, with official docs.
PhD-level · step 1 of 7
How it works under the hood
General background (not a vendor claim): chat assistants are large language models that read text as tokens and predict the next token, sampling from a probability distribution. Everything they 'remember' in a chat lives in a finite context window. Tools such as web search, file reading or code execution add facts the model didn't have; without them, it answers from training data, which can be out of date.
Why this step matters: Knowing it predicts text rather than looks facts up explains why it can be fluent and wrong at once.
PhD-level · step 2 of 7
API and automation: Agent API
curl https://api.perplexity.ai/v1/agent \
-H "Authorization: Bearer $PERPLEXITY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"effort":"low","input":"[question]"}'- The Agent API follows the OpenAI Responses API format; its canonical endpoint is POST /v1/agent and POST /v1/responses is accepted as an alias.
- You can pick an effort level and get a researched answer in one call, or control model, reasoning, token budgets and tools yourself.
- It offers access to models from OpenAI, Anthropic, Google, xAI and Perplexity's own model through one API.
- For the Chat Completions format, Perplexity points to its Orchestrator API.
Official docs: Perplexity API docs: overview, docs.perplexity.ai
Why this step matters: Automation repeats mistakes at scale, so you need to know exactly what is run and what is checked.
PhD-level · step 3 of 7
Evaluation methodology
Anthropic's prompt-engineering guide puts it plainly: define success criteria and a way to test against them before tuning prompts. That applies to every bot.
- Write a rubric: correctness, sourcing, format, refusal behaviour.
- Build a golden set of 20–50 inputs with reference answers.
- Score blind, ideally with two reviewers; compare pairs (A vs B) rather than absolute scores.
- Run each item 3 times; answers are non-deterministic.
- Track regressions after any model or prompt change.
Why this step matters: Without a fixed test set, 'better' just means 'felt better'. Scores let you compare prompts and models fairly.
PhD-level · step 4 of 7
Advanced prompting and agents
- Prompt chaining: one job per call, checked between calls.
- Few-shot examples: show 2–3 input/output pairs in the format you want.
- Tool use: let the model call tools for facts and actions; keep tools narrow and require approval for anything that sends, buys or deletes.
- Protocols like the Model Context Protocol (modelcontextprotocol.io) standardise how assistants connect to tools and data.
Why this step matters: The same model gives much better answers to a specific prompt. This is the cheapest improvement you can make.
PhD-level · step 5 of 7
Failure modes in depth
- Citation drift: the cited page doesn't actually say what the sentence claims.
- Stale sources: an old page ranks well and gets cited as current.
- SEO-spam sources outranking official pages.
- Merged entities: two products or people with similar names blended into one answer.
- Prompt injection: instructions hidden in a web page or file can steer the model. Treat fetched content as data, not commands.
- Sycophancy: it may agree with a wrong premise. Ask it to argue the other side.
Why this step matters: Knowing how it typically fails tells you where to look when you review its work.
PhD-level · step 6 of 7
Reliability engineering
- Validate structured output against a schema; retry on failure.
- Log inputs, outputs, model and settings so you can reproduce results.
- Make tool actions idempotent and reversible where possible.
- Put a human approval step in front of anything external.
Why this step matters: Retries, fallbacks and logged runs turn an occasionally-right tool into one you can depend on.
PhD-level · step 7 of 7
Reading list (official)
- docs.perplexity.ai: Agent API format, endpoints, effort levels, multi-provider access
- Perplexity on the App Store: features and in-app purchases
- perplexity.ai help and plan pages blocked our checker (403) on Oct 29, 2026
Perplexity API docs: overview, docs.perplexity.ai
Why this step matters: Official docs change; going to the source beats any summary, including this one.
Quick quiz
PhD-level checklist
Saved only in your browser.
Where these facts come from
- Perplexity on the App Store: features and in-app purchases
Checked Oct 29, 2026. Plans change, so confirm on the official page before you pay.
Next: Perplexity lessons →