Skip to main content

Layout-Aware RAG (LA-RAG)

This is the source code repository for Python package la-rag

Why Layout-Aware RAG?

The impressive abilities of large language models (LLMs) offer exciting possibilities for large-scale document analysis. However, a significant challenge remains in making text from extensive documents, such as large PDFs, accessible to LLMs due to their limited context window, which restricts the amount of text they can process at a time.

Retrieval Augmented Generation (RAG) systems address this challenge by combining LLMs with advanced retrieval techniques. Common chunking technologies used in LangChain, such as TextSplitter, RecursiveCharacterTextSplitter, etc break documents into smaller sections to fit within the LLM’s context window. But, these methods will allow the system to lose the semantic connection of layout features, such as sections & subsections, tables, lists, bullet points, etc. For example, in a bullet-pointed list, all the points can be interrelated, and each point is connected to the paragraph or the last sentence of the paragraph given above the list.

ayout-aware RAG considers the layout features of the document and the semantic connection between them.

alt text

Important Note

Although I have made the repository public and released the python package, I am still working on this project. I will be adding more details on the installation and building projects using la-rag soon. I encourage you to look into the tests\sample.py for reference to a sample code to see how to use the package.

If you are interested to collaborate on this project, please email me at muafirathasnikt@gmail.com

Metadata

Release files for la-rag 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for la-rag 0.1.5
File Size Uploaded Provenance
la_rag-0.1.5.tar.gz 14.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for la-rag 0.1.5
File Interpreter ABI Platform
la_rag-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 29.1 kB

Release files / la_rag-0.1.5.tar.gz

Download URL la_rag-0.1.5.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
676925ecdbdceec95953eed32e414ccc86dcc47028ee436eb16daa9cfa7389ee
BLAKE2b-256 checksum
How to use checksums
112c427b8db3a2322d3c60b588bf63e2675879498bbe08fccf885c065b08bdbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / la_rag-0.1.5-py3-none-any.whl

Download URL la_rag-0.1.5-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
80b0288aaf288502574dd6b58645c14adbd1ee40e2dfb51a9337997b32689eb1
BLAKE2b-256 checksum
How to use checksums
82a39b37bc5ed4de5a45867557547743fd4883e0d39cd00ff3bf22062caaa513
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Security for la-rag 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page