1 of 67

Building Agentic AI Applications for Biodata Exploration

Ana Claudia Sima, Vincent Emonet,

Tarcisio Mendes, Panayiotis Smeros, Ruijie Wang

kru@sib.swis

2 of 67

Schedule – Day 1

  • The theory : LLM basics, RAG, model evolution

​

    • Coffee break @ 10:30

​

  • Introduction to coding agents
    • Lunch @ 12:00

​

  • Knowledge Representation and Data Access for Agentic AI
    • Coffee break @ 15:00

​

  • Hands-on : Using existing MCPs for biodata exploration in agentic workflows
    • Apero @ 17:30 at the Irchel Bar (building Y00)

3 of 67

Schedule – Day 2

  • Build your own MCP server for a biodata resource

​

    • Coffee break @ 10:30

​

  • Hands-on: Agentic application for biodata exploration using custom MCP

​

    • Lunch @ 12:00

​

  • Hands-on : continuation
    • Coffee break @ 15:00

​

  • Bonus (optional): Adapting the practicals to your own use case / using local LLMs

4 of 67

Who we are – Knowledge Representation Unit @ SIB

  • Tarcisio Mendes, Ana Claudia Sima – KRU co-leads (Lausanne / Zurich)

​

  • Vincent Emonet – Data Scientist and Software Engineer

​

  • Panayiotis Smeros and Ruijie Wang - AI Research Scientists with broad experience in ML / LLMs for information retrieval, classification, NLP …

​

​

Tarcisio

Ana

Vincent

Panayiotis

Ruijie

5 of 67

Learning objectives?

6 of 67

Disclaimer: This is a rapidly advancing field!��What you learn today reflects a snapshot of this field as of May 2026….�

7 of 67

�We hope to also learn from you!

8 of 67

Do you already use Agentic AI?

9 of 67

What to expect from today

  • An overview of LLMs, basics on how they are trained and potential uses

​

  • A deep dive into using LLMs for question answering with context
    • From unstructured and structured sources (inputs)
    • Towards unstructured and structured answers (outputs)
    • …while using the right tools for the right purpose (Agentic)

​

  • Best practices for building and using AI Agents

​

  • Agentic application for interacting with biodata leveraging a custom MCP
    • Build your own mini data exploration agent!

10 of 67

Ask Questions Anytime!

11 of 67

Part I. The Theory

12 of 67

What is a Large Language Model?

A (deep learning) model trained to predict the next word in a sentence

​

How is it trained?

    • Self-supervised learning on HUGE amounts of text
    • Learning to predict 1 word at a time

​

12

13 of 67

  • Originally based on GPT3.5

​

  • A “chatty” version of LLM

​

13

Note: ChatGPT is not an LLM per-se, but a service with many “bells and whistles”

leveraging an LLM

(but also including web search,

integration with external tools, etc)

14 of 67

The “art” of prompting

  • Prompting = a guiding question / instruction given to the model to shape the generated response

14

McDuff, D., Schaekermann, M., Tu, T. et al. Towards accurate differential diagnosis with large language models. Nature (2025). https://doi.org/10.1038/s41586-025-08869-4

15 of 67

The “art” of prompting

  • Prompting = a guiding question / instruction given to the model to shape the generated response

​

  • Brittle!

​

15

Vinay, Rasita, et al. "Emotional Prompting Amplifies Disinformation Generation in AI Large Language Models." Frontiers in Artificial Intelligence 8: 1543603.

16 of 67

What can you use an LLM for?

  • Summarisation
  • Programming (Co-Pilot)
  • Question Answering
  • Reports from images
  • …

​

​

​

  • Recognise special pieces of information in a text
    • “Named Entity Recognition”
  • Sentiment analysis
  • Fraud detection
  • …

16

Generative tasks

Classification tasks

17 of 67

Key LLM training steps

1) Pre-train

2) Fine-tune

3) Retrieve & Augment

4) Validate / Evaluate

5) Publish / Deploy

18 of 67

Pre-training: Tokenization

19 of 67

Tokenization

  • Breaking down sentences into tokens

​

  • The totality of tokens = the vocabulary of an LLM
    • Determined by the specific choice of tokenizer

​

  • Tokens do not necessarily always correspond to words
    • Why?

20 of 67

Try it for yourself!

  • Use the live tokenizer playground to see how it works!

​

​

  • Use the sentence: "Hello hello and welcome to this course! 🙂 "

20

21 of 67

22 of 67

What is a Large Language Model? (Generalization)

  • A (deep learning) model trained to predict the next word in a sentence
    • Token = words / amino-acids / genes / ….
  • What is a Language?
    • A vocabulary +
    • Sequences of tokens that represent information in that language

22

token

sequence

23 of 67

Bioinformatics applications

​

​

23

24 of 67

Bioinformatics applications

​

​

24

25 of 67

Pre-training: Embedding

26 of 67

Pre-training: embedding

  • LLMs, like any machine learning system, work with numbers

​

  • Embeddings = a way to transform words into numbers, while preserving their semantics

26

Source: https://dkharazi.github.io/notes/ml/nlp/embedding

27 of 67

Pre-training: Attention

28 of 67

Pre-training: Attention!

28

Source: A Multiscale Visualization of Attention in the Transformer Model, ACL 2019 Systems Demonstrations

​

29 of 67

“Self-Supervised” / “Unsupervised” – but training data matters

  • The illusion of self-supervision – actually a lot of effort for curating good data
    • Relies on work of thousands of human “data annotators”
    • Ethical issues: breaches of copyrighted material
    • Removing bias from training dataset
    • etc

