LLMs & Agentic AI in Biology
What We Will Achieve
LLMs & Prompting
Mastering Python interactions with Large Language Models
Agentic Architecture
Understanding how AI agents think, plan, and execute
Tool Use
Empowering agents with external capabilities
PubMed Analyst
Building a real-world research assistant
Project: PubMed Abstract Analyzer Agent
A LARGE LANGUAGE MODEL (LLM)
- 🔹A neural network trained to predict the next word in a sequence.
- 🔹Built using transformer architecture.
- 🔹Learned from billions of words across the internet.
5 THINGS YOU NEED TO KNOW:
TRANSFORMERS
The architecture that powers it. It reads ENTIRE sentences at once, not word-by-word. This enables context understanding.
PROMPTING MATTERS
How you ask determines what you get.
Precision in question → precision in answer.
CONTEXT WINDOW
It can only "see" ~4k-100k words at once. You must manage what information you feed it (e.g., selecting specific abstracts).
HALLUCINATION (CRITICAL)
It doesn't know when it's wrong. It might invent protein interactions.
= ALWAYS verify claims against real data.
KNOWLEDGE CUTOFF
Training data ends at a specific date. It doesn't know recent papers.
= Use PubMed search as a TOOL.
BOTTOM LINE:
It's a pattern-matching machine.
Very good at synthesis. Very bad at facts.
We'll use it to analyze; you'll verify.
CHATBOT vs. AGENT
The model is the same. The workflow is different.
THE CHATBOT
Straightforward. One turn.
You write ➔ LLM responds ➔ You read.
THE AGENT
Iterative Loop.
Code gives job ➔ LLM plans ➔ Executes Tool ➔ Observes ➔ Repeats until done.
1. TOOL USE
LLM calls functions (search, calc) instead of just talking.
2. LOOPING
It iterates. "Not enough info? Search again."
3. STATE
Remembers what it learned in previous steps.
4. DECISION
Agent decides when to stop, not you.
The "agency" isn't magical intelligence. It's the Python loop around it.