Overview
The Interactive Q&A feature lets you have natural conversations with your research notebook. Powered by vector search and the Decipher AI agent, you can ask specific questions and get accurate answers with source citations.Q&A uses Qdrant vector database with OpenAI embeddings for semantic search, ensuring relevant context is retrieved even when exact keywords don’t match.
How It Works
Content Indexing
When your notebook is processed, all content is automatically chunked and embedded.Indexing Process:
- Content split into 512-token chunks with 50-token overlap
- Each chunk embedded using OpenAI
text-embedding-3-small - Embeddings stored in Qdrant vector database
- Metadata preserved (URLs, page titles, source types)
backend/services/qdrant_service.py:114-206Query Processing
When you ask a question, the system intelligently rewrites it for better search results.Context-Aware Rewriting:
- Analyzes last 10 messages for conversation context
- Rewrites question to include relevant context
- Focuses on key concepts and terminology
- Optimizes for vector similarity matching
backend/agents/chat_agent.py:88-105Vector Search
Your question is embedded and matched against stored content chunks.Search Process:
- Question embedded using same model (text-embedding-3-small)
- Cosine similarity search in Qdrant
- Top 5 most relevant chunks retrieved
- Filtered by notebook ID for isolation
backend/services/qdrant_service.py:208-267Answer Generation
The Decipher agent generates a contextual answer using retrieved chunks.Agent Capabilities:
- Analyzes question in context of conversation history
- Synthesizes information from relevant sources
- Provides markdown-formatted answers
- Includes source citations automatically
backend/agents/chat_agent.py:27-77Using the Chat Interface
- Starting a Conversation
- Asking Effective Questions
- Conversation Context
- Navigate to your processed notebook
- Click the Decipher with Chat tab
- Type your question in the input field
- Press Enter or click Send
The chat interface automatically focuses the input field when you open the tab for quick access.
client/components/notebook/notebook-polling.tsx:76-176Chat Interface Features
Message Display
User Messages
- Right-aligned with primary color background
- Plain text display
- Clear visual distinction
Decipher Responses
- Left-aligned with muted background
- Rich markdown rendering
- Source citations formatted as links
- Code syntax highlighting
Markdown Support
Decipher’s responses support full markdown:client/components/notebook/notebook-polling.tsx:58-69
Auto-Scroll Behavior
The chat automatically scrolls to show new messages:client/components/notebook/notebook-polling.tsx:99-107
Technical Implementation
Vector Database Architecture
Qdrant Configuration:backend/services/qdrant_service.py:10-52
Text Chunking Strategy
- Chunk size: 512 tokens
- Chunk overlap: 50 tokens
- Ensures context continuity across chunks
backend/services/qdrant_service.py:114-142
Semantic Search Implementation
backend/services/qdrant_service.py:208-267
Decipher Agent Configuration
backend/agents/chat_agent.py:27-70
Context-Aware Query Rewriting
backend/agents/chat_agent.py:88-107
Answer Quality Features
Source-Grounded
Answers are strictly based on your research sources, with citations provided for verification.
Context-Aware
Maintains conversation history to understand follow-up questions and references.
Semantic Understanding
Finds relevant information even when exact keywords don’t match, using vector similarity.
Formatted Responses
Rich markdown formatting makes answers easy to read and understand.
Source Citations
Every answer includes a Sources section:- URL sources:
[Page Title](url) - Text sources: “Provided Text”
- File sources: File name reference
Use Cases
Clarifying Research Findings
Clarifying Research Findings
Ask specific questions to understand complex topics:
- “What methodology was used in the study?”
- “What were the limitations mentioned?”
- “How was the data collected?”
Extracting Specific Information
Extracting Specific Information
Find precise details without reading entire sources:
- “What statistics support this claim?”
- “When was this research published?”
- “Who are the key researchers in this field?”
Comparing Perspectives
Comparing Perspectives
Understand different viewpoints in your sources:
- “What are the different opinions on this topic?”
- “How do these two sources differ?”
- “What’s the consensus on this issue?”
Following Up on Summaries
Following Up on Summaries
Dig deeper into summary content:
- “Tell me more about [topic from summary]”
- “What evidence supports this conclusion?”
- “Can you elaborate on [specific point]?”
Performance Optimizations
Memoized Components
Chat messages are memoized to prevent unnecessary re-renders during conversations.
Indexed Search
Qdrant payload index on notebook_id ensures fast filtering during search queries.
Connection Pooling
Async clients reuse connections for optimal performance across multiple queries.
Efficient Chunking
Smart overlap strategy maintains context while minimizing storage and search overhead.
Limitations
Best Practices
Related Features
AI Summaries
Comprehensive research summaries
FAQ Generation
Pre-generated common questions
Audio Overviews
Listen to research summaries