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 NCBI Gene Package Splice Form Curation Agent
Format
Code-aware
Lines
67
Sections
11
Linked challenge
Build an NCBI Gene Package Splice Form Curation Agent
Prompt source
Original prompt text with formatting preserved for inspection.
67 lines
11 sections
No variables
1 code block
## Build
Ingest gene packages downloaded via NCBI Datasets to evaluate eukaryotic transcript sequences. Validate coding coordinates and structure curated transcript metrics into FHIR DiagnosticReport payloads.
## User
Biocurator
## Workflow
1. Download gene data packages containing transcript and protein FASTA using NCBI Datasets CLI arguments.
2. Parse multi-FASTA headers and sequence strings with Biopython to extract open reading frames.
3. Format transcript boundary evaluations and translation lengths into structured validation records.
4. Map transcript findings into FHIR DiagnosticReport and Observation resources for biocuration review.
## Interface
Terminal command runner with browser-based split-view table displaying transcript alignments and FHIR JSON.
## Data
Download human gene package 672 via NCBI Datasets CLI sandbox using mock ZIP archives locally.
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/)
Uses NCBI Datasets CLI command options '--include gene,rna,cds,protein' to download multi-sequence zip archives.
## Tools
pydantic-ai, biopython, fastapi.
Validates structured schema objects representing transcript models before generating standard FHIR JSON payloads.
Hosted LLM API with structured function calling support or local open model via Ollama.
## 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
- Parses multi-sequence transcript FASTA files using Biopython without unhandled exception flags.
- Emits valid JSON strictly matching FHIR R5 DiagnosticReport and Observation resource shapes.
- Flags coding sequences missing valid ATG start codons or proper stop triplets.
## Starter Examples
```json
[
{
"input": {
"gene_id": 672,
"symbol": "BRCA1",
"fasta_record": ">NM_007294.4 Homo sapiens BRCA1 transcript variant 1\nATGGATTTATCTGCTCTTCGCGTTGAAGAAGTACAAAATGTCATTAATGCTATGCAGAAAATCTTAGAGTGTCCCATCTGTCTGGAGTTGATCAAGGAACCTGTCTCCACAAAGTGTGACCACATATTTTGCAAATTTTGCATGCTGAAACTTCTCAACCAGAAGAAAGGGCCTTCACAGTGTCCTTTATGTAAGAATGATATAACCAAAAGGAGCCTACAAGAAAGTACGAGATTTAGTCAACTTGTTGAAGAGCTATTGAAAATCATTTGTGCTTTTCAGCTTGACACAGGTTTGGAGTATGCAAACAGCTATAATTTTGCAAAAAAGGAAAATAACTCTCCTGAACATCTAAAAGATGAAGTTTCTATCATCCAAAGTATGGGCTACAGAAACCGTGCCAAAAGACTTCTTACAGAAAGTGAACCCAAAATCCTCATTTGA"
},
"expected_output": {
"curation_status": "valid",
"transcript_id": "NM_007294.4",
"cds_length_bp": 348,
"start_codon": "ATG",
"stop_codon": "TGA",
"in_frame": true,
"fhir_resource": "DiagnosticReport"
}
},
{
"input": {
"gene_id": 672,
"symbol": "BRCA1",
"fasta_record": ">NM_truncated Homo sapiens BRCA1 incomplete\nCCATCTGTCTGGAGTTGATCAAGGAACCTGTCTCCACAAAGTGTGACCACATATTTTGC"
},
"expected_output": {
"curation_status": "flagged",
"transcript_id": "NM_truncated",
"cds_length_bp": 60,
"start_codon": "CCA",
"stop_codon": "TGC",
"in_frame": false,
"fhir_resource": "DiagnosticReport"
}
}
]
```
## Safety
Synthetic and de-identified NCBI public reference data only; non-diagnostic curation sandbox without patient health identifiers.
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.