32dots HEIDELBERG AI
Session 7

Building a research assistant

medium
USE 0 - 15 min

Ask a research question — get a synthesised answer across papers

  1. 1 Go to Downloads (curriculum.32dots.de/share) and download 'Session 7 — Research assistant'.
  2. 2 In n8n: ⋯ → Import from file. Open the chat panel.
  3. 3 Ask: 'What are the current approaches to CAR-T cell therapy in solid tumors?'
  4. 4 Watch the execution log: Plan Search → PubMed Search → Extract IDs → Paper Details → Format → AI Synthesizer.
  5. 5 Ask a follow-up: 'Which of those approaches is furthest along in clinical trials?'
  6. 6 Ask: 'What are the common limitations mentioned across these papers?'
  7. 7 Open the Format Paper List node — inspect the paper list it builds from the esummary JSON.

You receive a synthesised answer that references specific papers by PMID, plus a coherent follow-up answer that uses the same papers.

UNDERSTAND 15 - 60 min

Pipeline-as-tool-use: the n8n model of ReAct

🔧Plan SearchCODE NODE — BUILD SEARCH URL🔎Tool — PubMedSearchHTTP REQUEST = 'SEARCH TOOL'⚙️Extract IDsCODE NODE — PARSE IDS, BUILD ESUMMARY URL📚Tool — PaperDetailsHTTP REQUEST = 'DETAILS TOOL'📝Format PaperListCODE NODE — FORMAT FOR AI CONTEXT🧠AI ResearchSynthesizerAI AGENT (TYPEVERSION 1.7)
Key concept

The ReAct pattern (Reason → Act → Observe → Respond) is universal. In Dify, the model controls the loop autonomously. In n8n, you design the loop as a workflow. n8n gives you full visibility and control; Dify gives you flexibility for open-ended tasks. Neither is better — they solve different problems.

  1. ?What stops the n8n version from running multiple search rounds (like an autonomous agent would)?
  2. ?In the Format Paper List node, what happens if esummary returns no results for a PMID? Is there error handling?
  3. ?For what types of research questions would a Dify agent give better results than this n8n pipeline?
BUILD 60 - 90 min

Add a second search round for related papers

After the AI Synthesizer responds, extract the most important keyword from the response and run a second, focused PubMed search. Return the combined results.

  1. 1 After AI Research Synthesizer, add an AI Agent node: 'Extract the single most important keyword or phrase from this response for a follow-up PubMed search. Return ONLY the keyword, nothing else.'
  2. 2 Add a Code node: build a new esearch URL using the extracted keyword.
  3. 3 Add HTTP Request → Extract IDs → HTTP Request (efetch or esummary).
  4. 4 Add a Set node: combine original papers + second-round papers.
  5. 5 Add a final AI Agent: 'Using these papers, write a one-paragraph research landscape summary.'
  6. 6 Test: does the second search find papers the first search missed?
Deliverable

Screenshot of a run showing two search rounds and a final synthesis paragraph that references papers from both rounds.

Your pipeline always does exactly two tool calls in a fixed order. An autonomous agent would decide dynamically whether to search again, refine the query, or stop. What types of questions would the autonomous approach handle better? When is the fixed pipeline preferable?