Skip to content
N Divij
Résumé
← All work

Case study · 2025 · TiDB AgentX

ElitOrc-AI

Clinical context is spread across scans, patient histories and published cases. ElitOrcAI is a multi-step agent: it analyzes an uploaded scan, searches 200+ anonymized MultiCaRe case reports in TiDB by vector similarity, and has Llama 3.3 70B write a structured assessment with a primary diagnosis, three differentials, a workup and red flags.

Result
Winner, Best Open Source Award Proof ↗
Built
2025, for TiDB AgentX
Stack
Mastra · TiDB Serverless · Groq (Llama 3.3 70B) · Cohere embeddings · Roboflow · Next.js · LibSQL
The hackathon demo. It loads only when you press play.

The problem

A medical chatbot that answers from memory gives a clinician nothing to check. Useful support has to combine the image, the history and comparable cases, and present its reasoning in a format a professional can review. It also has to assist the clinician, not stand in for one.

How it works

  1. 01Analyze the scan. A Roboflow model screens the uploaded X-ray, CT or MRI.
  2. 02Embed the case. Cohere embed-english-v3.0 turns symptoms and history into a 1024-dimension vector.
  3. 03Find similar cases. TiDB Serverless cosine search over anonymized MultiCaRe case reports.
  4. 04Reason. Llama 3.3 70B on Groq writes a structured clinical assessment.
  5. 05Ingest new cases. Novel cases are embedded and stored for future matching.

Key decisions

Force the full tool sequence

The agent did not always call every tool. I wrote mandatory workflow instructions so every image runs Roboflow analysis, then TiDB similarity search, then image analysis, in that order.

Real image data, not placeholders

The LLM was calling tools with placeholder text instead of the uploaded image. I made the agent pass the exact imageDataUri from the request context.

One fixed report format

Every assessment has the same structure: primary diagnosis with a confidence level, the top 3 differentials, recommended workup and treatment, red flags, and a professional-consultation disclaimer.

Vectors inside the SQL database

Cases live in one TiDB table with a VECTOR(1024) column and a vector index, so similarity search is a plain SQL query ordered by VEC_COSINE_DISTANCE.

Results

  • WinnerBest Open Source Award, TiDB AgentX Hackathon 2025
  • 200+anonymized MultiCaRe clinical cases indexed in TiDB
  • 3 toolsrun in a fixed order for every uploaded image

What's not done yet

Every report carries a professional-consultation disclaimer: it supports a clinician and does not replace one. The case base is 200+ anonymized MultiCaRe reports, and EHR integration and real-time alerts are on the roadmap, not built.

Next case studySpatialize →Checks a building route against one person's width, and says when it doesn't know.