Skip to content

PDF Page Index

PDF Page Index reads one or more PDF documents and, with the help of an AI model, builds their table of contents: the chapters, the sections inside each one and the pages they cover. If the document already has a table of contents, it uses it; if not, it works it out from the text itself. It can also add each section’s text and a summary.

Use it with long documents, such as manuals, contracts, reports or regulations, when you want an agent to find the part it needs without reading the whole document.

When to use it

  • Prepare a product manual of hundreds of pages so an assistant answers quoting the right section.
  • Get the table of contents of a long contract to review it clause by clause.
  • Split an annual report into its chapters to summarise them one by one.
  • Organise a regulation by articles before comparing it with another version.

Configuration

FieldWhat it does
PDF DocumentsThe PDF files you want to index. You can connect one or more.
Model (required)The AI model that analyses the document. Connect a model component here, for example OpenAI.
LanguageThe language of the document and the summaries, as a code: es, en, fr, de… Default: en.

Advanced options

FieldWhat it does
TOC Check PagesHow many pages at the start it checks when looking for a table of contents. Default: 10.
Max Pages per NodeNumber of pages above which a section is split into smaller sections, if it is also larger than Max Tokens per Node. Default: 20.
Max Tokens per NodeAmount of text above which a section is split, if it is also longer than Max Pages per Node. Measured in tokens, the unit AI models use to count text. Default: 100000.
Add Node IDsGives each section an identification number. On by default.
Add Node TextIncludes each section’s full text. On by default.
Add Node SummariesWrites a summary of each section with the model. It takes longer and uses more of the model. Off by default.
Add Doc DescriptionWrites a description of the whole document. Requires Add Node Summaries. Off by default.
Silent ErrorsIf a PDF cannot be processed, carries on with the others and leaves a note with the error in the result, instead of stopping the flow. Off by default.

Output

The Document Structure output returns one result per PDF, with:

  • The document name and source_file, the name of the original file.
  • structure: the table of contents, with each section’s title, the pages it covers and, inside, its subsections. Depending on the options, each section also carries its identifier, its text and its summary.
  • The document description, if you turned on Add Doc Description.

You can pass the result to an agent so it can navigate the document, or to components that store each section in a knowledge base.

Example

The support team at a machinery company wants to answer questions using each model’s technical manual.

  1. Connect the manual’s PDF to PDF Documents.
  2. Connect a model component to Model and enter en in Language.
  3. In the advanced options, turn on Add Node Summaries.
  4. Connect Document Structure to the support agent, which uses the table of contents and the summaries to go straight to the section that answers each question.

Good practices

  • Turn on summaries only when you will use them: each summary is one more request to the model.
  • If the table of contents comes out with sections that are too long, lower Max Pages per Node and Max Tokens per Node.
  • To process many documents at once, turn on Silent Errors and review the results with errors afterwards.
  • PDF Extractor: to get the text, tables and images of a PDF without using an AI model.