πŸ’‘ Pro Tip: Don't Use PDFs for Tabular Data β€” Use CSV Instead

One important thing I’ve seen when training AI agents is uploading PDFs as File sources that contain large tables of data.

While modern AI models can usually read tables inside PDFs, PDFs are designed for presentation, not data. The underlying table structure is often lost, making it harder for the AI to accurately retrieve individual rows, columns, and values.

Whenever possible:

:white_check_mark: Use CSV files for product catalogs, pricing lists, inventory, schedules, specifications, or any structured data.

CSV files preserve the relationships between rows and columns, making them much easier for AI to understand and retrieve accurately.

Good candidates for CSV

  • Product catalogs
  • Price lists
  • Service plans
  • Inventory
  • FAQs stored in spreadsheets
  • Location directories
  • Event schedules

Keep PDFs for

  • User guides
  • Policies
  • White papers
  • Manuals
  • Brochures
  • Documentation intended to be read like a document

A small change in your source format can make a noticeable difference in response quality.

2 Likes

JSON, XML etc all work as well.
The structure of a PDF is not always what you see – not all PDFs are created equal. Many look structured but under the hood, they are β€œa mess”

As they saying goes, β€œyou are what you eat.”

Feed your AI well and it will perform well. Feed it a diet of visually appealing but structureless garbage and accuracy will suffer.