Document intelligence that adapts, accelerates, and scales.
What is DocQWise?
DocQWise is a pluggable, AI-powered document intelligence engine. It reads any document format, extracts structured data using LLMs and RAG pipeline, and retrieves information with semantic search — locally, at scale, for zero per-page cost.
Install
Choose your install based on what you need:
# Option 1: Core only (PDF reading, regex extraction, no ML)
pip install docqwise
# Option 2: With ML (RAG pipeline, embeddings, OCR — recommended)
pip install -r requirements-ml.txt
# Option 3: Everything (all features, all formats)
pip install -r requirements-full.txt
LLM backend (pick one)
# Ollama — local, free, recommended
# Download from https://ollama.com then:
ollama pull nemotron-mini
# OR HuggingFace — local GPU
pip install transformers torch bitsandbytes accelerate
# OR OpenAI — cloud API
export OPENAI_API_KEY=your-key
Quick Start
from docqwise import Docqwise
dq = Docqwise()
# Ingest any document
dq.ingest("documents/")
# Extract fields with template
result = dq.extract_fields("invoice.pdf", template="invoice")
print(result.to_json())
# Ask questions about structured data
dq.ingest("sales.csv")
answer = dq.ask("What is the total amount?")
Extraction Methods
dq = Docqwise()
# RAG (default) — chunk → embed → retrieve → LLM extract
dq.extract_fields("doc.pdf", template="invoice")
# Direct LLM
dq.extract_fields("doc.pdf", template="invoice", method="llm")
# Vision (scanned docs, handwriting)
dq.extract_fields("scan.jpg", method="vision", model="gpt-4o")
# Regex (fast, no ML)
dq.extract_fields("doc.pdf", template="invoice", method="regex")
LLM Backends
# Ollama (local)
dq.extract_fields("doc.pdf", model="nemotron-mini")
# HuggingFace (local GPU)
from docqwise.llm.hf_llm import HuggingFaceLLM
llm = HuggingFaceLLM("Qwen/Qwen2.5-3B-Instruct", quantize="4bit")
dq.extract_fields("doc.pdf", llm=llm)
# OpenAI (cloud)
dq.extract_fields("doc.pdf", model="gpt-4o-mini")
Templates
dq.extract_fields("invoice.pdf", template="invoice")
dq.extract_fields("contract.pdf", template="contract")
dq.extract_fields("resume.pdf", template="resume")
dq.extract_fields("receipt.jpg", template="receipt")
# Custom schema
schema = {
"vendor": {"type": "string", "description": "Company name"},
"total": {"type": "number", "description": "Total amount"},
}
dq.extract_fields("doc.pdf", schema=schema)
Custom Prompts
You design the prompts. We run the pipeline.
dq = Docqwise()
# Default — docqwise handles the prompt
dq.extract_fields("doc.pdf", template="invoice")
# Your own prompt — full control
dq.extract_fields("doc.pdf", prompt="""
You are a medical record parser.
Extract patient name, diagnosis, and prescribed medications.
Return JSON only.
Document:
{context}
JSON:
""")
# Your prompt template with schema
dq.extract_fields("doc.pdf",
schema={"patient": {"type": "string"}, "diagnosis": {"type": "string"}},
prompt_template="""
Given this extraction schema:
{schema}
Parse this document:
{context}
Return JSON matching the schema exactly.
""")
Self-Improving Corrections
result = dq.extract_fields("invoice.pdf", template="invoice")
result.correct({"tax": 33300.00, "gst_number": "29AABCU9603R1ZM"})
# Next similar document → corrections applied automatically
Structured Data Q&A
dq.ingest("sales.xlsx")
dq.ask("What is the total amount?") # exact SUM
dq.ask("Which vendor has highest sales?") # GROUP BY + MAX
dq.ask("How many invoices are overdue?") # COUNT + WHERE
All Features
dq = Docqwise()
# Ingestion
dq.ingest("file.pdf") # single file
dq.ingest("documents/") # folder (all formats)
dq.ingest("data.csv") # structured data
# Extraction
dq.extract_fields("doc.pdf") # field extraction
dq.extract_tables("doc.pdf") # table extraction
dq.extract_entities("doc.pdf") # entity extraction
dq.extract_images("doc.pdf") # image extraction
dq.extract_text("doc.pdf") # text extraction
dq.auto_extract("doc.pdf") # auto-detect + extract
# Intelligence
dq.retrieve("query", top_k=5) # semantic search
dq.ask("question") # Q&A
dq.classify("doc.pdf") # classification
dq.compare("v1.pdf", "v2.pdf") # comparison
dq.detect_schema("data.csv") # schema detection
dq.detect_pii("doc.pdf") # PII detection
Demos
Run in order:
| Demo | What | Install |
|---|---|---|
python demo/01_quickstart.py |
All core features | pip install docqwise |
python demo/02_ollama.py |
AI extraction with Ollama | ollama pull nemotron-mini |
python demo/03_huggingface.py |
AI extraction on GPU | pip install transformers torch bitsandbytes accelerate |
python demo/04_rag.py |
Full RAG pipeline | pip install sentence-transformers |
Notebook
pip install jupyter
jupyter notebook notebooks/docqwise_getting_started.ipynb
Testing
pip install pytest
pytest -v
Docker
docker compose up --build
Architecture
engine.py (stable — never changes)
└── factory.py (all component selection)
├── ExtractorFactory → rag | llm | vision | regex
├── LLMFactory → ollama | huggingface | openai
├── EmbedderFactory → sentence-transformers | any
├── StoreFactory → sqlite | qdrant | faiss | any
├── ChunkerFactory → structure | fixed | sentence
└── TemplateFactory → invoice | contract | resume | receipt
Ecosystem
| Library | Tagline | Domain |
|---|---|---|
| SightRAG | See. Search. Retrieve. | Visual intelligence |
| sonarwise | Hear. Search. Retrieve. | Audio intelligence |
| docqwise | Read. Extract. Retrieve. | Document intelligence |
| adaptive-intelligence | Learn. Remember. Adapt. | Orchestration |
| llmevalkit | Evaluate. Score. Improve. | Evaluation |
License
Apache License 2.0
Author
Venkatkumar Rajan
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docqwise-0.2.0.tar.gz.
File metadata
- Download URL: docqwise-0.2.0.tar.gz
- Upload date:
- Size: 69.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0048b3a4a5237bd58e017f5ce9dc50d1012a295543b51a9407062fef01d56a3d
|
|
| MD5 |
12c95dc7826b4c23cb16433e519c2030
|
|
| BLAKE2b-256 |
3e0bdb71b6eedc02e653f3bba634bc1f69d162d42bd69d5d3ae409f99a4e6861
|
File details
Details for the file docqwise-0.2.0-py3-none-any.whl.
File metadata
- Download URL: docqwise-0.2.0-py3-none-any.whl
- Upload date:
- Size: 98.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13d4a834b0f91fca33198663d154894afcc829b86a6c442a21f7196aff1b0016
|
|
| MD5 |
6cbc40810736092e6352d44d2d3a4299
|
|
| BLAKE2b-256 |
454149a8869d34129b0d8bcc446f2251da9dea142a638ac9a9af4ec766ee8f19
|