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,940 stars 439 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
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category