Skip to main content
Perplexica automatically saves every search you perform, creating a local history that you can revisit anytime. Your research is never lost, and you can continue previous conversations right where you left off.

How search history works

Every search you perform in Perplexica is automatically saved:
  • Each conversation gets a unique chat ID
  • Messages are stored locally on your Perplexica instance
  • Search sources and uploaded files are preserved
  • The conversation title is generated from your first query
  • All history remains completely private
Search history is stored locally in your Perplexica database. Nothing is sent to external servers or tracking services.

What’s saved

Each chat in your history includes: Chat metadata:
{
  id: string;              // Unique chat identifier
  title: string;           // Generated from first query
  createdAt: string;       // ISO timestamp
  sources: string[];       // Selected search sources
  files: FileReference[];  // Uploaded files used
}
Message history:
  • Your original queries
  • AI-generated responses
  • Citations and sources
  • Widget results
  • Timestamps for each message
Context preservation:
  • Selected search mode (speed/balanced/quality)
  • Source selection (web/academic/discussions)
  • Attached files and documents
  • System instructions if customized

Accessing your history

Your previous searches are available in the search history interface:
  1. Look for the history or sidebar button
  2. Browse your previous conversations by date
  3. Click any conversation to view the full exchange
  4. Continue the conversation by asking follow-up questions

Continuing conversations

When you open a previous chat, the full conversation context is restored:
  • The AI remembers the entire discussion
  • Previous sources and files remain available
  • You can ask follow-up questions naturally
  • New messages are added to the same chat
Example: If you previously asked “What is machine learning?” and got an answer, you can later ask “What are its applications in healthcare?” and the AI will understand you’re continuing the previous topic.
The AI uses your conversation history to provide contextual answers. This makes follow-up questions much more effective than starting a new chat.

Chat organization

Chats are organized chronologically:
  • Most recent conversations appear first
  • Each chat shows its title and creation date
  • You can see at a glance which sources were used
  • File attachments are indicated

How conversation context works

When processing follow-up messages, Perplexica uses your chat history:
history: ChatTurnMessage[] = [
  { role: 'user', content: 'previous question' },
  { role: 'assistant', content: 'previous answer' },
  // ... more messages
]
This history is passed to:
  • The classifier (to understand context)
  • The search agent (for better research)
  • Widgets (to extract information accurately)
  • The final answer generator (for coherent responses)
Classification with history: The AI analyzes your new question alongside the conversation history to:
  • Understand ambiguous references (“it”, “that”, “the previous one”)
  • Determine if you’re continuing a topic or starting a new one
  • Choose appropriate sources based on the discussion context
  • Generate a standalone version of your question for searching
The classifier creates a “standalone follow-up” that can be understood without the chat history. This is used for searching while maintaining conversation context.

Privacy and local storage

Your search history is completely private:
  • All chats are stored in your local database
  • No history is sent to external services
  • Only you can access your conversation history
  • Messages are stored on your Perplexica instance only
Database storage: Chats are stored in the local database using Drizzle ORM:
const chat = await db.query.chats.findFirst({
  where: eq(chats.id, chatId)
});
This ensures:
  • Fast access to previous conversations
  • Reliable persistence across sessions
  • Structured storage of chat metadata

File references in history

When you use uploaded files in a search, they’re associated with that chat:
files: [
  {
    fileId: string;
    name: string;
  }
]
This means:
  • Files remain accessible when you revisit the chat
  • You can ask new questions about the same files
  • File context is preserved for the conversation
Files are stored separately from chats but referenced by ID. This lets multiple chats use the same uploaded file efficiently.

Search modes in history

Each message in a chat can use a different search mode:
  • Start with Speed mode for quick questions
  • Switch to Quality mode for deeper analysis
  • Use Balanced mode for follow-ups
The mode is stored per message, not per chat, giving you flexibility.

Benefits of search history

Never lose research:
  • All your searches are automatically saved
  • Revisit important findings anytime
  • Build on previous research sessions
Contextual conversations:
  • Ask follow-up questions naturally
  • AI understands references to previous messages
  • Maintain topic continuity across sessions
Reference and review:
  • Look back at sources you found useful
  • Share conversation links with others
  • Track your research journey on a topic
Efficiency:
  • Don’t repeat searches
  • Continue where you left off
  • Build knowledge incrementally

History management

While Perplexica automatically manages your history, you control your data:
  • All history is stored locally
  • You can clear your browser data to remove local references
  • Chat data persists in your Perplexica instance
  • No external synchronization or cloud storage
Since history is local to your Perplexica instance, it’s accessible from any browser or device that connects to your instance.

Multi-turn conversations

Perplexica excels at multi-turn conversations thanks to history:
  1. First message: “Explain quantum computing”
    • AI provides a comprehensive explanation
  2. Follow-up: “What are its practical applications?”
    • AI understands “its” refers to quantum computing
  3. Deeper dive: “How does it compare to classical computing for cryptography?”
    • AI knows the full context of the discussion
Each message builds on the previous ones, creating a natural research dialogue.

Technical implementation

The history system works through several components: Chat creation:
await db.insert(chats).values({
  id: chatId,
  createdAt: new Date().toISOString(),
  sources: selectedSources,
  title: query,
  files: fileReferences,
});
Message format:
history: Array<[string, string]> // [user message, assistant response]
Context formatting: History is formatted for the AI as a conversation:
<conversation_history>
User: first question
Assistant: first answer
User: follow-up question
Assistant: follow-up answer
</conversation_history>

Upcoming features

  • Search within your history
  • Export conversations
  • Organize chats with tags or folders
  • Share conversations with others

Build docs developers (and LLMs) love