text
stringlengths 0
2.18k
|
|---|
Step 2: LLM-based Triage (frame selection/filling)
|
Question: "Can you summarize the key takeaways from pages 5-7?"
|
Document Context:
|
Pages [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
|
...
|
Section Title: "2 Related Works" Pages: [2, 3]
|
Section Title: "2.1 Tool and Retrieval Augmented LLMs" Pages: [2]
|
…
|
Table Caption: "Table 1: GPTriage functions for Document QA" Pages: [4]
|
Available Functions: fetch_pages, fetch_section, search, …
|
fetch_pages(pages: [5, 6, 7])
|
Step 3: Question answering with selected context
|
Question: "Can you summarize the key takeaways from pages 5-7?"
|
Page 5:
|
…length less than 10 pages, to ensure that there is sufficient but not excessive…
|
Page 6:
|
…the query embedding. We then feed each page’s text as context for answering…
|
Page 7:
|
…1. The overall quality of the question, such as its difficulty, clarity,...
|
Answer: The key takeaways of ...
|
--------------------------------------------------- Unstructured Image End
|
--------------------------------------------------- Unstructured Caption Begin
|
Figure 1: Overview of the PDFTriage technique: PDFTriage leverages a PDF’s structured metadata to implement a more precise and accurate document question-answering approach. It starts by generating a structured metadata representation of the document, extracting information surrounding section text, figure captions, headers, and tables.
|
Next, given a query, a LLM-based Triage selects the document frame needed for answering the query and retrieves it directly from the selected page, section, figure, or table. Finally, the selected context and inputted query are processed by the LLM before the generated answer is outputted.
|
--------------------------------------------------- Unstructured Caption End
|
--------------------------------------------------- Unstructured Sub-Title Begin
|
Document Question Answering
|
--------------------------------------------------- Unstructured Sub-Title End
|
. Several datasets have been constructed to benchmark different aspects of document-focused question-answering. DocVQA (Mathew et al., 2021) is a visual question-answering dataset focused that uses document scans. A recent work by Lan-deghem et al. (2023) focused on a dataset for document understanding and evaluation called DUDE, which uses both scans and born-digital PDFs. Both DUDE and DocVQA have questions that can be answered short-form; DUDE answers average roughly 3.35 tokens and DocVQA tokens average 2.11 tokens. QASPER (Dasigi et al., 2021) is a dataset focused on information-seeking questions and their answers from research papers, where the documents are parsed from raw LATEXsources and the questions are primarily focused on document contents. The PDFTriage evaluation dataset seeks to expand on the question types in these datasets,
|
getting questions that can reference the document structure or content, can be extractive or abstractive, and can require long-form answers or rewrites.
|
--------------------------------------------------- Unstructured Sub-Title Begin
|
3 PDFTriage: Structured Retrieval from Document Metadata
|
--------------------------------------------------- Unstructured Sub-Title End
|
The PDFTriage approach consists of three steps to answer a user’s question, shown in Figure 1:
|
1. Generate document metadata (Sec. 3.1): Extract the structural elements of a document and convert them into readable metadata.
|
2. LLM-based triage (Sec. 3.2): Query the LLM to select the precise content (pages, sections, retrieved content) from the document.
|
3. Answer using retrieved content (Sec. 3.3): Based on the question and retrieved content, generate an answer.
|
--------------------------------------------------- Unstructured Plain Text Format 1.0.0
|
--------------------------------------------------- Unstructured Table Begin
|
# of Documents 82
|
# of Questions 908
|
Easy Questions 393
|
Medium Questions 144
|
Hard Questions 266
|
“Unsure” Questions 105
|
--------------------------------------------------- Unstructured Table End
|
--------------------------------------------------- Unstructured Caption Begin
|
Table 1: Dataset statistics for the PDFTriage evaluation dataset.
|
--------------------------------------------------- Unstructured Caption End
|
--------------------------------------------------- Unstructured Image Begin
|
PDFTriage Document Distribution by Word Count
|
Frequency
|
10 8 6 4 2 0
|
Document Word Count
|
0 10000 20000 30000 40000
|
Avg. Doc. Length
|
--------------------------------------------------- Unstructured Image End
|
--------------------------------------------------- Unstructured Caption Begin
|
Figure 2: PDFTriage Document Distribution by Word Count
|
--------------------------------------------------- Unstructured Caption End
|
--------------------------------------------------- Unstructured Sub-Title Begin
|
3.1 Document Representation
|
--------------------------------------------------- Unstructured Sub-Title End
|
We consider born-digital PDF documents as the structured documents that users will be interacting with. Using the Adobe Extract API, we convert the PDFs into an HTML-like tree, which allows us to extract sections, section titles, page information, tables, and figures.¹ The Extract API generates a hierarchical tree of elements in the PDF, which includes section titles, tables, figures, paragraphs, and more. Each element contains metadata, such as its page and location. We can parse that tree to identify sections, section-levels, and headings, gather all the text on a certain page, or get the text around figures and tables. We map that structured information into a JSON type, that we use as the initial prompt for the LLM. The content is converted to markdown. An overview of this process is shown at the top of Figure 1.
|
--------------------------------------------------- Unstructured Sub-Title Begin
|
3.2 LLM Querying of Document
|
--------------------------------------------------- Unstructured Sub-Title End
|
PDFTriage utilizes five different functions in the approach: fetch_pages, fetch_sections,
|
¹https://developer.adobe.com/document-services/apis/pdf-extract/
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.