AI that reads your documents
Ask a document any question — get a grounded answer
You will import a pre-built n8n workflow that fetches a public webpage and answers questions about it. No embeddings, no vector database — just an HTTP request and a smart system prompt.
- Go to Downloads (curriculum.32dots.de/share) and download 'Session 3 — AI that reads your documents'.
- In n8n: click the ⋯ menu → Import from file. Select the downloaded JSON.
- The workflow opens. Click 'Chat' (bottom right) to open the chat panel.
- Ask: 'What is a transformer architecture?'
- Ask: 'What is the difference between a language model and an embedding model?'
- Ask: 'Who invented the Higgs boson?' (Not in the document — notice what happens.)
- Open the Document URL node and change the URL to any Wikipedia page about your research topic.
How document QA works in n8n
This is a simplified RAG pattern — no embeddings, no vector store. The entire document is fetched live and passed directly into the AI's context window.
Probe-Fragen
- What happens when you ask about something not in the document? Is the refusal consistent?
- Open the Prepare Context node. Where does $('When chat message received').first().json.chatInput appear — and why not just $json.chatInput?
- What would break if you removed the Simple Memory node?
Point the workflow at your own document
Adapt this workflow to answer questions about a document relevant to your research.
Aufgabe: Change the Document URL to a Wikipedia article, a PubMed abstract, or any public page in your field. Verify the AI answers correctly and refuses questions outside the document.
- Open the Document URL node. Paste a URL for a page relevant to your research.
- Open the chat. Ask three questions: one clearly answered by the page, one at the edge, one definitely outside.
- In the Prepare Context node, change substring(0, 12000) to a larger or smaller value. Test how this affects response quality.
- Change the system prompt in the AI Agent to add a citation format: 'Always end your answer with: Source: [section name]'.
- Try two different types of documents (e.g. a Wikipedia article and a PubMed abstract). Which one answers better and why?
Hast du das verstanden?
- I can explain why the session key uses $('When chat message received').first().json.sessionId instead of $json.sessionId.
- I understand the context window limit and why long documents need a different approach.
- I adapted the workflow to my own document and tested the refusal behaviour.
Frag den Tutor zu dieser Karte
Sokratisch: der Tutor antwortet mit Leitfragen statt fertigen Antworten — du erarbeitest die Lösung selbst.
Stell eine erste Frage zu dieser Karte unten.