Implement generative AI and agentic solutions 2.1 Build generative applications by using Foundry

An app sends insurance claim PDFs, whose key information is often in diagrams, to a model…

Study guide skill: Deploy and consume LLMs, small models, code models, and multimodal models

Question B8-014

An app sends insurance claim PDFs, whose key information is often in diagrams, to a model through the Responses API with an input_file item. Which two statements are correct? (Choose two.)

Select 2 answers.

  • A Only models that support both text and image inputs can accept PDF files as input ✓ Correct answer
  • B Any text-only chat model can accept the PDF, because the service converts it to text first
  • C The model receives only the text extracted from the PDF
  • D PDF pages placed in the context don't count toward token usage
  • E The model's context includes the extracted text and an image of each page, which helps with diagrams, so plan for the token usage ✓ Correct answer

Answer: A, E

Models with vision capabilities accept PDF input, and only models that support both text and image inputs can take PDFs. To help interpret the content, the context includes both the extracted text and an image of each page, which is useful when information is in diagrams. All extracted text and images go into the model's context, so pricing and token usage are affected.

Deep dive

How it works

The Responses API accepts PDFs as an input_file item. You can pass them as base64-encoded data, as a file ID from the Files API, or as an external file URL. Three rules on the page decide this question.

Model support. Models with vision capabilities support PDF input. More precisely, only models that support both text and image inputs can accept PDF files.

What the model sees. To help it interpret PDF content, the model's context includes both the extracted text and an image of each page. Microsoft says this is useful when key information is conveyed through diagrams or other non-textual content, which describes these claim forms.

Cost. All extracted text and images go into the model's context, so make sure you understand the pricing and token usage implications. Size limits apply too: each file must be under 50 MB, and the combined limit across all files in a request is 50 MB.

The other options, and when you'd use them

  • Any text-only model works: Only models that support both text and image inputs can accept PDFs.
  • Only extracted text: The context gets the extracted text plus an image of each page.
  • Pages don't count toward tokens: All extracted text and images go into the context, so they affect pricing and token usage.

Exam tip

PDF input = vision-capable model; context gets text + an image per page (good for diagrams); budget the tokens.

References

Last reviewed:

Ready to test yourself? The quiz asks this and every other AI-103 question, with instant feedback. Practice this in a quiz →

All Generative AI & agents questions · AI-103 study guide

Thanks for your feedback!