Back to prompt library
Build an Evidence Review RAG Agent for Gene Function Publications — implementation
Linked challenge: Build an Evidence Review RAG Agent for Gene Function Publications
Prompt source
implementation68 lines11 sectionsNo variables1 code block
## Build
Extract gene identifiers and functional citations from research reports using NCBI gene packages. Search scientific summaries using Haystack to compile evidence matrices for biocuration teams.
## User
Scientific Evidence Reviewer
## Workflow
1. Ingest gene data reports and functional accession lists from NCBI Datasets packages.
2. Chunk and index accompanying literature abstracts in Haystack document stores.
3. Retrieve relevant experimental evidence for specific gene-protein pairings.
4. Synthesize an evidence summary table with provenance links for curator verification.
## Interface
Multi-pane web interface showing source literature abstracts, matched accessions, and synthesized notes.
## Data
Use open-access PubMed Central articles matching NCBI gene IDs from public datasets download gene packages.
Starter examples below are synthetic. They are not downloaded records.
## Source
[NCBI Datasets gene download](https://www.ncbi.nlm.nih.gov/datasets/docs/v2/how-tos/genes/download-gene-data-package/)
Relies on NCBI Datasets gene data report metadata containing gene IDs, symbols, and accession cross-references.
## Tools
haystack, biopython, fastapi.
Haystack provides modular retrieval-augmented generation pipelines tailored for document search and evidence synthesis.
Hosted or local model supporting document QA via Haystack OpenAIGenerator or OllamaGenerator.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- Extracts gene symbols and accessions from NCBI Datasets gene report JSON.
- Haystack retrieval pipeline returns relevant abstracts with similarity scores.
- Generates structured evidence summaries citing source document identifiers.
## Starter Examples
```json
[
{
"input": {
"gene_symbol": "ACRV1",
"literature_chunks": [
{
"id": "art-1",
"text": "ACRV1 encodes the acrosomal vesicle protein 1 expressed in human testis."
}
]
},
"expected_output": {
"gene_symbol": "ACRV1",
"matched_functions": [
"acrosomal vesicle protein 1 expression"
],
"evidence_citations": [
"art-1"
],
"curation_status": "CONFIRMED"
}
},
{
"input": {
"gene_symbol": "XYZ1",
"literature_chunks": []
},
"expected_output": {
"gene_symbol": "XYZ1",
"matched_functions": [],
"evidence_citations": [],
"curation_status": "INSUFFICIENT_EVIDENCE"
}
}
]
```
## Safety
Research literature curation tool with human-in-the-loop review; does not generate diagnostic advice.
Use mock external writes. Require human review before any real deployment.