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 Automated Biopython FASTA Cleanser and Langfuse Telemetry Monitor
Format
Code-aware
Lines
72
Sections
11
Linked challenge
Build an Automated Biopython FASTA Cleanser and Langfuse Telemetry Monitor
Prompt source
Original prompt text with formatting preserved for inspection.
72 lines
11 sections
No variables
1 code block
## Build
Process multi-fasta uploads to detect contaminated reads, low complexity regions, and non-IUPAC bases. Track preprocessing latency and data drift using Langfuse operational telemetry.
## User
Bioinformatics Pipeline Engineer
## Workflow
1. Stream FASTA records through Biopython SeqIO sequence parser.
2. Validate nucleotide characters against IUPAC standards and strip terminal adapter contamination.
3. Record pipeline latency, input sizes, and rejection rates into Langfuse traces.
4. Save sanitized sequences into an archive ready for downstream research pipelines.
## Interface
Dashboard displaying processing metrics, invalid sequence alerts, and export options.
## Data
Generate synthetic multi-FASTA files with injected IUPAC anomalies, adapter dimers, and valid nucleotides.
Starter examples below are synthetic. They are not downloaded records.
## Source
[Biopython](https://raw.githubusercontent.com/biopython/biopython/master/README.rst)
Uses Biopython's sequence parsing and alphabet validation facilities to inspect nucleotide strings.
## Tools
langfuse, biopython, fastapi.
Langfuse enables detailed operational trace tracking, error monitoring, and step-level latency visualization.
Lightweight model for generating human-readable sequence error categorization prompts.
## 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
- Accurately flags non-standard IUPAC characters in raw sequences.
- Emits traces to Langfuse containing token count, character counts, and step latencies.
- Provides clean sanitized FASTA outputs for valid records.
## Starter Examples
```json
[
{
"input": {
"batch_id": "BATCH-01",
"records": [
{
"id": "read1",
"seq": "ATCGGCTA"
}
]
},
"expected_output": {
"batch_id": "BATCH-01",
"passed_records": 1,
"failed_records": 0,
"langfuse_trace_logged": true
}
},
{
"input": {
"batch_id": "BATCH-02",
"records": [
{
"id": "read2",
"seq": "ATC123Z$$"
}
]
},
"expected_output": {
"batch_id": "BATCH-02",
"passed_records": 0,
"failed_records": 1,
"error_reasons": [
"Invalid non-IUPAC characters"
],
"langfuse_trace_logged": true
}
}
]
```
## Safety
Standard pre-processing tool for FASTA files; completely devoid of protected health information.
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.