30 Commits

Author SHA1 Message Date
VuQuangBao 03467aeaf2 Attach real input/output/token usage to provider spans for Langfuse cost tracking
Langfuse showed $0.00 cost on every trace even after tracing was wired up:
provider.bedrock_converse.* spans carried only latency, no content or usage.
Converse's own response already includes token usage -- it just wasn't being
read. Captured on the adapter (last_usage, no interface change) and attached
to the span using Langfuse's own OTel attribute convention
(langfuse.observation.*), which its docs say takes precedence over generic
GenAI attributes. Verified live: a fresh trace now shows real prompt/completion
tokens and Langfuse computes real cost once given the model's actual per-token
price.
2026-08-25 16:44:55 +07:00
VuQuangBao 4860d9e675 Record 2 known gaps as real fixtures, not just claims
Weight-based dosing and multi-drug comparison both measured live and
confirmed absent. Fixtures carry the exact query, measured behavior,
and code pointer so the gap can be re-checked later instead of taken
on faith.
2026-08-25 15:40:03 +07:00
VuQuangBao f0fc5e7ecf Drop patient-context prepending and account UI from chat
Personalization context was silently no-op'ing on the first turn of a
fresh session in live testing (profile fetch hadn't resolved by the
time the request fired), so it could not be relied on. Chat now always
sends the user's own text unmodified. Login/profile/admin entry point
removed from the header.
2026-08-25 14:53:43 +07:00
VuQuangBao a1ba00618c Add a real, visible patient-profile button 2026-08-25 14:12:49 +07:00
VuQuangBao 692a9c99b5 Send patient context once per session, not on every turn 2026-08-25 14:05:27 +07:00
VuQuangBao 04b1bb734f Gate /profile behind login, same pattern as /admin 2026-08-25 13:49:52 +07:00
VuQuangBao cfb6b4fb62 Re-key the 3 D-stroke drug ids now that the corpus fix is live 2026-08-25 12:07:22 +07:00
VuQuangBao 1ddd878431 Add patient personalization: profile saved once, reused every chat turn 2026-08-25 11:55:13 +07:00
VuQuangBao 33b16c885b Log the 2026-08-24 session: F3 fix live, audit filled, corpus re-ingest scoped 2026-08-24 15:07:30 +07:00
VuQuangBao f3eaab0948 Make a Langfuse trace worth opening: question, answer, session, no probe noise 2026-08-21 14:45:32 +07:00
VuQuangBao 53582b6030 Add Langfuse as a self-hosted eval and trace viewer 2026-08-21 10:35:25 +07:00
VuQuangBao 4490a1abf0 Stop the slugifier from deleting the letter D-stroke 2026-08-19 13:07:13 +07:00
VuQuangBao 24c55d1627 Resolve ai-service directly from the RAG routes, never the gateway 2026-08-19 10:16:44 +07:00
VuQuangBao f50ccfc5f7 Add an explicit ArgoCD sync and health-poll script 2026-08-19 09:21:35 +07:00
VuQuangBao b68005be1c Enable auth-service/api-gateway on production, build their images in CI 2026-08-18 14:11:00 +07:00
VuQuangBao a1de4715a4 Add read-only production runtime audit 2026-08-17 11:17:40 +07:00
VuQuangBao 057d4ed9dc Wire up query history: localStorage session persistence + sidebar UI 2026-08-14 17:44:36 +07:00
VuQuangBao 9be5819710 Remove chat rate limit 2026-08-14 11:57:58 +07:00
VuQuangBao a4819b8653 Fix migration workflow: upload as artifact instead of scp to practice EC2 2026-08-13 11:14:25 +07:00
VuQuangBao 7ebbe1f309 Add production condition retrieval smoke test 2026-08-11 14:58:28 +07:00
VuQuangBao 59e6ad2d0d Verify exact production traces and record rollout 2026-08-11 11:29:59 +07:00
VuQuangBao 6b8f7584ed Soften the tone of the docs and comments written today 2026-08-11 10:12:25 +07:00
VuQuangBao 97cb6d16f4 Remove corpus counts from chat chrome 2026-08-10 17:26:58 +07:00
VuQuangBao 46469468bb Wire token-budget packing into the overview/rerank fallback path 2026-08-10 12:02:31 +07:00
VuQuangBao 60b4397032 Fix ai-service Dockerfile: bake in drug_entities.json, override its path 2026-08-10 10:35:13 +07:00
VuQuangBao a4b8e1c4db Checkpoint frontend UI/UX overhaul and ingestion embed benchmark work 2026-08-06 17:21:21 +07:00
VuQuangBao 1e8cbdb586 Fix live multi-turn: pass the resolved drug, stop did-you-mean garbage 2026-08-05 16:54:35 +07:00
VuQuangBao ef08b4929e Wire the guarded conversational RAG answer layer end-to-end 2026-08-05 14:33:13 +07:00
VuQuangBao 967b917001 Scaffold web frontend: mock-backed chat + PDF split-view, Tailwind/shadcn 2026-07-31 12:16:47 +07:00
VuQuangBao 9bad1f61ea Initial monorepo scaffold for Duoc Thu RAG medical chatbot 2026-07-30 20:38:34 +07:00