Transformers quickstart
Step-by-step guide to extracting biomedical entities from text with transformer models on the platform.
You want to pull drugs, genes, and diseases out of scientific text; this walks you through named entity extraction from a PubMed abstract in a few steps — pick the tool, supply your text, and read the entities back.
Quick entity extraction with .bloom* platform
The Transformers tool uses domain-specific models like BioBERT and PubMedBERT to extract drugs, genes, diseases, and other biomedical entities from scientific text. This guide walks through extracting entities from a PubMed abstract.
Step-by-step NER workflow
Access the Transformers tool
Navigate to Transformers in the .bloom* tool selector, or ask Ivy directly:
- "Extract entities from this PubMed abstract"
- "Run NER on this text using BioBERT"
Prepare your text input
Option A: Direct text entry (fastest)
- Paste an abstract or paragraph into the text input field
- Example: "Gefitinib, an EGFR tyrosine kinase inhibitor, showed significant activity in non-small cell lung cancer patients with EGFR mutations."
Option B: PubMed lookup
- Enter one or more PubMed IDs (e.g.,
PMID:12345678) - .bloom* fetches the abstract text automatically
Option C: File upload
- Upload a text file with one document per line
- Or upload a CSV with a text column
Option D: From previous jobs
- Import text from literature search or web search results
Configure the NLP task
Basic settings (recommended for first run):
- Task: Named Entity Recognition (NER) - extracts entity mentions and types
- Model: PubMedBERT (best accuracy for PubMed text)
- Keep default entity types (Drug, Gene, Disease, Chemical)
Advanced settings (via gear icon):
- Task: Choose NER, Text Classification, Zero-Shot Classification, Question Answering, Summarization, or Embedding Generation
- Model: Enter a Hugging Face model ID — BioBERT, PubMedBERT, SciBERT, ChemBERTa, and BioGPT are common biomedical choices
- Entity types: Select which entity types to extract (Drug, Gene, Disease, Chemical, Mutation, Cell Line)
- Confidence threshold: Minimum confidence for entity recognition (default: 0.5)
Submit and monitor the job
- Click Extract Entities (or the appropriate action for your selected task)
- .bloom* shows real-time progress through tokenization and inference
- Typical completion: 5-15 seconds per abstract
- Batch processing handles multiple documents in parallel
Review and analyze results
NER results:
- Annotated text with highlighted entities color-coded by type
- Entity table listing each mention with type, span, and confidence score
- Entity frequency summary showing the most frequently mentioned entities
Text classification results (if selected):
- Predicted class label with confidence
- Class probability distribution across all categories
Question answering / summarization results (if selected):
- Extracted answer span or generated summary, with a confidence score for QA
Embedding results (if selected):
- Dense vector representation of the input text
- Similarity scores if comparing multiple documents
Download options:
- JSON: Structured entity annotations with positions and confidence
- CSV: Entity table with columns for text, type, start, end, and score
- Annotated text: HTML with highlighted entities
Common NLP scenarios
Single abstract analysis
- Paste an abstract about your target or therapeutic area
- Run NER to extract all mentioned entities
- Review the entity frequency table for key players
- Use extracted entities to inform database searches (UniProt, PubChem)
Batch literature mining
- Collect 50-100 PubMed IDs on a topic of interest
- Run NER on all abstracts in batch mode
- Aggregate entity frequencies across all abstracts
- Identify the most frequently mentioned genes, drugs, and diseases
- Build an entity co-occurrence network for knowledge discovery
Drug-target interaction extraction
- Select NER as the task and run it on abstracts mentioning drug-target relationships
- Review the co-occurring drug and gene/protein entities in each abstract
- Use question answering (e.g., "what does gefitinib inhibit?") to pull out the specific relationship in context
- Feed confirmed interactions into Target Passport for validation
Document similarity clustering
- Select Embedding Generation as the task
- Input a collection of abstracts or documents
- Download per-document embeddings
- Cluster documents by embedding similarity
- Identify thematic groups for systematic review
Quality control checklist
Before submission
- Text is in English biomedical language
- Documents are within the 512-token limit (or will be chunked)
- Selected model matches the text domain (PubMedBERT for PubMed, ChemBERTa for chemistry)
- Appropriate task selected (NER, RE, Classification, or Embedding)
After extraction
- Extracted entities are recognized and correctly typed
- Confidence scores are reasonable (most entities above threshold)
- Entity boundaries are correct (no partial words or merged entities)
- Known entities in the text are captured (spot-check)
Next steps after extraction
Knowledge integration:
- Use extracted gene names to query UniProt for protein information
- Use extracted drug names to query PubChem for chemical structure
- Feed entity lists into Target Passport or Compound Passport for enrichment
Literature analysis:
- Build entity co-occurrence matrices for relationship discovery
- Track entity mention frequency over time for trend analysis
- Cluster documents by semantic similarity using generated embeddings
Pipeline automation:
- Chain Transformers with PubMed search for automated literature monitoring
- Feed extracted entities into database lookup tools for structured data enrichment
- Build custom literature intelligence pipelines for ongoing project support
Read next
Was this page helpful?