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

1.Search PubMed for a query (e.g., "CRISPR off-target effects")
2.Retrieve abstracts from the last 6 months
3.Agent summarizes main findings from each paper
4.Agent synthesizes agreement and identifies open questions

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:

1

TRANSFORMERS

The architecture that powers it. It reads ENTIRE sentences at once, not word-by-word. This enables context understanding.

2

PROMPTING MATTERS

How you ask determines what you get.

❌ "Tell me about CRISPR"
✅ "List off-target effects..."

Precision in question → precision in answer.

3

CONTEXT WINDOW

It can only "see" ~4k-100k words at once. You must manage what information you feed it (e.g., selecting specific abstracts).

4

HALLUCINATION (CRITICAL)

It doesn't know when it's wrong. It might invent protein interactions.
= ALWAYS verify claims against real data.

5

KNOWLEDGE CUTOFF

Training data ends at a specific date. It doesn't know recent papers.
= Use PubMed search as a TOOL.

InputHidden LayersOutputneuron

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

USERLLMResponse

Straightforward. One turn.
You write ➔ LLM responds ➔ You read.

PYTHON SCRIPT

THE AGENT

LLMGoal: "Find papers"TOOL(PubMed)ObservationDECIDE

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.