LlamaIndex • Dec 9, 2024
Optimize parsing costs with LlamaParse auto mode
Our world-class document-parser, LlamaParse, is one of our most popular products for good reason: it's powerful, flexible, and incredibly accurate. One aspect of its flexibility is its many parsing modes: you can choose fast mode for the fastest possible output, continuous mode for documents with tables that span multiple pages, or premium mode for the highest quality parsing possible.
For long documents that interleave complex charts and images on some pages but are plain text on others this can present a challenge: you want the highest-quality output but you don't necessarily need advanced parsing on every page to get that. That's where our new Auto Mode comes in.
Intelligently select parsing modes
In Auto Mode, your document will by default be parsed in our standard parsing mode, but you can select one of a variety of triggers to switch to our advanced Premium parsing mode on a per-page basis. The available triggers include:
- Trigger on tables: whenever a table-like structure is detected
- Trigger on images: Premium parsing on any page the contains an image
- Trigger on text: you can set a specific string that LlamaParse will search for and upgrade on, for instance you could upgrade for "product details" pages or "summary results" rather than triggering on every table.
- Trigger on regular expression: a more advanced form of triggering on text, you can get a regular expression as your matching condition, allowing you to search for multiple strings, patterns and more.
Auto mode advantages
Auto-mode gets you all the advantages of Premium mode at lower cost by only triggering on the pages where it's necessary. That includes features like:
Automatically rendering diagrams using Mermaid charts
In our example notebook you can see us convert this diagram:
Into a Mermaid chart like this one:
Improved accuracy on table reading
Our original PDF has this table:
Which gets automatically converted into clean Markdown in auto mode:
Advanced chart conversion
Auto mode is also able to take this set of graphical charts:
And render them as a single, easy to read table in Markdown:
Other auto mode features
Our notebook is just a sample of what you get from automatic usage of Premium Mode, including:
- LaTeX rendering of equations
- Lower hallucination rates
- Higher content retrieval rates
- Improved reading order
Available right now
Auto Mode is already available! Check out our example notebook for an in-depth look at how to use it, read the documentation or head on over to LlamaCloud to sign up and get access today!