Commit Graph

18 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 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 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 4490a1abf0 Stop the slugifier from deleting the letter D-stroke 2026-08-19 13:07:13 +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 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 9bad1f61ea Initial monorepo scaffold for Duoc Thu RAG medical chatbot 2026-07-30 20:38:34 +07:00