Skip to content
BENIBIX Learn

Chat with Your Documents

Level 2 · What assistants can do

How an AI answers from your own files. What a context window is, and why a big pile of files is searched in small parts.

Course contentsLesson 4 of 13

After this lesson you can

  • Say what a token and a context window are
  • Explain how a big set of files is searched in parts
  • Check an answer against the page it points to

10 mincovers 4 glossary entries

Worth reading first: AI Web Search and Sources

How does an AI answer questions about your own files?

Chat with documents means you give an assistant your own files and ask about them. You upload a PDF, a report or your notes, and it answers from what is in them. How much it can hold at once is counted in tokens. The newest Claude models hold 1 million tokens, about 555,000 words.

A token is a small piece of text, often part of a word. Models read and count in tokens, not words. The same page can come to a different number of tokens on different models. The limits on your plan, and the price of a long chat, are counted in tokens too.

The context window is everything the model can see at one time. Your question, the chat so far and every file you add all go into it. When the chat grows past it, the oldest parts drop out of view. That is why a very long chat can forget what you said at the start.

A file that fits in the window can be read whole. A bigger set of files is handled another way. The app cuts the files into small parts and searches them for the parts that match your question. Only those parts go to the model. This is called retrieval augmented generation, or RAG.

A good answer points to the page or the line it used. Check it. If the answer quotes a page you cannot find, or the file never says what the answer claims, the model filled the gap itself. Ask it to quote the exact words, and a made-up answer is much easier to spot.

Check before you upload. A file you give an assistant goes to the company that runs it. Read what the app does with your files, and leave out private data, such as bank details or health records, unless you trust where it goes. A work file may also have rules about where it can be sent.

Only the parts of your files that match the question go to the model. The question goes in with them.

Worked example

Jack asks his lease

Jack uploads his 40 page flat lease and asks how much notice he must give to move out.

The assistant answers '2 months' and points to page 12, clause 8. Jack opens page 12 and reads the clause himself before he writes to his landlord.

The words for this lesson4

Check yourself

Why can a very long chat forget what you said at the start?

Finished this lesson?

Marking it complete also marks its 4 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.