Launch Sale25% off

How to make an AI chatbot that answers from your own PDFs

Three ways to build a chatbot over your own PDF documents — writing it yourself, a flow builder, or a hosted assistant — and what each one really costs in time and skill.

· 7 min read

What you're actually building#

The request sounds simple: “I have a pile of PDFs, I want people to be able to ask them questions.” Underneath it are four separate jobs, and knowing what they are is most of the battle when you’re choosing how to do it.

First, the text has to come out of the files. Second, it has to be broken into pieces small enough that a relevant one can be found — a 300-page manual is not a useful unit of retrieval. Third, when someone asks a question, the right pieces have to be located, which means matching on meaning rather than on keywords, because nobody phrases a question using the document’s vocabulary. Fourth, those pieces are handed to a language model with the question and an instruction to answer from them and nothing else.

That last step is the one people assume is the hard part. It isn’t. The difference between an assistant that works and one that embarrasses you is almost always in steps one to three — bad text extraction, clumsy splitting, or retrieval that hands the model the wrong three paragraphs.

The three routes, honestly#

There are three ways to get this done, and they suit different people.

  • Write it yourself. Total control, no per-seat cost, and you own the pipeline. You will need to be comfortable with an API key, a vector database, hosting, and the ongoing maintenance of all three.
  • Use a flow-builder chatbot tool. The older no-code category, built around drawing conversation trees. Good at scripted journeys, weak at “answer this from a document” — many now bolt on a document feature, so check whether it’s the product or an afterthought.
  • Use a hosted assistant built for your own content. You upload the documents; extraction, splitting, retrieval and citation are somebody else’s job. Less control, much less work. This is the category Ultranivo is in, and the rest of this guide is upfront about which parts of it are us.

The honest decision rule: if you want the pipeline to be a thing you own and tune, build it. If you want the answers and not the pipeline, don’t.

Doing it yourself with code#

Worth spelling out, because it’s a genuinely reasonable choice and the shape of it explains what a hosted tool is charging you for.

  • Extraction. A PDF library gets you the text of a digital PDF. A scanned PDF is a picture of a page and returns nothing — you need OCR, and OCR quality varies enormously with scan quality.
  • Chunking. Split the text into passages. Too small and answers lose their context; too large and retrieval gets vague. Respecting document structure — headings, sections — beats splitting every N characters.
  • Embedding and storage. Each passage becomes a vector via an embedding model, stored in a vector database. This is what lets a question about “time off after having a baby” find a passage titled “parental leave”.
  • Answering. Retrieve the closest passages, pass them to a model with a prompt that forbids answering from anything else, and return the answer along with which passage it came from.

A working prototype is an afternoon. The gap between that prototype and something you would put in front of customers — scanned files, tables, page numbers that survive into the citation, someone asking a question you have no answer for — is where the real time goes.

Using a hosted assistant#

The alternative is to skip the pipeline. This is our product, so read the next two paragraphs as description rather than as neutral advice.

With Ultranivo over your documents, you upload PDFs and Word files, add pages from your own site, or paste text in. Scanned pages go through OCR automatically. The material is indexed, and questions are answered from it with the document name and page number attached to every answer — which matters more than it sounds, because it’s the difference between an answer someone has to trust and one they can check. A 100-page document is usually ready in about 5 to 10 minutes.

From there it’s yours: your name, logo and theme, your own domain on higher plans, and an embed snippet if you want it on your existing site rather than on a page of its own.

When it isn’t the right fit: if you need the assistant to take actions in another system, or to run entirely on your own infrastructure, a hosted assistant over your content is the wrong shape and you should build.

What goes wrong#

  • Scanned documents that silently contain nothing. The most common failure by a distance. The upload succeeds, the file looks present, and every question about it comes back empty — because the pages are images and nothing read them. Test one scanned file before you commit an archive.
  • Two documents that disagree. Upload last year’s policy alongside this year’s and you have asked the assistant to pick. It has no way to know which is current. Remove superseded material rather than trusting the newest to win.
  • Expecting it to answer what isn’t written down. If the documents never state the return window, no assistant can produce it. Either write it down or accept the honest “that isn’t covered”.
  • Tables and forms. Complex layouts are harder to read than prose for every tool in this space. If your key facts live in dense tables, test with those specific pages before you decide anything.
  • No citations. An assistant that answers without saying where the answer came from cannot be audited, and the first wrong answer costs you more trust than the tool ever saved. See why AI assistants make things up.

Common questions#

Keep reading