# AI use cases for Unstructured (Unstructured-IO/unstructured)

Repo: [Unstructured-IO/unstructured](https://github.com/Unstructured-IO/unstructured) | Use cases: 3 | Page: https://dedupedai.com/use-cases/unstructured-io-unstructured/

unstructured is an open-source Python library for ingesting and pre-processing documents such as PDFs, HTML, Word files, emails and images. Its partition function detects the file type and splits the document into elements you can clean and feed to LLM pipelines, and it runs from PyPI with per-format extras or inside a prebuilt Docker image.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Turn PDFs, Word files and emails into clean text elements: https://dedupedai.com/use-cases/unstructured-io-unstructured/partition-mixed-documents-for-rag-with-unstructured/
- Parse documents in Docker without local dependencies: https://dedupedai.com/use-cases/unstructured-io-unstructured/parse-documents-in-docker-with-unstructured/
- Run a private parsing pipeline with telemetry off: https://dedupedai.com/use-cases/unstructured-io-unstructured/set-up-a-private-document-pipeline-with-unstructured/

## How to turn PDFs, Word files and emails into clean text elements with Unstructured

Repo: [Unstructured-IO/unstructured](https://github.com/Unstructured-IO/unstructured) | Difficulty: Beginner | Time: 45 minutes | Basis: From the README

Run partition on any supported file and get a list of elements ready for chunking and embedding.

**Who it is for:** An engineer building a RAG index over a folder of mixed file types.

**The problem:** Every format needs its own parser, and layouts break naive text extraction.

**The outcome:** One element list per document, with text you can print, chunk or store.

### Steps

1. Install everything with `pip install "unstructured[all-docs]"`, or just the formats you need with `pip install "unstructured[docx,pptx]"`
2. Install system dependencies such as poppler-utils and tesseract-ocr for PDFs and images
3. Call partition(filename=...) from Unstructured.partition.auto so the file type is detected for you
4. Print the result with `print("\n\n".join([str(el) for el in elements]))` and pass the elements to your chunker

### Prompt to paste into your agent

```text
Using Unstructured-IO/unstructured, install `unstructured[all-docs]`, partition every file in <my documents folder> with partition from unstructured.partition.auto, and report the element count per file and any file that failed.
```

### Caveat

The README notes the hosted Transform API scores higher on tables than the open-source library.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/unstructured-io-unstructured/partition-mixed-documents-for-rag-with-unstructured/

## How to parse documents in Docker without local dependencies with Unstructured

Repo: [Unstructured-IO/unstructured](https://github.com/Unstructured-IO/unstructured) | Difficulty: Beginner | Time: 30 minutes | Basis: From the README

Use the prebuilt image so poppler, tesseract and LibreOffice come preinstalled.

**Who it is for:** A developer on a machine where installing system packages is painful.

**The problem:** Native dependencies for PDFs, images and Office files are hard to install consistently.

**The outcome:** A running container with a Python shell where the partition functions work.

### Steps

1. Pull the image with `docker pull downloads.unstructured.io/unstructured-io/unstructured:latest`
2. Create the container with `docker run -dt --name unstructured downloads.unstructured.io/unstructured-io/unstructured:latest`
3. Open a shell with `docker exec -it unstructured bash` and start python3
4. Try partition_pdf on example-docs/layout-parser-paper-fast.pdf and partition_text on example-docs/fake-text.txt

### Prompt to paste into your agent

```text
Using Unstructured-IO/unstructured, start the Docker image with `docker run -dt --name unstructured downloads.unstructured.io/unstructured-io/unstructured:latest`, copy <my PDF> in, run partition_pdf on it, and show the first ten elements.
```

### Caveat

Images are multi-platform; pass `--platform linux/amd64` to docker pull if you need a specific architecture.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/unstructured-io-unstructured/parse-documents-in-docker-with-unstructured/

## How to run a private parsing pipeline with telemetry off with Unstructured

Repo: [Unstructured-IO/unstructured](https://github.com/Unstructured-IO/unstructured) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Install only the extras for your formats, opt out of analytics and keep parsing on your own hardware.

**Who it is for:** A team processing confidential contracts or email exports.

**The problem:** Data teams need to know what a parsing library sends over the network.

**The outcome:** A local install for your file types with the analytics ping disabled.

### Steps

1. Install only what you parse, for example `pip install "unstructured[docx]"` or `pip install unstructured` for text, HTML, XML, JSON and email
2. Set DO_NOT_TRACK or SCARF_NO_ANALYTICS to a non-empty value before importing the library
3. Partition a sample email such as example-docs/eml/fake-email.eml with partition from Unstructured.partition.auto
4. Gather system info with `python scripts/collect_env.py` if you need to report a bug

### Prompt to paste into your agent

```text
Using Unstructured-IO/unstructured, install only the extras for <my file types>, export DO_NOT_TRACK=true, partition <my email export>, and confirm the element output.
```

### Caveat

This card is written from the Unstructured-IO/unstructured README, not from a test run by Deduped. Before you start, make sure you have Python with pip. Check the repo for newer instructions before you rely on these steps.

Risk, privacy: By default the library sends lightweight analytics pings when imported and on partition calls; opt out with DO_NOT_TRACK or SCARF_NO_ANALYTICS.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/unstructured-io-unstructured/set-up-a-private-document-pipeline-with-unstructured/
