Add field guide and few-shot examples to extraction prompt.
Codex+1: Codex
11adb6c
Clarify how markers, values, units, and flags should be formatted so the vision model produces consistent structured lab rows.
Co-authored-by: Codex <chatgpt-codex-connector[bot]@users.noreply.github.com>
Default extraction to the fine-tuned MiniCPM-V Hub checkpoint.
Codex+1: Codex
c1a5fb4
Point DEFAULT_HF_REPO at build-small-hackathon/blood-test-minicpmv-4_6-medreason so local runs and the Space use our MedReason SFT model without extra env vars.
Co-authored-by: Codex <chatgpt-codex-connector[bot]@users.noreply.github.com>
Remove dead chat code and obsolete planning docs.
Drop unwired results chat, hosted API extractor, experimental medreason script, and stale markdown. Trim interpretation rendering to patterns_html only and make model path tests cache-independent.
Co-authored-by: Codex <chatgpt-codex-connector[bot]@users.noreply.github.com>
Expand lab knowledge graph to 107 markers with curated YouTube videos.
Codex
797f2cf
Add marker video catalog and expansion script so all canonical markers resolve in the graph; improve trace panel interactions and llama.cpp vision extraction paths; update deployment docs and tests.
Lock trace steps until extraction completes and simplify step headers.
Steps stay title-only and non-interactive during upload/processing, then become expandable after analysis. Remove status badges from headers and fix trace body padding.
Co-authored-by: Codex <chatgpt-codex-connector[bot]@users.noreply.github.com>
Polish trace steps and add marker video embeds to reports.
Simplify collapsed step headers, expand steps on hover, embed related
YouTube videos in marker cards, and extend the CBC knowledge graph with
video_url metadata. Codex collaborated on the trace UX and report UI.
Co-authored-by: Codex <chatgpt-codex-connector[bot]@users.noreply.github.com>
Co-authored-by: Codex <chatgpt-codex-connector[bot]@users.noreply.github.com>
Make agent pipeline steps easier to understand in plain language.
Lead each trace step with a short explanation and run summary, and move
status metrics, prompts, and previews into collapsible technical sections.
Codex collaborated on the trace UX copy and layout.
Co-authored-by: Codex <chatgpt-codex-connector[bot]@users.noreply.github.com>
Co-authored-by: Codex <chatgpt-codex-connector[bot]@users.noreply.github.com>
Polish section 3 trace panel and Space startup reliability.
Show pending pipeline steps before analysis starts, simplify the trace
header copy, suppress Gradio asyncio log noise, and extend ZeroGPU time
for first model download plus inference. Codex collaborated on these UI
and deployment updates.
Co-authored-by: Codex <chatgpt-codex-connector[bot]@users.noreply.github.com>
Co-authored-by: Codex <chatgpt-codex-connector[bot]@users.noreply.github.com>
Add agent trace panel, vision extraction, and local Transformers backend.
Replace chat preview with a scrollable pipeline trace, restore PDF/image
vision intake, default to local Transformers extraction, expand the marker
knowledge base, and track hackathon logo assets for deployment. Codex
collaborated on the trace UI, vision pipeline, and deployment workflow.
Co-authored-by: Codex <chatgpt-codex-connector[bot]@users.noreply.github.com>
Co-authored-by: Codex <chatgpt-codex-connector[bot]@users.noreply.github.com>
feat: surface cross-marker patterns in the report UI
Codex
5645fc6
Adds patterns_html() (anemia picture, liver cluster, lipid risk, kidney, thyroid, glycemic) and appends it below the per-marker knowledge-graph report, adding cross-marker reasoning without duplicating the existing per-marker insights. Renders nothing when no pattern applies.
feat: interpretation render layer (markdown + HTML cards) for the UI
Codex
226ba4a
Renders the grounded Interpretation (marker cards with notes + doctor-questions + cross-marker patterns + disclaimer) as Markdown or styled HTML for a gr.Markdown/gr.HTML. Presentation only; all facts come from the KB-grounded interpretation engine.
feat: robust marker-name matching + cleaned real training labels
Codex
6686bd2
- markers.resolve: normalize lab qualifiers/punctuation/word-order/British spelling and split slash/comma-joined names so real-report variants (Serum Sodium, Total WBC Count / TLC, Haemoglobin (Hb), PCV / Hematocrit, S. TSH, FBS) resolve. Raises true + measured extraction accuracy with no retraining and surfaces more interpretation cards.
- eval/data/real/labels_train.jsonl: cleaned canonical real labels for the fine-tune mix-in.
- modal_finetune: lower LR (2e-5) + warmup, 1 epoch, tunable hyperparams; re-runnable merge.
- synth_reports: section-grouped/varied layouts + ref-range/theme/demographic diversity to fix overfitting that regressed real-report extraction.
- modal_eval: Modal before/after eval (base vs fine-tuned) on the labeled reports.
- kb/knowledge_base + interpretation: grounded per-marker insight + cross-marker patterns (Phase 3).
feat: working Modal LoRA fine-tune + llama.cpp-on-ZeroGPU backend
Codex
c3071ca
- modal_finetune: fix image deps + ms-swift 4.x CLI; pull weights from HF (USE_HF) instead of the slow ModelScope mirror; raise timeout to 6h. Full --n 4000 run trains and saves adapters.
- add EXTRACTOR_BACKEND=llamacpp-gpu backend (llama.cpp on ZeroGPU) for the Llama Champion badge; inert under the default zerogpu path.
- optional 4-bit NF4 load for the Transformers path (ZEROGPU_QUANTIZE), lower VRAM.
LocalServerExtractor POSTs to a local llama-server with thinking disabled (works for
MiniCPM-V 4.6, which llama-cpp-python's bundled llama.cpp is too old to load). The parser
now strips <think> blocks and accepts a bare JSON array. EXTRACTOR_BACKEND=local routes to
the server backend. Ignore models/ and *.gguf.