AIPAIP Document Intelligence WorkflowAug 1, 2026

Parsing PDFs in Foundry with AIP Document Intelligence

#Palantir Foundry#AIP Document Intelligence#RAG#PDF Processing#Vector Embeddings#OCR#LLM
✦ AI SUMMARY

This Palantir AIP note details the "AIP Document Intelligence" workflow for extracting structured data from unstructured PDF documents. The process involves four stages: file input, iterative configuration and visual evaluation of extraction strategies (Traditional OCR vs. GenAI LLM), automated code deployment for text chunking and vector embedding, and finally, the generation of a Python repository and output dataset for downstream RAG applications.

In this video, "Parsing PDFs in Foundry with AIP Document Intelligence" by Ontologize, former Palantir engineers demonstrate how to extract, evaluate, chunk, and embed structured data from unstructured PDF documents using Palantir's specialized AIP Document Intelligence tool [00:00].


Architectural Process Map: PDF Processing & RAG Preparation

The workflow transitions through four core stages—from raw PDF input to vectorized embeddings for Retrieval-Augmented Generation (RAG) applications [01:25].

                  PALANTIR AIP DOCUMENT INTELLIGENCE WORKFLOW
┌────────────────────────────────────────────────────────────────────────┐
│ [ 1. File Input & Context Selection ]                                  │
│   └── Select Media Set (PDFs) / Object Type Media Reference           │
└──────────────────────────────────┬─────────────────────────────────────┘
                                   │
                                   ▼
┌────────────────────────────────────────────────────────────────────────┐
│ [ 2. Iterative Configuration & Visual Evaluation ]                     │
│   ├── Extraction Engine: Traditional (Layout-Aware OCR) vs. GenAI (LLM)│
│   ├── Target Page Test (e.g., Page 23: Tables, Lists, Headings)        │
│   ├── Visual Bounding Box Inspection                                   │
│   └── VLM Evaluation Scoring (Lists, Tables, Figures, Headings)        │
└──────────────────────────────────┬─────────────────────────────────────┘
                                   │
                                   ▼
┌────────────────────────────────────────────────────────────────────────┐
│ [ 3. Automated Code Deployment & Vectorization ]                       │
│   ├── Target Project Location                                          │
│   ├── Text Chunking (e.g., 512 chars, 10% overlap)                     │
│   └── Vector Embeddings (e.g., text-embedding-ada-002)                 │
└──────────────────────────────────┬─────────────────────────────────────┘
                                   │
                                   ▼
┌────────────────────────────────────────────────────────────────────────┐
│ [ 4. Generated Python Repository & Downstream Data Output ]            │
│   ├── extraction.py (Transforms generated)                             │
│   └── Output Dataset: Vector Embeddings + Media Pointer + Bounding Box │
└────────────────────────────────────────────────────────────────────────┘


Step-by-Step Guidance: Extracting & Embedding Data with AIP Document Intelligence

  1. Initialize Tool and File Input: Select existing Media Sets or Object Media References.

  2. Open Foundry and press Ctrl + J to search for and launch AIP Document Intelligence [01:28].

  3. Select your document source: upload PDFs from your local machine, select an existing Media Set, or point to an Object Type containing a media reference property [01:35].

  4. Choose a multi-page PDF document to test (e.g., a complex 522-page document containing tables, figures, and lists) [00:58].

  5. Create and Test Configurations: Select extraction engine and target test pages.

  6. Click Create New Configuration to specify how text should be extracted [02:30].

  7. Select the Extraction Strategy [02:58]:

  • Traditional Extraction (Layout-Aware OCR): Faster and cheaper; best for clean layouts, lists, and standard text blocks [03:56].
  • Generative AI (LLM & OCR): Uses vision/language models; higher cost, but preserves complex nested table structures and unstructured multi-column layouts [03:26].
  1. Set a specific Target Test Page (e.g., Page 23) containing complex tables or figures to evaluate performance before applying logic to the entire document [04:37].

  2. Click Run to generate the initial extraction output [05:06].

  3. Visual Inspection and Quality Evaluation: Inspect bounding boxes and score extraction using a VLM.

  4. Switch to the Bounding Box View to visually map extracted text back onto original regions of the source PDF [05:14].

  5. Click Evaluate to trigger an automated assessment by a Vision Language Model (VLM) acting as an independent judge [05:59].

  6. Review performance scores broken down by structural category [06:23]:

  • Lists & Headings: Typically score high under traditional layout-aware extraction [06:48].
  • Tables: Score lower in traditional mode if cells collapse into raw text blocks; requires Generative AI mode if structured JSON/tables are needed [05:31, 06:29].
  1. Deploy to Code Repository & Enable Chunking: Configure character splitting, overlap, and vector model.
  2. Once satisfied with the configuration, click Deploy $\rightarrow$ Create Repository [07:46].
  3. Specify the target project location (e.g., Learning Project) [08:01].
  4. Toggle Enable Chunking and set parameter defaults [08:06]:
  • Chunk Size: Set character limit (e.g., 512 characters) [08:21].
  • Chunk Overlap: Set adjacent boundary overlap (e.g., 10%) [08:26].
  1. Toggle Embed Chunks into Vectors and select an embedding model (e.g., text-embedding-ada-002) [08:29].

  2. Click Create to automatically generate a custom Python Code Repository [08:38].

  3. Execute Build and Audit Outputs: Build vector datasets and refine transform code.

  4. Open the generated extraction.py file within the new Python repository [08:44].

  5. Click Build to execute the pipeline job in Foundry [09:05]. (Ensure model references are added to project settings if permissions fail) [09:12].

  6. Inspect the final output dataset (chunk_text), which includes [11:09]:

  • Embedding Vectors: Dense numerical arrays for semantic search.
  • Chunk Content & Bounding Boxes: Spatial text coordinates mapping back to source pages.
  • Media Reference Pointers: Links direct back to original PDF pages for source lineage.

