perplexity-known-pitfalls

Featured

Identify and avoid Perplexity anti-patterns and common integration mistakes. Use when reviewing Perplexity code, onboarding new developers, or auditing existing integrations for best practices violations. Trigger with phrases like "perplexity mistakes", "perplexity anti-patterns", "perplexity pitfalls", "perplexity code review", "perplexity gotchas".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Perplexity Known Pitfalls ## Overview Real gotchas when integrating Perplexity Sonar API. Perplexity uses an OpenAI-compatible chat endpoint but performs live web searches -- a fundamentally different paradigm from standard LLM completions. These pitfalls come from treating it like a regular chatbot. ## Prerequisites - Perplexity API key configured - Understanding of OpenAI-compatible chat API format ## Pitfalls ### 1. Using It as a Generic Chatbot Perplexity searches the web per request. Using it for tasks that don't need web search wastes money. ```python # BAD: general chatbot (wastes a search query) response = call_perplexity("Write me a haiku about cats") # Costs $0.005+ for something any LLM can do offline # GOOD: leverage web search capability response = call_perplexity( "What are the latest Next.js 15 features released this month?", search_recency_filter="month" ) ``` ### 2. Ignoring Citations Perplexity returns `[1]`, `[2]` markers in text with a separate `citations` array. Ignoring them loses the key value prop. ```python data = response.model_dump() # or response.json() for raw HTTP answer = data["choices"][0]["message"]["content"] citations = data.get("citations", []) # NOT in choices — top-level field # BAD: displaying raw markers print(answer) # "According to [1], Node.js 22 adds..." # GOOD: replace markers with links import re for i, url in enumerate(citations, 1): answer = answer.replace(f"[{i}]", f"[{i}]({url})") ``` ### 3. Using W...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

perplexity-sdk-patterns

Apply production-ready Perplexity Sonar API patterns for TypeScript and Python. Use when implementing Perplexity integrations, refactoring SDK usage, or establishing team coding standards for search-augmented generation. Trigger with phrases like "perplexity SDK patterns", "perplexity best practices", "perplexity code patterns", "idiomatic perplexity", "perplexity wrapper".

2,266 Updated today
jeremylongshore
AI & Automation Featured

perplexity-reliability-patterns

Implement reliability patterns for Perplexity Sonar API: circuit breaker, model fallback, streaming timeout, and citation validation. Trigger with phrases like "perplexity reliability", "perplexity circuit breaker", "perplexity fallback", "perplexity resilience", "perplexity timeout".

2,266 Updated today
jeremylongshore
AI & Automation Featured

perplexity-common-errors

Diagnose and fix Perplexity Sonar API errors and exceptions. Use when encountering Perplexity errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "perplexity error", "fix perplexity", "perplexity not working", "debug perplexity", "perplexity 429".

2,266 Updated today
jeremylongshore
AI & Automation Featured

perplexity-hello-world

Create a minimal working Perplexity Sonar search example with citations. Use when starting a new Perplexity integration, testing your setup, or learning basic search-with-citations patterns. Trigger with phrases like "perplexity hello world", "perplexity example", "perplexity quick start", "simple perplexity search".

2,266 Updated today
jeremylongshore
AI & Automation Featured

perplexity-advanced-troubleshooting

Apply advanced debugging techniques for hard-to-diagnose Perplexity Sonar API issues. Use when standard troubleshooting fails, investigating inconsistent citations, or preparing evidence for support escalation. Trigger with phrases like "perplexity hard bug", "perplexity mystery error", "perplexity inconsistent results", "difficult perplexity issue", "perplexity deep debug".

2,266 Updated today
jeremylongshore