Skip to main content

Guided project

A document question-answering API

Build a FastAPI service that takes a PDF, extracts its text and answers questions about it with a hosted model, packaged with Docker so a stranger can start it with one command.

You will need

  • Python 3, Docker and Git
  • An API key for a hosted model, kept in an environment variable
  • Three public PDFs to test with, such as annual reports or policy documents

Lessons it uses

What you will show

  • A public repository with a README that a stranger can follow
  • A Dockerfile and a Compose file that start the service with one command
  • Five pytest tests, including one for a bad file

Sign up free to see every step

The 6 steps, the rubric to check yourself against, and ideas to go further. It is free, takes a few seconds and needs no card.

Accounts are for learners aged 18 and over. Under 18? The quick answer and the first part of every lesson stay open: browse lessons by topic.

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.