DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to prepare a document folder for a RAG index with Docling

Use the Python API to convert mixed documents into Markdown before chunking them into your retriever.

Short answer: Install with pip install docling; then in Python, create a DocumentConverter() and call converter.convert(source) with a local path or URL; export each result with result.document.export_to_markdown(). All steps.

  • Research
  • Intermediate
  • 45 minutes
  • From the README
  • Claude Code
  • Codex
  • Cursor

Who it is forA developer building a chat-with-your-docs app over a pile of PDFs, slides and spreadsheets.

The problemGarbage in, garbage out: badly parsed documents give a RAG system bad chunks and wrong answers.

The outcomeStructured Markdown exports of every document, ready to chunk and embed in LangChain, LlamaIndex or Haystack.

What you need first

  • Python 3.10 or higher
  • macOS, Linux or Windows on x86_64 or arm64
  • Optional: a GPU for faster VLM pipelines such as GraniteDocling

Steps

  1. Install with pip install docling
  2. In Python, create a DocumentConverter() and call converter.convert(source) with a local path or URL
  3. Export each result with result.document.export_to_markdown()
  4. Feed the Markdown into your framework; the README lists integrations with LangChain, LlamaIndex, Crew AI and Haystack
  5. Keep sensitive files on your machine; Docling supports local execution for air-gapped environments

Prompt for your agent

Using docling-project/docling, write a Python script that converts every file in <folder> with DocumentConverter, saves the Markdown with export_to_markdown, and loads the results into <LangChain or LlamaIndex> for retrieval. Run it and report any files that failed.

Caveat. The README points to the docs for chunking and framework examples, so plan to read the integrations page.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for docling-project/docling and "Prepare a document folder for a RAG index"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer