PDF Vector icon

PDF Vector

Turn complex PDFs, Word documents, or images into clean Markdown texts and search across millions of academic papers using PDF Vector with OCR support.

Actions5

Overview

This node enables users to interact with documents such as PDFs, Word documents, or images by leveraging an external document processing API. Specifically, the Ask operation allows you to ask questions about the content of a document and receive answers based on its text.

Common scenarios where this node is beneficial include:

  • Extracting specific information from lengthy reports or manuals without manually reading them.
  • Querying invoices, contracts, or academic papers to quickly find relevant details.
  • Automating customer support by answering questions from product manuals or documentation files.

For example, you can upload a PDF file of a user manual and ask "How do I reset the device?" or provide a URL to a research paper and ask "What are the main conclusions?".

Properties

Name Meaning
Input Type Choose how to provide the document: either via a URL pointing to the document or by uploading a file (PDF, Word doc, image).
Document URL The URL of the document or image to ask questions about. Supports PDF, Word, JPG, PNG formats. Required if Input Type is URL.
Binary Property The name of the binary property containing the uploaded file data from the previous node. Required if Input Type is File.
Prompt The question you want to ask about the document. Must be between 1 and 2000 characters.

Output

The node outputs a JSON object containing the response from the document question-answering API. This typically includes the answer extracted or generated based on the document content and the prompt provided.

If the input was a file, the node processes the binary data internally but does not output binary data itself for this operation.

Dependencies

  • Requires an API key credential for the external document processing service (referred to generically here as "an API key credential").
  • The node makes authenticated HTTP POST requests to the service's /ask endpoint.
  • The workflow must provide either a valid document URL or binary file data in the specified property.

Troubleshooting

  • No binary data found in property: If using file input, ensure the binary property name matches exactly the property holding the file data from the previous node.
  • Binary data is empty or invalid: Verify that the file was correctly uploaded and contains valid data.
  • Invalid input type error: Input Type must be either "url" or "file".
  • API errors:
    • Invalid API key: Check that the API key credential is correctly configured.
    • Insufficient credits: Add more credits to your account with the external service.
    • Rate limit exceeded: Wait before making additional requests.
    • Bad request: Review the prompt and input parameters for correctness.

Links and References

Discussion