Automatic Content Intelligence
When you add content, Supermemory:- Detects the content type — PDF, code, markdown, images, video, etc.
- Extracts content optimally — Uses type-specific extraction (OCR for images, transcription for audio)
- Chunks intelligently — Applies the right chunking strategy for the content type
- Generates embeddings — Creates vector representations for semantic search
- Builds relationships — Connects new knowledge to existing memories
Ingesting as pure SuperRAG (taskType: "superrag")
By default, every client.add() call runs on the memory path (taskType: "memory"): Supermemory chunks and embeds the content for retrieval, and runs it through the memory pipeline — extracting facts, updating the profile, and linking it into the knowledge graph.
If you’re ingesting content that’s purely reference material — documentation, a large PDF, a knowledge base article — and you don’t need Supermemory to derive personal facts or update a profile from it, set taskType: "superrag". It skips the memory pipeline entirely and only does the chunk → embed → index work needed to make the content searchable.
When you’re searching over a mix of both,
searchMode: "hybrid" (below) is what pulls memory-path facts and superrag-path document chunks into one result set. More ingestion guidance: Rules of supermemory → Ingest with SuperRag when you just need search.
Smart Chunking by Content Type
Different content types need different chunking strategies. Supermemory applies the optimal approach automatically:Documents (PDF, DOCX)
PDFs and documents are chunked by semantic sections — headers, paragraphs, and logical boundaries. This preserves context better than arbitrary character splits.Code
Code is chunked using code-chunk, our open-source library that understands AST (Abstract Syntax Tree) boundaries:- Functions and methods stay intact
- Classes are chunked by method
- Import statements grouped separately
- Comments attached to their code blocks
Web Pages
URLs are fetched, cleaned of navigation/ads, and chunked by article structure — headings, paragraphs, lists.Markdown
Chunked by heading hierarchy, preserving the document structure. See Content Types for the full list of supported formats.Hybrid Memory + RAG
Supermemory combines the best of both approaches in every search:Traditional RAG
- Finds similar document chunks
- Great for knowledge retrieval
- Stateless — same results for everyone
Memory System
- Extracts and tracks user facts
- Understands temporal context
- Personalizes results per user
searchMode: "hybrid" (the default), you get both:
Search Optimization
Two flags give you fine-grained control over result quality:Reranking
Re-scores results using a cross-encoder model for better relevance:Query Rewriting
Expands your query to capture more relevant results:Why It’s “Super”
You focus on building your product. Supermemory handles the RAG complexity.
Next Steps
Content Types
All supported formats and how they’re processed
How It Works
The full processing pipeline
Memory vs RAG
When to use each approach
Search
Search parameters and optimization
Billing
Exact meter rates for memory vs SuperRAG tokens
Adding Memories
taskType and other ingestion parameters