Detailed Use Case Analysis: RAG & Semantic Search Pipeline

AIP Document Intelligence simplifies building a Retrieval-Augmented Generation (RAG) vector index from long enterprise PDFs (such as operational manuals or compliance documents) [01:25].

                 PRACTICAL EXAMPLE: PARSING COMPLEX PDFS
┌────────────────────────────────────────────────────────────────────────┐
│ Input PDF: 522-page Technical Maintenance Manual                       │
│ Test Page: Page 23 (Contains 1 Table, 2 Figures, 3 Lists)              │
└──────────────────────────────────┬─────────────────────────────────────┘
                                   │
                                   ▼
┌────────────────────────────────────────────────────────────────────────┐
│ Traditional OCR Result: High list accuracy, unformatted table text     │
│ VLM Evaluation Score: Lists (95%), Figures (85%), Tables (25%)          │
└──────────────────────────────────┬─────────────────────────────────────┘
                                   │
                                   ▼
┌────────────────────────────────────────────────────────────────────────┐
│ Code Generation & Chunking: 512 char chunks + 10% overlap               │
│ Output Data Schema:                                                    │
│  ├── chunk_id        : string                                          │
│  ├── chunk_content   : string (Text + Bounding Box Metadata)           │
│  ├── embedding       : double[] (text-embedding-ada-002)               │
│  └── media_reference : pointer (Direct Link to PDF Page)               │
└────────────────────────────────────────────────────────────────────────┘

Architectural Comparison: Tool Selection Guide

The video contrasts AIP Document Intelligence with AIP FDE (AFDE) when engineering document ingestion pipelines [09:18]:

CriteriaAIP Document IntelligenceAIP FDE (AFDE)
Execution NatureDeterministic: Same configuration produces identical Python transform code every time [10:30].Non-Deterministic: Powered by LLM natural language prompts; output code may vary between runs [10:38].
User ExperienceVisual & Hands-On: Inspect spatial bounding boxes, run VLM evaluations, and tune chunk parameters manually [09:56].Prompt-Driven: User describes desired pipeline in text; AFDE writes and executes code automatically [09:47].
Primary Use CasePrecision document parsing, visual quality auditing, and vector index preparation [10:05].General-purpose pipeline construction across varied data sources [09:23].

Process Audit Report

================================================================================
                        PROCESS AUDIT & VERIFICATION REPORT
================================================================================
Audit Target: YouTube Guidance & Use Case Analysis (PyriuNyzMZU)
Auditor Skill: Process Audit
Verification Status: PASSED (100% Accuracy & Detail Alignment)

--------------------------------------------------------------------------------
[AUDIT CHECKPOINT 1: CORE CONCEPTS & CONSTRAINTS]
--------------------------------------------------------------------------------
✔ SOURCE VIDEO IDENTIFICATION:
  - Title: Parsing PDFs in Foundry with AIP Document Intelligence
  - Channel: Ontologize
  - Key Topics: PDF extraction, Traditional OCR vs GenAI, VLM evaluation, Code Repositories, Chunking, Vectors.

✔ TOOL INTEGRATION & ACCURACY:
  - Step sequences correctly capture Ctrl+J navigation to AIP Document Intelligence [00:01:28].
  - Media set and Media reference property inputs accurately detailed [00:01:35].
  - Correct distinction between Traditional OCR (cheaper/faster) and GenAI/LLM (table preserving/expensive) [00:03:04, 00:03:56].
  - Page-specific testing (Page 23 example) and bounding box visual checks accurately captured [00:04:37, 00:05:14].
  - VLM evaluation judge mechanism accurately reported [00:05:59].
  - Code deployment parameters verified: 512 character chunk size, 10% overlap, text-embedding-ada-002 model [00:08:21, 00:08:29].
  - Output schema details verified: embedding array, bounding box metadata, media_reference pointers [00:11:09].

--------------------------------------------------------------------------------
[AUDIT CHECKPOINT 2: FORMAT & VISUAL COMPLIANCE]
--------------------------------------------------------------------------------
✔ COMPONENT USAGE:
  - <Sequence> tag utilized with structured <Step> tags.
  - Subtitles provided on all steps.
  - Process map built with ASCII workflow diagrams.
  - Comparative analysis table included.
  - Image tags included and sourced from valid tool executions.

✔ SYNTAX & OVERLAY COMPLIANCE:
  - Self-closing <Image /> tag used without internal child comments.
  - Line-start rules for XML block tags followed.
================================================================================