Transform any document into AI-ready knowledge in minutes.
DocuVec is a universal document processing pipeline that transforms any content - technical docs, medical records, legal documents, research papers, or any text - into AI-ready chunks for RAG systems.
Building RAG (Retrieval-Augmented Generation) systems is hard. You need to:
- Extract text from dozens of formats
- Clean out ads, navigation, and junk
- Split content intelligently
- Generate embeddings efficiently
- Track everything for updates
DocuVec does all of this in one command.
# Install
pip install -r requirements.txt
# Configure your OpenAI key
cp .env.example .env
# Add your key to .env
# Run on any documents
python main.py --sources your_docs.yamlThat's it. Your documents are now AI-ready.
- π¬ Chat with your docs - "What does our policy say about remote work?"
- π Semantic search - Find information by meaning, not just keywords
- π€ Support bots - Answer customer questions from your documentation
- π Knowledge bases - Make years of documents instantly searchable
- π Study assistants - "Explain this concept from my textbook"
- Handles PDFs, Word docs, HTML, Markdown automatically
- Extracts content from even the messiest websites
- Cleans out ads, popups, and navigation junk
- Keeps paragraphs and sections together
- Generates stable IDs for deduplication
- Strips YAML frontmatter and page chrome
- Normalizes domains and tracks offsets
- Preserves context with hierarchical titles
- Never cuts sentences in half
- Process thousands of pages for under $1
- Intelligent caching prevents reprocessing
- Batched API calls save time and money
- Detects and flags PII (emails, phone numbers, SSNs)
- Respects robots.txt and content licenses
- Full audit trail for compliance
# sources.yaml
- url: "https://docs.yourcompany.com/help/"
title: "Help Center"
tags:
category: "support"Result: AI that instantly answers customer questions
- url: "https://arxiv.org/pdf/2301.00001.pdf"
title: "Machine Learning Paper"
tags:
category: "research"Result: "What methods did the authors use?" - instant answers
- url: "file:///shared/policies/handbook.pdf"
title: "Employee Handbook"
tags:
category: "internal"Result: Employees can ask questions instead of searching PDFs
DocuVec creates clean, structured data ready for any vector database:
{
"text": "Your perfectly chunked content...",
"embedding": [0.123, -0.456, ...],
"metadata": {
"source": "document.pdf",
"page": 42,
"confidence": 0.95
}
}Each chunk includes:
- Clean, extracted text
- Vector embeddings for AI search
- Rich metadata for filtering
- Quality scores for ranking
π See full schema documentation β
| Format | Examples | Quality |
|---|---|---|
| Reports, papers, ebooks | Excellent | |
| HTML | Websites, documentation | Excellent |
| Word | .docx, .doc files | Excellent |
| Markdown | README files, wikis | Excellent |
| PowerPoint | Presentations | Good |
| Excel | Spreadsheets | Good |
| Plain Text | Log files, code | Good |
π Incremental Updates
Only process what's changed:
python main.py --sources updated_docs.yamlDocuVec automatically skips unchanged content using content hashing.
ποΈ Fine-Tuning
Customize chunking for your use case:
# .env
MAX_TOKENS=700 # Chunk size
OVERLAP_TOKENS=80 # Context overlapπ Quality Control
DocuVec automatically:
- Filters out navigation, footers, and ads
- Detects and flags low-quality content
- Identifies duplicate and near-duplicate chunks
- Weights content by relevance (FAQs get boosted, footers get reduced)
graph LR
A[Your Documents] --> B[DocuVec]
B --> C[Clean Text]
C --> D[Smart Chunks]
D --> E[Embeddings]
E --> F[Vector Database]
F --> G[Your AI App]
- Fetch - Gets your documents from any source
- Extract - Pulls text from PDFs, HTML, etc.
- Clean - Removes ads, navigation, and junk
- Chunk - Splits intelligently by structure
- Embed - Creates vectors via OpenAI
- Output - Ready for your vector database
- Python 3.8+
- OpenAI API key
# Clone the repository
git clone https://github.com/yourusername/docuvec.git
cd docuvec
# Install dependencies
pip install -r requirements.txt
# Configure
cp .env.example .env
# Edit .env and add your OpenAI API key
# Run
python main.pyCreate a sources.yaml file listing your documents:
# Web pages
- url: "https://docs.example.com"
title: "API Documentation"
# PDFs
- url: "https://example.com/whitepaper.pdf"
title: "Technical Whitepaper"
# Local files
- url: "file:///path/to/document.docx"
title: "Internal Document"Q: How much does it cost? A: Typically under $0.01 per 100 pages with OpenAI's API.
Q: Can it handle messy websites? A: Yes! It uses multiple extraction methods and cleans aggressively.
Q: What vector databases work with this? A: Any! Pinecone, Weaviate, Qdrant, pgvector, ChromaDB, etc.
Q: Can I use local models instead of OpenAI? A: The architecture supports it, but currently uses OpenAI for best quality.
Q: How do I update documents? A: Just run again - DocuVec only processes changed content.
- Have documents? PDFs, websites, anything text-based
- Want AI search? Make them searchable with meaning, not just keywords
- Use DocuVec β Get production-ready vectors in minutes
python main.py --sources your_docs.yamlWe love contributions! DocuVec is MIT licensed and welcomes:
- New format support
- Better extraction methods
- Performance improvements
- Bug fixes
See CONTRIBUTING.md for details.
MIT - Use it for anything!
Stop wrestling with documents. Start building AI.
Get Started β’ Examples β’ Documentation
Built with β€οΈ by Sofiane Djerbi