databricks-unstructured-pdf-generation

Generate synthetic PDF documents with evaluation metadata for RAG testing on Databricks.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/AarushiShah/coding-agents-databricks-apps --skill databricks-unstructured-pdf-generation-aarushishah
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databricks-unstructured-pdf-generation
Source: https://github.com/AarushiShah/coding-agents-databricks-apps/tree/main/.claude/skills/databricks-unstructured-pdf-generation
Command: npx skills add https://github.com/AarushiShah/coding-agents-databricks-apps --skill databricks-unstructured-pdf-generation-aarushishah

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building and evaluating RAG systems requires realistic document corpora, but sourcing domain-specific PDFs with ground-truth questions is slow and often blocked by data privacy constraints. This Skill generates synthetic PDF documents with accompanying question-and-guideline JSON files, uploaded directly to Unity Catalog Volumes. ## Core Features & Use Cases - LLM-Based PDF Generation: Create batches of realistic documents (HR policies, technical docs, financial reports, training materials) from a natural-language description via the generate_pdf_documents MCP tool. - RAG Evaluation Metadata: Each PDF ships with a JSON file containing a title, category, test question, and evaluation guideline for measuring retrieval quality. - Unity Catalog Integration: Output lands in /Volumes/<catalog>/<schema>/<volume>/<folder>/ with configurable volume, folder, document size, and overwrite behavior. - Use Case: Generate 20 technical documentation PDFs for a SaaS analytics platform, ingest them into a vector search index, then use the bundled questions to evaluate your RAG pipeline's answer accuracy. ## Quick Start Ask the agent to generate 10 medium-sized HR policy PDFs into the ai_dev_kit catalog and hr_demo schema using the generate_pdf_documents tool.

Frequently Asked Questions about databricks-unstructured-pdf-generation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate synthetic PDF documents for RAG testing?

Call the generate_pdf_documents MCP tool with a catalog, schema, detailed content description, and document count. The tool creates PDFs plus JSON files containing test questions and evaluation guidelines, saved to a Unity Catalog Volume.

How to create evaluation datasets for retrieval-augmented generation?

Each generated PDF includes a JSON file with a question field and a guideline field describing the expected answer. Query your RAG system with the questions and score responses against the guidelines to measure retrieval quality.

Can I use Azure OpenAI instead of Databricks models for PDF generation?

Yes, set LLM_PROVIDER=AZURE with AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_API_KEY, and AZURE_OPENAI_DEPLOYMENT environment variables. The default provider is Databricks Foundation Models configured via DATABRICKS_MODEL.

Why does PDF generation fail with no LLM endpoint configured?

The tool requires an LLM to write document content, so it fails when neither DATABRICKS_MODEL nor AZURE_OPENAI_DEPLOYMENT is set. Configure one of these environment variables before running generation.

What document sizes are supported for generated PDFs?

Three sizes are available via the doc_size parameter: SMALL at roughly one page, MEDIUM at four to six pages, and LARGE at ten or more pages. MEDIUM is the default and suits most RAG testing scenarios.