Build a Clearinghouse Real-Time Risk Exposure RAG Engine with LlamaIndex
Securities clearinghouses handling billions in daily trade volume need continuous vector-indexed risk policy enforcement. Build an advanced RAG query and tool-calling agent using LlamaIndex to query margin liquidity rules and assess broker-dealer clearing exposure. Achieve sub-second retrieval with 96% context relevance across complex clearinghouse handbooks.
What you are building
The core problem, expected build, and operating context for this challenge.
Construct an advanced LlamaIndex RAG agent to evaluate broker-dealer clearing collateral exposure against clearinghouse rulebooks.
How work is evaluated
Evaluate retrieval precision and margin deficit calculation accuracy.
Shared data for this challenge
Review public datasets and any private uploads tied to your build.
How submissions are scored
These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.
Correct Deficit Calculation
Ensure margin_call_issued triggers when required margin exceeds cash collateral.
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
Context Precision
Precision of retrieved regulatory text context. • target: 0.96 • range: 0-1
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
What you should walk away with
Build a hierarchical vector index using LlamaIndex over complex clearinghouse rulebooks
Implement LlamaIndex QueryEngine tools to calculate dynamic margin maintenance calls
Validate broker-dealer clearing account capital adequacy under high-volatility stress scenarios
Ensure context retrieval accuracy with zero hallucinated policy citations
Reference links and supporting material
Synthetic dataset of 300 clearinghouse risk manual sections paired with 1,000 broker capital telemetry frames.
How this agent runs
Evaluate retrieval precision and margin deficit calculation accuracy.
Challenge input
JSON containing broker_id, cash_collateral, equity_exposure, and market_volatility_index.
LlamaIndex
Offers specialized indexing and retrieval primitives for complex structured documents.
Evaluated output
JSON containing margin_required, margin_call_issued (boolean), and cited_rule_section.
- Ensure margin_call_issued triggers when required margin exceeds cash collateral.
- Precision of retrieved regulatory text context. • target: 0.96 • range: 0-1
- Benchmark: FinRAGBench
- Context Precision target: 0.96
- 1 public reference case
- Python execution harness
- Python sandbox (unavailable on Versalist)
View technical recipe
Configured tools
- Llama Index · Required
- LlamaIndex · Optional
- Llama 3.2 · Optional
Evaluation contract
- Correct Deficit Calculation · Weight 1
- Context Precision · Weight 1
Recipe state
This is a preview. The configuration can change before the evaluation recipe is locked.