lvl does not always start at 1 #334

Open
opened 2026-02-16 00:17:31 -05:00 by yindo · 0 comments
Owner

Originally created by @GustafB on GitHub (Nov 18, 2024).

Describe the bug
The top most lvl is not guaranteed to start at 1 if the first header in the PDF is indented. I would expect the lvl to reflect the actual header level of the original document, and to always start at its lowest value.

Files
single-page-sample.pdf

Job ID
N/A

Client:

  • Python Library
  • API

Additional context

python -m pip show llama-parse
Name: llama-parse
Version: 0.5.14
Summary: Parse files into RAG-Optimized formats.
Home-page: 
Author: Logan Markewich
Author-email: logan@llamaindex.ai
License: MIT
Location: /home/cafebabe/anaconda3/lib/python3.12/site-packages
Requires: click, llama-index-core
Required-by: llama-index-readers-llama-parse

python -m pip show llama-index-core
Name: llama-index-core
Version: 0.11.23
Summary: Interface between LLMs and your data
Home-page: https://llamaindex.ai
Author: Jerry Liu
Author-email: jerry@llamaindex.ai
License: MIT
Location: /home/cafebabe/anaconda3/lib/python3.12/site-packages
Requires: aiohttp, dataclasses-json, deprecated, dirtyjson, filetype, fsspec, httpx, nest-asyncio, networkx, nltk, numpy, pillow, pydantic, PyYAML, requests, SQLAlchemy, tenacity, tiktoken, tqdm, typing-extensions, typing-inspect, wrapt
Required-by: llama-index, llama-index-agent-openai, llama-index-cli, llama-index-embeddings-openai, llama-index-indices-managed-llama-cloud, llama-index-llms-openai, llama-index-multi-modal-llms-openai, llama-index-program-openai, llama-index-question-gen-openai, llama-index-readers-file, llama-index-readers-llama-parse, llama-parse

Ran with cli options: llama-parse <filename> --output-raw-json --output-file <filename> --premium-mode --gpt4o-mode --gpt4o-api-key <api-key>

Originally created by @GustafB on GitHub (Nov 18, 2024). **Describe the bug** The top most `lvl` is not guaranteed to start at 1 if the first header in the PDF is indented. I would expect the `lvl` to reflect the actual header level of the original document, and to always start at its lowest value. **Files** [single-page-sample.pdf](https://github.com/user-attachments/files/17799574/single-page-sample.pdf) **Job ID** N/A **Client:** - Python Library - API **Additional context** ```sh python -m pip show llama-parse Name: llama-parse Version: 0.5.14 Summary: Parse files into RAG-Optimized formats. Home-page: Author: Logan Markewich Author-email: logan@llamaindex.ai License: MIT Location: /home/cafebabe/anaconda3/lib/python3.12/site-packages Requires: click, llama-index-core Required-by: llama-index-readers-llama-parse python -m pip show llama-index-core Name: llama-index-core Version: 0.11.23 Summary: Interface between LLMs and your data Home-page: https://llamaindex.ai Author: Jerry Liu Author-email: jerry@llamaindex.ai License: MIT Location: /home/cafebabe/anaconda3/lib/python3.12/site-packages Requires: aiohttp, dataclasses-json, deprecated, dirtyjson, filetype, fsspec, httpx, nest-asyncio, networkx, nltk, numpy, pillow, pydantic, PyYAML, requests, SQLAlchemy, tenacity, tiktoken, tqdm, typing-extensions, typing-inspect, wrapt Required-by: llama-index, llama-index-agent-openai, llama-index-cli, llama-index-embeddings-openai, llama-index-indices-managed-llama-cloud, llama-index-llms-openai, llama-index-multi-modal-llms-openai, llama-index-program-openai, llama-index-question-gen-openai, llama-index-readers-file, llama-index-readers-llama-parse, llama-parse ``` Ran with cli options: `llama-parse <filename> --output-raw-json --output-file <filename> --premium-mode --gpt4o-mode --gpt4o-api-key <api-key>`
yindo added the bugenhancement labels 2026-02-16 00:17:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_cloud_services#334