What can you do with it?

The /pdf-analysis command enables you to use the LLM to extract text from PDF documents for further processing. You can extract all text from a PDF, pull specific sections, answer questions about the content, create summaries, and convert PDF content into editable text formats for analysis or documentation. If you just want to get the text out of the PDF without any LLM analysis, use one of the conversion/extraction tools (much faster!)

How to use it?

Basic Command Structure

/pdf-analysis [pdf-file] [action]

Parameters

Required:
  • pdf-file - The PDF document to process (URL or uploaded file)
Optional:
  • action - What to do with the PDF: extract-all, extract-snippet, answer-question, or summarize (defaults to extract-all)
  • query - Specific text to find or question to answer (when using extract-snippet or answer-question)
  • format - Output format: json or plaintext (defaults to json)

Response Format

The command returns:
{
  "extracted_text": "full or partial text content from PDF",
  "page_count": "number of pages processed",
  "query_result": "answer or snippet if requested",
  "format": "output format used"
}

Examples

Basic Usage

/pdf-analysis
pdf-file: document.pdf
Extracts all text content from a PDF document.

Advanced Usage

/pdf-analysis
pdf-file: research-paper.pdf
action: answer-question
query: What are the main findings of this study?
format: plaintext
Analyzes a PDF to answer a specific question about its content, returning the answer in plain text.

Specific Use Case

/pdf-analysis
pdf-file: contract.pdf
action: extract-snippet
query: payment terms
Extracts specific sections mentioning payment terms from a contract PDF.