Ask questions about your PDFs in plain English โ 100% on your machine. No upload, no account, no API key.
Sample document: USDA Complete Guide to Home Canning, Guide 1: Principles of Home Canning (Agriculture Information Bulletin No. 539, revised 2015) โ a US government publication, so public domain. Download it from nchfp.uga.edu (National Center for Home Food Preservation). Every number below comes from a real run of the CLI against it.
40 pages 188 chunks 6 / 6 questions, top passage on the right page byte-identical repeat answers 0 network calls
| Question | Top passage | Answer in the quote |
|---|---|---|
| What pH makes a food low-acid? | p. 8 (0.29) | Low-acid foods have pH values higher than 4.6 |
| What temperature is needed to destroy bacteria in low-acid canned food? | p. 8 (0.38) | 240ยฐ to 250ยฐF, 20 to 100 minutes |
| How long should jars sit undisturbed to cool at room temperature? | p. 22 (0.44) | 12 to 24 hours |
| How do you test jar seals after cooling? | p. 25 (0.29) | Press the lid โ if it springs up, it is unsealed |
| What causes botulism in canned food? | p. 33 (0.14) | Toxin from Clostridium botulinum in moist, low-acid food |
| What is the correct headspace for low-acid foods in a pressure canner? | p. 13 (0.26) | 1 to 1-1/4 inches |
Full transcripts with the quoted passages: qa_report_usda.md. The PDF itself is not in this repo (binary, gitignored) โ download it from the link above, save it as sample_data/usda-canning-guide-1.pdf, and run python -m localpdfai ask --pdf sample_data/usda-canning-guide-1.pdf --q "...".
The tiny 4-page tomato guide (The Beginner's Guide to Growing Tomatoes, regenerated locally with python scripts/make_sample.py) is the offline test fixture โ 7 chunks, 6/6 questions top-1 correct:
| Question | Top passage | Answer in the quote |
|---|---|---|
| What soil pH do tomatoes need? | p. 2 (0.33) | pH between 6.0 and 6.8 |
| How much water do tomato plants need each week? | p. 2 (0.25) | 1 to 2 inches per week |
| How do I deal with tomato hornworms? | p. 3 (0.16) | Pick off by hand into soapy water |
| How long until tomatoes are ready to harvest? | p. 4 (0.31) | 60 to 80 days |
| Should I store tomatoes in the fridge? | p. 4 (0.26) | Never โ flavour is destroyed, flesh turns mealy |
| How far apart should I space tomato plants? | p. 1 (0.25) | 60 to 90 cm (24 to 36 inches) |
Full transcripts: qa_report.md. The saved search index: sample_index.json.
git clone https://github.com/mrabr381/local-pdf-ai.git cd local-pdf-ai python -m venv .venv && source .venv/bin/activate pip install -r requirements.txt python scripts/make_sample.py python -m localpdfai ask --pdf sample_data/sample.pdf --q "What soil pH do tomatoes need?"
scripts/make_sample.py and the USDA guide is downloaded from the official link above. That is why this page shows measured numbers in text instead of linking to the PDFs.--backend st, needs torch).Local PDF AI on GitHub โ MIT licensed.