ragntex / docs /index.rst
eranmi's picture
sphinx documentation
07f8852
Raw History Blame Contribute Delete
2.91 kB
.. RAGnTeX documentation master file, created by
sphinx-quickstart on Fri Jun 13 12:43:29 2025.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
RAGnTeX documentation
=====================
📚 From Text to Visuals: Auto-Generating LaTeX Beamer Presentations with GenAI
------------------------------------------------------------------------------
In this project, we explore how generative AI can automate the creation of professional-looking presentation slides—directly from extensive collections of PDF documents.
---
🧠 Use Case
===========
Creating slide decks from dense documents (like whitepapers or scientific articles) is a time-consuming and cognitively heavy task. Our goal is to streamline this process using generative AI.
We built an AI assistant that transforms document collections into LaTeX Beamer presentations—complete with structure, content, and visuals—based on a user-defined topic.
---
🔍 How It Works
==============
💿 Database Creation
-------------------
We start by creating a vector database from a collection of PDF documents (e.g., arXiv papers). Each document is processed to extract text chunks, and for each chunk, we store:
- **Embeddings** of the text from the file
- **Associated metadata** (like images, their captions, how many images there are)
🗣️ User Prompt
--------------
A user enters a natural language query like:
::
"I need a presentation about AI agents."
📄 Document Retrieval
--------------------
We use **Chroma** as our vector database to retrieve the most relevant PDF documents based on the query.
🧠 Content Understanding
------------------------
Using **Gemini 2.0 Flash** (``google-genai==1.7.0``), the assistant analyzes the retrieved content and extracts the most relevant ideas and insights.
🎞️ Slide Generation (LaTeX Beamer)
----------------------------------
The model outputs fully formatted compilable LaTeX code following a clear and consistent structure:
- **Introduction**: Topic overview and motivation
- **Main Content**: 2–4 slides, each presenting a core idea
- **Summary**: Key takeaways
It also incorporates relevant images extracted from the documents, organizing them into LaTeX Beamer-friendly layouts (e.g., *Core Idea 2* and *Core Idea 3* slide formats).
Installation
============
Install poetry to manage dependencies and virtual environments:
.. code-block:: bash
pip install poetry
Then, install the project dependencies:
.. code-block:: bash
poetry install
Running
=======
Run project with:
.. code-block:: bash
poetry run python ragntex.py
Or via Docker:
.. code-block:: bash
docker run \
--env-file .env \
-e IN_DOCKER=true \
-p 7860:7860 \
-v /path/to/your/output:/app/output \
ragntex
.. toctree::
:maxdepth: 2
:caption: Contents:
src