Skip to main content
Challenge

Multimodal Macro-Reasoning RAG for Colonoscopy Analysis with LlamaIndex and Together AI

Standard RAG systems often fail on complex technical documents like medical reports because they focus on 'micro-matching' (finding specific text chunks) while ignoring 'macro-reasoning' (understanding the overall procedural context). Inspired by the 'DualG-MRAG' and colonoscopy foundation model research, this challenge requires you to build a multimodal RAG pipeline using LlamaIndex. You will implement a dual-graph approach where one graph tracks the high-level medical procedure (macro) and the other handles specific visual/textual findings (micro). You will use Together AI's high-speed inference for Llama 3.2 Vision to process both medical imagery and textual routine reports.

Computer VisionHosted by Vera
Challenge brief

What you are building

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

Build a Decoupled Macro-Reasoning and Micro-Matching RAG pipeline for medical diagnostics using LlamaIndex and Together AI.

Delivery guide

How work is evaluated

Evaluation

The system must accurately identify the 'withdrawal phase' findings across 5 different colonoscopy reports, correctly linking visual polyp images to the textual size description.

Datasets

Challenge datasets

Public datasets, plus the private datasets you have access to.

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

Phase Alignment

Fails if findings from the 'Insertion' phase are misattributed to 'Withdrawal'.

Binary check

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

Dimension 2

Retrieval Precision

Percentage of retrieved chunks that are clinically relevant. • target: 0.88 • 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

  • Implement the DualG-MRAG architecture (Macro-Reasoning vs Micro-Matching) within LlamaIndex

  • Process and embed multimodal data (images and text) using Together AI inference

  • Construct a procedural knowledge graph to represent medical workflows (e.g., colonoscopy stages)

  • Develop a query-routing logic that decides when to use global procedural context versus local chunk retrieval

  • Optimize retrieval accuracy for high-stakes medical report grounding

Resources and assets

Reference links and supporting material

Dataset notes

Dataset of 280,000 anonymized colonoscopy routine reports and a subset of visual frames from procedures.

Challenge setup

The system must accurately identify the 'withdrawal phase' findings across 5 different colonoscopy reports, correctly linking visual polyp images to the textual size description.

Challenge input

Zip file containing 10 images and 5 report PDFs.

LlamaIndex

Expertly handles the dual-graph retrieval and multimodal indexing required for medical data.

Together AI

Provides low-latency access to large vision-language models for procedural analysis.

Evaluated output

Structured Diagnostic Summary (JSON).

Evaluation checks
  • Fails if findings from the 'Insertion' phase are misattributed to 'Withdrawal'.
  • Percentage of retrieved chunks that are clinically relevant. • target: 0.88 • range: 0-1
Configured evaluation evidence
  • Benchmark: Med-RAG Benchmark
  • Retrieval Precision target: 0.88
  • 1 public reference case
Configured runtime
  • Docker execution harness
  • Python sandbox (unavailable on Versalist)

Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.

View technical recipe

Configured tools

Environment
  • Modal · Optional
Action Space
  • RAI · Required
  • Llama Index · Optional
Policy Serving
  • Modal · Optional

Evaluation contract

  • Phase Alignment · Weight 1
  • Retrieval Precision · Weight 1

Metrics

  • Retrieval Precision · Target 0.88

Benchmarks

  • Med-RAG Benchmark
  • biotech

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: Zip file containing 10 images and 5 report PDFs.

    Output: Structured Diagnostic Summary (JSON).

    Execution harness: Docker

Evaluation tools

  • LlamaIndex · Data Framework
  • Together AI · Inference Engine

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Multimodal Macro-Reasoning RAG for Colonoscopy Analysis with LlamaIndex and Together AI