Fix ai-service Dockerfile: bake in drug_entities.json, override its path
This commit is contained in:
@@ -1,9 +1,39 @@
|
||||
# ADR 0007: Conversational reasoning RAG — state, bounded loop, and how it is measured
|
||||
|
||||
**Status:** accepted, implementation in progress (2026-08-05)
|
||||
**Status:** superseded by ADR 0008 (2026-08-07). See the note below before
|
||||
reading this as a description of anything currently running.
|
||||
**Supersedes:** nothing. Extends ADR 0005 (segment output contract) and ADR 0006
|
||||
(quarantined block references) rather than replacing them.
|
||||
|
||||
> **2026-08-07 — why this was superseded, not deleted.** An independent
|
||||
> 7-agent audit on 2026-08-06 found `bootstrap.py` never constructs any of
|
||||
> `rag/conversation.py` / `rag/reasoning.py` / `rag/conversational.py` — the
|
||||
> live agent (`rag/agent.py::RagAgent`, wired in since the F-03 rebuild on
|
||||
> 2026-08-06) is a fixed one-shot pipeline (understand → route → retrieve
|
||||
> once → generate → ≤2 same-claim entailment retries), not the PLAN/RETRIEVE/
|
||||
> ASSESS/REFINE/VERIFY loop or the `Focus`/`ConversationState`/TTL state
|
||||
> design below. This was a real, deliberate pivot mid-implementation, not an
|
||||
> abandoned-but-still-intended plan: `rag/agent.py`'s own module docstring
|
||||
> says outright that `ConversationalLoopService` + `conversation.py` were
|
||||
> replaced because "the LLM reads a plain turn history and resolves
|
||||
> ['thuốc đó' / 'còn liều thì sao'] itself" — simpler than maintaining
|
||||
> `Focus`/TTL/turn-budget state by hand, and proven live across many
|
||||
> multi-turn conversations since. Section 6 below ("Refused: an LLM
|
||||
> confidence score as the loop's uncertainty signal") is the clearest
|
||||
> evidence this is a genuine architecture change, not a gap: the live system
|
||||
> now uses exactly that — an LLM sufficiency/clarify judgment — as its
|
||||
> ask-or-answer signal, the opposite of what this ADR chose.
|
||||
>
|
||||
> The three modules this ADR specified (1,314 lines) and their five dedicated
|
||||
> test files (42 tests) were deleted on 2026-08-07 rather than left as dead
|
||||
> code, once confirmed to have zero live importers anywhere
|
||||
> (`bootstrap.py`/`main.py`/`agent.py`/`answer.py`/`routers/rag.py`). This
|
||||
> document is kept, unedited below this notice, as the historical record of
|
||||
> why that design was chosen and what it traded off — see ADR 0008 for what
|
||||
> actually runs today, including what this ADR got right that ADR 0008
|
||||
> still owes (a real request-scoped time/call budget — F-08, still open; a
|
||||
> durable, cross-worker conversation store — currently an in-process dict).
|
||||
|
||||
## Context
|
||||
|
||||
The service answers one question at a time. `POST /v1/rag/query` carries no
|
||||
|
||||
Reference in New Issue
Block a user