Skip to main content
Back to Prompt Library
implementation

Build the application

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: Build an Evidence Review RAG Agent for Gene Function Publications

Format
Code-aware
Lines
68
Sections
11
Linked challenge
Build an Evidence Review RAG Agent for Gene Function Publications

Prompt source

Original prompt text with formatting preserved for inspection.

68 lines
11 sections
No variables
1 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.

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Hold the task contract and output shape stable so generated implementations remain comparable.

Tune next

Update libraries, interfaces, and environment assumptions to match the stack you actually run.

Verify after

Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.