Challenge

Build a Real-Time Clearing Risk Engine using LlamaIndex RAG Framework

Real-time clearing facilities face high-throughput risk exposure and liquidity shocks during volatile market events. Build a LlamaIndex RAG-powered agent framework to query stream telemetry, compute capital adequacy metrics, and recommend real-time margin dynamic adjustments. Deliver an automated risk management agent executing evaluations in under 500ms with high operational accuracy.

CybersecurityHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Develop an agentic RAG solution with LlamaIndex to query clearing balance history and dynamically evaluate liquidity risk limits in post-trade settlement pipelines.

Delivery guide

How work is evaluated

Evaluation

Evaluates the RAG agent's margin call recommendations against standard clearinghouse capital adequacy formulas.

Datasets

Shared data for this challenge

Review public datasets and any private uploads tied to your build.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
2 scoring checks
Binary
2 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

margin_call_boolean_check

Verifies margin call requirement trigger threshold logic

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

calculation_accuracy

Accuracy of additional collateral calculation within 1% tolerance • target: 0.98 • range: 0-1

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

  • Build a LlamaIndex vector store index over historical clearing firm ledger records

  • Construct a LlamaIndex AgentRunner for dynamic margin risk query processing

  • Calculate real-time capital margin calls based on volatility spikes

  • Implement low-latency streaming retrieval for real-time clearing alerts

Resources and assets

Reference links and supporting material

Dataset notes

Dataset of 300 clearing member exposure snapshots with associated historical volatility indices.

How this agent runs

Evaluates the RAG agent's margin call recommendations against standard clearinghouse capital adequacy formulas.

Challenge input

JSON containing member_id, current_exposure_usd, collateral_on_file_usd, volatility_index

LlamaIndex

Provides structured document indexing and tool-enabled agent runners.

Evaluated output

JSON with margin_call_required, required_additional_collateral_usd, risk_category

Checks for
  • Verifies margin call requirement trigger threshold logic
  • Accuracy of additional collateral calculation within 1% tolerance • target: 0.98 • range: 0-1
Proof of success
  • Benchmark: Clearing Risk Analytics Benchmark
  • Calculation Accuracy target: 0.98
  • 1 public reference case
Runtime evidence
  • Python execution harness
  • Python sandbox (unavailable on Versalist)
View technical recipe

Configured tools

Action Space
  • Llama Index · Required
  • LlamaIndex · Optional
  • Llama 3.2 · Optional

Evaluation contract

  • margin_call_boolean_check · Weight 1
  • calculation_accuracy · Weight 1

Recipe state

This is a preview. The configuration can change before the evaluation recipe is locked.

Frequently Asked Questions about Build a Real-Time Clearing Risk Engine using LlamaIndex RAG Framework