ChartForge

Generation arms

Classic · flat · modern · BASE · models & pipelines

/arms

Generation arms

Four comparable paths for transcript→SOAP: classic CAT hierarchy, flat direct-prompt, modern hierarchical live generation, and a Together BASE control. Model ids below match the code defaults; env vars override at runtime.

Model resolvers (code)

Modern / flat chat: TOGETHER_INFERENCE_MODEL → TOGETHER_BASE_MODEL → TOGETHER_MODEL → openai/gpt-oss-20b

BASE pin: TOGETHER_BASE_MODEL → TOGETHER_INFERENCE_MODEL → openai/gpt-oss-20b

Classic research stack (reference): Normalize transcript lines → Extract key phrases → BiomedBERT / clinical embeddings → Hierarchical clustering (+ subclustering) → Ensemble S / O / A / P classifiers → Assemble SOAP note

Classic · mode=classic

Classic

Strategy classic-cat·Local only — no live LLM call

Models

  • Research stack: BiomedBERT + ensemble S/O/A/P classifiersContext Aggregation of Transcripts (CAT) reference architecture
  • Runnable demo on :3847: local hierarchy (regex / heuristic)Stand-in for BiomedBERT + ensemble so the path stays offline-runnable

Env / overrides

  • SOAP_AGGREGATION_STRATEGY=classic-cat (or mode=classic on /api/soap/generate)
  • No TOGETHER_* model required

Architecture

  1. 01Normalize transcript
  2. 02Key phrases → section-hint clusters
  3. 03CAP-lite propositions + section bundles
  4. 04Assemble S / O / A / P (no L1 LLM summaries)

How it differs: Only arm that never calls Together. Mirrors the CAT pipeline (keyphrases → embeddings → hierarchical clusters → ensemble classify → assemble); the shipped path uses local heuristics in place of BiomedBERT weights so classic always works on :3847.

src/lib/inference/strategies.ts → classicCatAggregate · src/lib/soap-engine.ts → buildHierarchy

Flat · mode=flat

Flat

Strategy direct-prompt·Together chat (stub → local hierarchy if key missing / blocked)

Models

  • Default chat model: openai/gpt-oss-20bServerless Together BASE instruct

Env / overrides

  • TOGETHER_INFERENCE_MODEL → TOGETHER_BASE_MODEL → TOGETHER_MODEL → openai/gpt-oss-20b
  • Requires TOGETHER_API_KEY for live generation
  • Optional SOAP_INFERENCE_PROVIDER=lora + SOAP_LORA_BASE_URL (PEFT host — never labeled as BASE)

Architecture

  1. 01Full transcript (single chunk)
  2. 02One transcript→SOAP JSON prompt
  3. 03Parse {subjective, objective, assessment, plan}
  4. 04Shared local hierarchy only for Linked Evidence / eval chips

How it differs: Honest direct-prompt control: same Together model family as modern, but no chunking and no level-1 hierarchical compression for generation. Hierarchy is built afterward for grounding chips only.

src/lib/inference/strategies.ts → directPromptAggregate

Modern · mode=modern

Modern

Strategy live-hierarchical-llm·Together chat (stub → local hierarchy if key missing / blocked)

Models

  • Default chat model: openai/gpt-oss-20bSame resolver as flat — day-to-day live path

Env / overrides

  • TOGETHER_INFERENCE_MODEL → TOGETHER_BASE_MODEL → TOGETHER_MODEL → openai/gpt-oss-20b
  • SOAP_AGGREGATION_STRATEGY=live-hierarchical-llm (default)
  • Requires TOGETHER_API_KEY for live generation
  • Never cascades OpenAI / Anthropic into /soap generate

Architecture

  1. 01Chunk transcript (utterance windows)
  2. 02Level-1 LLM summarize each chunk
  3. 03Enrich hierarchy + CAP-lite section bundles
  4. 04Parallel S / O / A / P section generators
  5. 05JSON validate · provenance chips · eval gate

How it differs: Hierarchical live path: compresses long sessions before section drafting, then runs four parallel section generators with Linked Evidence. Uses the configured Together chat model (may differ from the pinned BASE arm if TOGETHER_MODEL points at a fine-tuned or alternate id).

src/lib/inference/strategies.ts → liveHierarchicalAggregate · generateSectionsParallel

BASE · mode=togetherBase

BASE

Strategy live-hierarchical-llm (pinned model)·Together serverless BASE — modern pipeline, fixed BASE model id

Models

  • Pinned BASE model: openai/gpt-oss-20bgetTogetherBaseModel() — untrained serverless control, not a LoRA

Env / overrides

  • TOGETHER_BASE_MODEL → TOGETHER_INFERENCE_MODEL → openai/gpt-oss-20b
  • Lab arm: togetherBase forces togetherModel = getTogetherBaseModel()
  • Held-out script: INCLUDE_TOGETHER_BASE=1

Architecture

  1. 01Same modern hierarchy as Modern
  2. 02Chunk → L1 summarize → parallel S/O/A/P
  3. 03Model forced to Together BASE resolver (not FT adapter ids)

How it differs: Control column: identical modern architecture, but the model is pinned to the Together BASE resolver so scores stay comparable to an untrained serverless instruct model. Distinct from optional PEFT serve (SOAP_LORA_BASE_URL), which is never labeled as BASE.

src/lib/lab/compare.ts → arm togetherBase · providers.getTogetherBaseModel