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 a Semantic Nominee Disclosure Vector Profiler
Format
Code-aware
Lines
63
Sections
11
Linked challenge
Build a Semantic Nominee Disclosure Vector Profiler
Prompt source
Original prompt text with formatting preserved for inspection.
63 lines
11 sections
No variables
1 code block
## Build
Embed narrative corporate ownership disclosures using Qdrant vector databases to uncover semantically clustered nominee director behaviors and hidden proxy arrangements. Map textual similarities in beneficial ownership filings to isolate coordinated offshore networks.
## User
Financial Crime Intelligence Analyst
## Workflow
1. Extract narrative ownership disclosures and beneficial ownership identifiers from unstructured corporate filings.
2. Generate vector embeddings for the parsed director narratives using a hosted embedding model.
3. Index the document embeddings in Qdrant and execute nearest-neighbor queries to find tight semantic clusters.
4. Calculate similarity ratios based on shared keywords and generate a clustered risk dossier for coordinated proxy networks.
## Interface
A search interface with a similarity threshold slider and an expandable list of clustered corporate disclosures.
## Data
Synthetic JSON datasets containing fictional offshore corporate disclosure narratives and simplified corporate identifiers.
Starter examples below are synthetic. They are not downloaded records.
## Source
[Beneficial ownership modelling](https://standard.openownership.org/en/latest/standard/modelling/index.html)
Uses BODS v0.4 modelling principles for nominee arrangements as the foundational schema for structuring the resulting clustered risk entities.
## Tools
qdrant, pydantic-ai, fastapi, pandas.
Qdrant stores and compares dense vector embeddings of corporate profile texts to uncover semantic clustering of recurring nominee directors.
Access to an embedding model to vectorize unstructured corporate texts, plus a lightweight LLM for initial extraction.
## 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 and chunks unstructured narrative disclosures into embeddable text segments.
- Indexes vectorized text into Qdrant and successfully retrieves documents exceeding a defined semantic similarity threshold.
- Calculates a similarity score derived from the ratio of shared narrative keywords and produces a valid JSON dossier.
## Starter Examples
```json
[
{
"input": {
"record_type": "simplified synthetic app record",
"statement_id": "bods-stmt-101",
"total_narrative_keywords": 10,
"shared_cluster_keywords": 9
},
"expected_output": {
"statement_id": "bods-stmt-101",
"cluster_match": true,
"similarity_score": 0.9,
"risk_flag": "HIGH_PROXY_RISK"
}
},
{
"input": {
"record_type": "simplified synthetic app record",
"statement_id": "bods-stmt-102",
"total_narrative_keywords": 20,
"shared_cluster_keywords": 2
},
"expected_output": {
"statement_id": "bods-stmt-102",
"cluster_match": false,
"similarity_score": 0.1,
"risk_flag": "LOW_RISK"
}
}
]
```
## Safety
Outputs are probabilistic similarities based on text overlap, intended for human review without automated legal or SAR determinations.
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.