29

30 of 67

Result: Foundation Model

30

Source: https://viso.ai/deep-learning/foundation-models/

31 of 67

Limitations?

Drawbacks?

32 of 67

Non-exhaustive list of pitfalls and limitations…

  • Hallucinations
    • When it’s wrong, it’s confidently wrong!
  • Cutoff date
    • An LLM has no knowledge past its training date
    • Example: GPT 4.1 (April ’25) has knowledge up to June ‘24
  • COST!
    • 100 Million $$$ to develop!
    • Environmental considerations…
  • PRIVACY!
    • Please don’t put sensitive information in ChatGPT…
  • Lack of interpretability
  • Lack of provenance / attribution
  • Bias
  • ….

​

32

ANY SOLUTIONS?

33 of 67

Open-source LLMs: Llama, Mistral…

  • Usually come in various size, the smaller the cheaper to run, but less “smart”

👶 ~7B: inference can run on your laptop in acceptable time if you have a GPU

🧒 ~70B: requires a larger server for decent inference time (1 A100/H100)

🧠 ~400B: largest, requires custom supercomputers (~4 H100s or more)

​

  • Mixture-Of-Experts approaches such as Mixtral 8x7B or 8x22B combine multiple smaller models for better results with same hardware requirements

​

​

  • HuggingFace: the most comprehensive resource to find open-source models

33

34 of 67

Augmenting LLMs…

  • LLMs are much more powerful when augmented with tools, memory, datasets…
    • Tools = services (e.g. accessible via APIs)
    • How can LLMs discover these?
      • MCP (Model Context Protocol)
    • E.g. a PubMed MCP can enable searching PubMed literature (API) via LLM agents
    • …but more on this later!

34

LLM (Agent)

Tool (API)

MCP Server

35 of 67

Fine-tuning

36 of 67

  • Initially based on GPT3.5

​

  • A “chatty” version of LLM
    • Based on Instruction DataSet (small, e.g. 50K etc) – Alpaca Style Prompt Template

​

  • “Secret sauce”: Reinforcement Learning through Human Feedback (RLHF)

36

We trained an initial model using supervised fine-tuning: human AI trainers provided conversations in which they played both sides—the user and an AI assistant. We gave the trainers access to model-written suggestions to help them compose their responses. We mixed this new dialogue dataset with the InstructGPT dataset, which we transformed into a dialogue format.

​

37 of 67

Reinforcement Learning through Human Feedback

37

38 of 67

RLHF – an ongoing journey…

38

39 of 67

Crowdsourcing expertise?

39

40 of 67

40

41 of 67

Retrieval Augmented Generation (RAG)

  • Complement the base model with an external knowledge base

​

  • This can be:
    • PDFs
    • Structured Data
      • CSVs
      • Relational DBs
      • …
    • Images
    • ….

42 of 67

Why RAG?

43 of 67

Why RAG?

  • Always up-to-date information
  • Domain-specific / use case-specific data
  • Relevant data for a given query
  • ….

43

44 of 67

Second option: Fine-tuning a foundation model

  • Requires a dataset of examples in the style of “instructions”, input and output

​

​

​

​

​

​

​

​

​

​

​

​

​

  • Note: usually expensive to do

44

45 of 67

Part II. From Theory (Closer To) Practice

46 of 67

How can you use LLMs to explore biodata?

  • Directly ask questions (“zero-shot”)

​

  • Ask the LLM to formulate code (e.g. API calls) to answer questions

​

  • Provide relevant context & tools, then ask LLM to generate the answer
    • Structured and unstructured data (CSV files, PDFs)
    • scripts
    • API calls
    • etc

47 of 67

Ask LLM questions over biodata directly

48 of 67

“Cheating!”

Disable and

try again!

49 of 67

Asking chatGPT question directly (“zero-shot”)

50 of 67

“Back in the day”:

when it was wrong…it was confidently wrong

51 of 67

Nope!!

52 of 67

Warning: in general, asking LLMs specialized questions directly will likely lead to

hallucinated answers!

53 of 67

Recommended: Ask Model To Ask an API

54 of 67

Recommended: Ask Model To Ask an API

55 of 67

Problem: not all APIs are as well known as Uniprot’s

  • Solution: MCP servers as an interfaces (“adapters”) to APIs!
  • E.g. a PubMed MCP can enable searching PubMed literature (API) via LLM agents

56 of 67

Up next: Agentic Workflows

57 of 67

The future: The AI Scientist?

57

58 of 67

The future: Agentic Workflows?

58

Source: https://research.google/blog/accelerating-scientific-breakthroughs-with-an-ai-co-scientist/

59 of 67

The future: Agentic Research?

59

60 of 67

The future?

60

61 of 67

Question Answering over Structured Data

62 of 67

Expasy

63 of 67

64 of 67

Some Intermediate Conclusions…

  • The LLM space is constantly evolving…
    • Tasks that seemed hard 6 months ago are now solved
    • Powerful interfaces to both structured and unstructured data…
    • …but need to be adapted to your use case

​

  • Careful when using (especially) closed-source LLMs
    • Don’t use them for sensitive data!

​

  • Infrastructure is a problem
    • Self-hosted (requires GPUs) or hosting platforms (paid)
    • Small models are (clearly) less performant
    • But big models are expensive to host

64

65 of 67

References

​

65

66 of 67

Thank you!

DATA SCIENTISTS FOR LIFE

Ana-claudia.sima@sib.swiss

67 of 67

Part III. Hands-on: Setup

Install: uv, get (Mistral) API key