document-query

Extract, summarize, and answer questions over PDFs, Office files, code files, and document images.

19.1k|3.8k|Updated Jun 10, 2024
One-click install
npx skills add https://github.com/agent0ai/agent-zero --skill document-query
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: document-query
Source: https://github.com/agent0ai/agent-zero/tree/main/plugins/_document_query/skills/document-query
Command: npx skills add https://github.com/agent0ai/agent-zero --skill document-query

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reading and answering questions across large documents, PDFs, Office files, code files, and scanned images is slow and error-prone when done manually, especially when files are remote or too large to skim.

Core Features & Use Cases

  • Document Q&A and Extraction: Ask natural-language questions over one or more local files or URLs and get answers grounded in the document content.
  • Summarization and Comparison: Summarize single documents or compare multiple documents to surface differences and unique requirements.
  • Fallback OCR: Read text from scanned documents or document images when vision tools are unavailable or insufficient.
  • Use Case: Point the tool at a 200-page policy PDF and a newer revision, then ask which requirements changed between the two versions.

Quick Start

Ask the agent to summarize the report at /a0/usr/workdir/report.pdf and list every deadline it mentions.

Frequently Asked Questions about document-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I ask questions about a PDF document?

Pass the PDF's full local path or URL as the document argument along with your questions in the queries list. The tool extracts the document text and returns answers grounded in its content.

How to compare two documents for differences?

Provide both documents as a list in the document argument and ask comparison questions, such as which requirements appear only in one file. The tool analyzes both sources and reports the differences.

What file formats does document query support?

It supports PDF, HTML, Office files, plain text, Markdown, CSV/TSV, XML/JSON, logs, and code files, from either local paths or HTTP/HTTPS URLs. It also handles document images and scans as a fallback OCR path.

Can document query read scanned documents or images?

Yes, but only as a fallback when vision tools are unavailable or cannot read the text. Vision tools should be used first for images, screenshots, charts, and other visual inputs.

Why can't I pass a directory to document query?

The tool accepts individual files, not directories. For codebases or folders, first identify the relevant files with file or search tools, then pass those specific file paths to the query.