Bio Research Lookup
Search scientific literature across PubMed, Semantic Scholar, bioRxiv/medRxiv, ClinicalTrials.gov, and OpenAlex.
Step 0 — Pre-flight: interpret and clarify the query
Before any API calls, parse the user's intent and reformulate it as a scientific search query.
Always show this block first:
🔍 Понял как: **[научная формулировка на русском]**
Термины для поиска: `term1 term2 term3`
Then decide:
| Condition | Action |
|---|---|
| Direct PMID / DOI / URL provided | Skip Step 0 entirely — go straight to Step 2 |
| Query already uses scientific terms | Show interpretation block, proceed immediately |
| Query is clear and unambiguous | Show interpretation block, proceed immediately |
| Query is vague, multi-topic, or ambiguous | Show interpretation block + ask clarifying question, wait for user reply |
When to ask a clarifying question (append after the interpretation block):
- Query contains multiple unrelated topics (
"кофе, алкоголь и сон"→ ask: "Это три отдельных поиска или вас интересует их совместное влияние?") - Term is polysemous (
"стресс"→ ask: "Психологический стресс, физиологический (кортизол, HPA), или оба?") - Scope unclear (
"витамин D"→ ask: "Вас интересует дефицит, дозировка, конкретное заболевание?") - Mechanism vs. clinical evidence unclear → ask which is needed
When NOT to ask — just proceed:
- PMID / DOI / link
- Already contains MeSH or scientific terms
- Clear causal question (
"интервальное голодание и инсулинорезистентность") - User already specified study type (
"найди мета-анализы про...")
Reformulation examples:
| User query | Scientific formulation | Search terms |
|---|---|---|
| "алкоголь и похудение" | Влияние потребления алкоголя на массу тела | alcohol consumption body weight adiposity |
| "пробиотики от депрессии" | Эффект пробиотиков на симптомы депрессии | probiotics depression mood mental health |
| "кофе вреден для сердца?" | Связь кофеина с сердечно-сосудистыми заболеваниями | coffee caffeine cardiovascular risk |
| "таблетки от бессонницы" | Фармакологическое лечение инсомнии | pharmacological treatment insomnia |
| "правда ли что сахар вызывает рак" | Связь потребления сахара с онкологическими заболеваниями | sugar intake cancer risk |
Step 1 — Translate query to English
All APIs are English-only. After Step 0 clarification, translate the final search terms.
Examples:
- "интервальное голодание" → "intermittent fasting"
- "микробиом кишечника" → "gut microbiome"
- "клинические испытания метформина" → "metformin clinical trials"
Use the translated English terms for all API calls below.
Step 2 — Classify and pick platform(s)
| Query type | Platform |
|---|---|
| General question ("does X help with Y?", "evidence for...") | Semantic Scholar |
| Clinical trials, RCTs, systematic reviews, medical/disease | PubMed |
Direct PMID provided (PMID: 12345678) | PubMed fetch |
| Latest preprints in biology or medicine | bioRxiv / medRxiv |
| Psychology, neuroscience, cognitive science, behavior | Semantic Scholar |
Direct DOI provided (e.g. 10.1101/...) | bioRxiv API |
| "Clinical trials", "ongoing trial", "phase 3", "испытания" | ClinicalTrials.gov |
| Broad topic — use both | PubMed + Semantic Scholar |
Platform Instructions
Semantic Scholar (broad search, psychology, health questions)
Search:
GET https://api.semanticscholar.org/graph/v1/paper/search?query={URL_ENCODED_QUERY}&fields=title,abstract,tldr,year,authors,citationCount,venue&limit=5
By paper ID (S2 ID or DOI):
GET https://api.semanticscholar.org/graph/v1/paper/{ID}?fields=title,abstract,tldr,year,authors,citationCount,externalIds
- Response includes
tldr.text— a 1-sentence AI summary. Prefertldr.textover abstract when available. citationCountindicates paper influence — highlight highly cited papers- If response is 429 (rate limit) → fall back to OpenAlex (see below), then PubMed
OpenAlex (fallback for Semantic Scholar, 250M+ papers)
Use when Semantic Scholar returns 429 or empty results.
GET https://api.openalex.org/works?search={URL_ENCODED_QUERY}&per-page=5&select=title,abstract_inverted_index,publication_year,authorships,cited_by_count,primary_location&mailto=research@example.com
abstract_inverted_indexis an inverted index — reconstruct the abstract by sorting keys by their position values:{ "word": [pos1, pos2], ... } → sort all (word, pos) pairs by pos → join wordsprimary_location.source.display_name= journal nameauthorships[0].author.display_name= first author
PubMed (medical, clinical, NIH database)
Step 1 — Search for PMIDs:
GET https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term={URL_ENCODED_QUERY}&retmax=5&retmode=json&tool=claude-skill&email=research@example.com
To prioritize high-quality evidence, append publication type filters:
- Meta-analyses: add
+AND+Meta-Analysis[pt] - RCTs: add
+AND+Randomized+Controlled+Trial[pt] - Reviews: add
+AND+Review[pt]
Step 2 — Fetch abstracts by PMID(s):
GET https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id={COMMA_SEPARATED_PMIDS}&rettype=abstract&retmode=text&tool=claude-skill&email=research@example.com
- If direct PMID provided, skip Step 1 and go straight to efetch
- Response is plain text. Look for
PTlines (Publication Type) to extract study type for badges (see Step 4)
bioRxiv / medRxiv (preprints)
By DOI:
GET https://api.biorxiv.org/details/{server}/{DOI}/na
Where {server} = biorxiv or medrxiv
Recent papers by date range:
GET https://api.biorxiv.org/details/{server}/{YYYY-MM-DD}/{YYYY-MM-DD}
Filter by category: append ?category={topic} (e.g. neuroscience, cell_biology, epidemiology)
Response is JSON with abstract field in each item.
ClinicalTrials.gov (active and completed clinical trials)
Use when user asks about trials, ongoing studies, drug testing, or phase 1/2/3.
GET https://clinicaltrials.gov/api/v2/studies?query.term={URL_ENCODED_QUERY}&pageSize=5&format=json
Key fields from response (studies[].protocolSection):
identificationModule.nctId→ trial ID (e.g. NCT04727359)identificationModule.briefTitle→ trial namestatusModule.overallStatus→ Recruiting / Completed / Active, not recruitingdesignModule.phases→ ["PHASE2", "PHASE3"]descriptionModule.briefSummary→ short descriptionstatusModule.startDateStruct.date→ start date
Trial link: https://clinicaltrials.gov/study/{NCTId}
Step 3 — Fetch and parse results
Extract from whichever platform(s) used:
- Title
- Authors (first author + et al.)
- Year / date
- TLDR or abstract summary
- Citation count (if available)
- Publication type (for badge)
- Link to paper / trial
Step 4 — Present results
Study type badge (from PubMed PT field or inferred):
| Publication Type | Badge |
|---|---|
| Meta-Analysis | 📊 Мета-анализ |
| Randomized Controlled Trial | 🔬 РКИ |
| Systematic Review | 📋 Систематический обзор |
| Review | 📖 Обзор |
| Clinical Trial | 🏥 Клиническое испытание |
| Preprint | 📄 Препринт |
| Other | 🧪 Исследование |
Paper format:
## [Badge] [Title] (Year)
**Авторы:** First Author et al.
**Журнал:** Journal/venue
**Цитирований:** N
[tldr.text if available — otherwise 2-3 sentence summary of key findings]
🔗 Link
ClinicalTrials format:
## 🏥 [Trial Title]
**Статус:** Recruiting / Completed / Active
**Фаза:** Phase 2 / Phase 3
**Начало:** Date
[Brief summary 1-2 sentences]
🔗 https://clinicaltrials.gov/study/{NCTId}
If multiple results, list top 3–5 ranked by relevance and citation count.
After listing papers — add synthesis block:
---
## Что говорит наука
[2-4 sentences synthesizing the overall evidence: is there consensus or conflict,
what is the effect size / str