Turn Any PDF into a Searchable Knowledge Base in 5 Minutes
Create a searchable knowledge base from your PDFs and documents using the Denser Retriever skill for Claude Code. No coding required - just chat to upload, index, and search.
Published on
Building a RAG (Retrieval-Augmented Generation) system usually requires writing code, configuring vector databases, and setting up embedding pipelines. But what if you could do it all by chatting in your terminal?
With the Denser Retriever skill for Claude Code, you can create a searchable knowledge base from any collection of documents in under 5 minutes, without writing a single line of code.
What You'll Build
By the end of this tutorial, you'll have:
- A knowledge base containing your documents (PDFs, DOCX, PPTX, or any supported format)
- Semantic search over those documents via natural language queries
- All managed through conversational commands in Claude Code
Prerequisites
- Claude Code CLI installed
- A Denser Retriever account with an API key
Getting Started
Install the Skill
Open your terminal and install the Denser Retriever skill:
npx skills add denser-org/claude-skills@denser-retriever -g -yThen set your API key:
export DENSER_API_KEY="dr-your-api-key-here"You can get your API key from your organization settings.
Create a Knowledge Base
Start Claude Code and tell it what you want:
You: Create a knowledge base called "Company Docs"Claude executes the API call and returns the knowledge base ID. That's it.
Upload Your Documents
Point Claude at your files:
You: Upload all files from ~/documents/hr/ to my Company Docs knowledge baseClaude handles the entire multi-step upload process automatically:
- Gets a presigned upload URL from S3
- Uploads each file
- Triggers document processing (parsing, chunking, indexing)
- Polls until each document is ready
Supported file types: PDF, DOCX, PPTX, XLSX, HTML, CSV, TXT, XML, and Markdown (up to 512MB each).
Search Your Knowledge Base
Ask any question in natural language:
You: How many paid vacation days do I get in the first year?Claude searches your knowledge base and returns the most relevant passages with scores:
Found relevant passage (score: 3.73) from SampleEmployeeHandbook.pdf:
"During the remaining nine months of first year employment,
a full-time employee will earn two weeks (10 days) of paid Vacation."The search uses semantic matching, so you don't need to use the exact words from the document.
What Else You Can Do
Once your knowledge base is set up, you can:
- Search across multiple knowledge bases: "Search all my KBs for information about data privacy"
- Import text directly: "Add this text to my knowledge base: [paste content]"
- Manage documents: "List all documents in my Company Docs KB" or "Delete the outdated policy document"
- Check your account: "What's my credit balance?" or "How much storage am I using?"
How It Works Under the Hood
The Denser Retriever skill gives Claude Code the complete API reference for the Denser Retriever REST API. When you make a request, Claude:
- Constructs the appropriate
curlcommands - Executes them against the Denser Retriever API
- Parses the responses and presents results in a readable format
The API handles all the heavy lifting: document parsing, text chunking, indexing into Elasticsearch, and semantic search with neural reranking.
Use Cases
This workflow is useful for:
- HR teams searching employee handbooks and policy documents
- Legal teams querying contracts and compliance documents
- Research teams searching across academic papers
- Support teams building searchable FAQ and documentation bases
- Developers indexing project documentation for quick reference
All Supported Operations
The skill covers all 13 API endpoints:
| Category | Operations |
|---|---|
| Knowledge Bases | Create, List, Update, Delete |
| Documents | Upload files, Import text, List, Delete, Check status |
| Search | Semantic query with optional KB filtering |
| Account | Usage stats, Credit balance |
Pricing
Each semantic search query costs 1 credit. Document uploads and knowledge base management are free. You can check your balance anytime by asking Claude "What's my credit balance?"
For programmatic access without Claude Code, check out the TypeScript SDK or Python SDK.
Get Started Now
npx skills add denser-org/claude-skills@denser-retriever -g -y
export DENSER_API_KEY="your-key"
claudeCreate your free account at retriever.denser.ai to get an API key.
Frequently Asked Questions
What file types can I upload to a Denser Retriever knowledge base?
Denser Retriever supports PDF, DOCX, PPTX, XLSX, HTML, CSV, TXT, XML, and Markdown files. The maximum file size is 512MB per document.
Do I need to write code to use Denser Retriever with Claude Code?
No. The Denser Retriever skill for Claude Code lets you create knowledge bases, upload documents, and search them entirely through natural language conversation in your terminal. No coding or SDK setup required.
How does semantic search differ from keyword search?
Semantic search understands the meaning behind your query, not just the exact words. For example, searching "how many days off do I get" will match documents about "paid vacation" and "PTO policy" even if those exact words aren't in your query.
How much does it cost to search a knowledge base?
Each semantic search query costs 1 credit. Document uploads, knowledge base creation, and management operations are all free. You can check your remaining credits anytime by asking Claude "What's my credit balance?"
Can I search across multiple knowledge bases at once?
Yes. You can either specify which knowledge bases to search or omit the filter to search across all your knowledge bases simultaneously.
What is RAG and why does it matter?
RAG (Retrieval-Augmented Generation) is a technique that grounds AI responses in your actual documents rather than relying on the model's training data. This reduces hallucinations and ensures answers are based on your specific content with source citations.