Chat with PDF docs using AI (quoting sources)

Nodes

18498941-310c-4e96-b6a9-f14e1733ae0c24e3b914-15fa-444f-80e3-ca29bdacaf40cc410a33-acd1-4c16-aba9-bd8029d93b4757932fab-a25f-4afc-8917-5e99648bfd3c+4

Created by

DaDavid Roberts

Last edited 38 days ago

This workflow allows you to ask questions about a PDF document. The answers are provided by an AI model of your choice, and the answer includes a citation pointing to the information it used.

You can use n8n’s built-in chat interface to ask the questions, or you could customise this workflow to use another one (e.g. Slack, Teams, etc.)

Example

The workflow is set up with the Bitcoin whitepaper. So you could ask things like:

Question: “Which email provider does the creator of Bitcoin use?“ Answer: “GMX [Bitcoin whitepaper.pdf, lines 1-35]”

Requirements

  1. A Pinecone account (they have a free tier at the time of writing that is easily enough for this workflow)
  2. Access to a large language model (e.g. an OpenAI account)

Customizing this workflow

The workflow only reads in one document, but you could customise it to read in all the documents in a folder (or more).

The workflow is set up to use GPT 3.5, but you could swap that out for any other model (including self-hosted ones).

New to n8n?

Need help building new n8n workflows? Process automation for you or your company will save you time and money, and it's completely free!