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 Investigation Case Dossier Compiler with Evidence Provenance
Format
Code-aware
Lines
83
Sections
11
Linked challenge
Build an Investigation Case Dossier Compiler with Evidence Provenance
Prompt source
Original prompt text with formatting preserved for inspection.
83 lines
11 sections
No variables
1 code block
## Build
Compile structured investigative case files linking transactions, legal entity records, and open-source intelligence. Track data provenance timestamps and explicit evidentiary gaps to prepare defensible case summaries.
## User
Senior AML investigator
## Workflow
1. Assemble multiple evidence artifacts including normalized invoice rows, GLEIF entity extracts, and transaction hops.
2. Bind cryptographic hash signatures and source timestamps to every evidence item to preserve analytical provenance.
3. Identify disconnected hypothesis links where narrative claims lack supporting transaction artifacts.
4. Generate a finalized case preparation bundle with visual provenance graphs and missing evidence disclosures.
## Interface
Evidence binder workspace showing linked supporting documents, timestamped provenance breadcrumbs, and gap warnings.
## Data
Create 20 mock investigative cases containing heterogeneous evidence objects (PDF text extracts, JSON transaction records, LEI profiles).
Starter examples below are synthetic. They are not downloaded records.
## Source
[GLEIF API](https://www.gleif.org/en/lei-data/gleif-api)
Integrates GLEIF reference records and parent-child relationship models into structured case evidence collections.
## Tools
pydantic-ai, jinja2, cryptography.
Pydantic AI enforces rigorous provenance metadata schema validation across diverse evidence types.
Local or hosted LLM API used strictly to summarize linked evidence into factual briefing memos.
## 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
- Generates SHA-256 hash digests for all incorporated evidence artifacts.
- Automatically flags any narrative assertion that cannot be mapped to a recorded artifact ID.
- Exports a consolidated JSON case dossier compliant with standardized internal audit formats.
## Starter Examples
```json
[
{
"input": {
"case_id": "CASE-101",
"artifacts": [
{
"artifact_id": "ART-1",
"type": "GLEIF_RECORD",
"content": "LEI: 5493006MHB84DD0ZWV18, Apex Global Logistics Inc"
}
],
"narrative_assertions": [
{
"claim": "Apex Global Logistics Inc is a registered legal entity.",
"linked_artifact_id": "ART-1"
}
]
},
"expected_output": {
"provenance_verified": true,
"unsupported_claims": [],
"status": "READY_FOR_REVIEW"
}
},
{
"input": {
"case_id": "CASE-102",
"artifacts": [
{
"artifact_id": "ART-1",
"type": "TRANSACTION_ROW",
"content": "Transfer 50,000 USD from A to B"
}
],
"narrative_assertions": [
{
"claim": "Party B forwarded funds to Party C in offshore jurisdiction.",
"linked_artifact_id": null
}
]
},
"expected_output": {
"provenance_verified": false,
"unsupported_claims": [
"Party B forwarded funds to Party C in offshore jurisdiction."
],
"status": "EVIDENCE_GAPS_DETECTED"
}
}
]
```
## Safety
Assists analytical preparation of internal dossiers; forbids automated dispatch to external law enforcement or regulatory authorities.
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.