Rebuilding a legal answer system without loosening the evidence.Rebuilding a legalanswer system withoutloosening theevidence.
I am replacing a production Python answer service with Rust, preserving behavior while tightening retrieval, citations, failure handling, and release control. The client and live product remain private; the engineering record does not.
Release manifest
- Authority
- Frozen + compared
- Runtime
- Rust + Axum
- Retrieval
- Lexical + vector
- Evidence
- Verified before use
- Delivery
- HTTP + SSE
Public engineering facts only. Client identity, live surface, and private operating details stay outside this record.
The migration is the work.
Three ordered stations keep replacement work legible: establish authority, reproduce behavior, then improve what evidence proves can improve.
- 01
Rebaseline
Capture the production authority exactly before replacing any behavior.
- Authority
- Versioned source and runtime behavior become the comparison oracle.
- Parity
- Routes, errors, retrieval order, citations, and streaming contracts are frozen.
- Boundary
- Historical copies stay evidence, never silent fallbacks.
- 02
Port + parity
Move the serving path into typed Rust crates without redesigning the product contract.
- Domain
- Validated types separate legal identity, text authority, and application state.
- Adapters
- Postgres, model transport, HTTP, and CLI stay outside the pure rules.
- Differential
- Frozen fixtures and live probes expose behavior drift before promotion.
- 03
Answer quality
Improve recall and answer usefulness without weakening the citation boundary.
- Retrieval
- Hybrid search, companion relationships, and evidence budgets are measured together.
- Answers
- Priority, controlling qualifications, and concise structure are first-class work.
- Release
- Bounded builders, independent review, exact artifacts, and live checks gate change.
The work is not a rewrite. It is controlled replacement.
Search material can help find the right provision. It cannot become a quotation merely because it ranked well. That separation is enforced in the system, not left to prompt wording.
Authority stays frozen
- The production Python service remains a frozen comparison oracle, not a runtime fallback.
- Only verified, active-release served text may cross into quotable evidence.
- Search projections, metadata, and internal audit records stay outside answer prose.
- Malformed authority-bearing data fails the whole operation before partial results return.
The serving path changes
- A single Rust serving path owns orchestration from validated request to complete answer.
- Lexical and vector retrieval share typed identities rather than loose strings.
- The answer compiler validates citations against the evidence window before delivery.
- HTTP and keepalive SSE preserve the established public behavior while the internals change.
- 01
Query
- 02
Route
- 03
Retrieve
- 04
Verify
- 05
Compile
Searchable
Projections, metadata, and relationships may rank or route a candidate. They are useful for finding authority, never a substitute for it.
Quotable
Verified served text from the active release can cross the evidence gate and support a cited answer. Everything else stops before compilation.
What I own now.
This is full-time systems work across the answer path: authority, implementation, retrieval, evidence, output quality, and production release.
Current responsibility
- Authority + parity
- Maintain the frozen comparison baseline and differential gates so changes are measured rather than guessed.
- Rust architecture
- Own the domain, database, provider, retrieval, answer, application, API, and operational crate boundaries.
- Retrieval quality
- Tune hybrid retrieval, relationships, routing, and evidence selection against real failure cases and live behavior.
- Citation integrity
- Keep quotation and citation delivery fail-closed when evidence is missing, stale, malformed, or outside the active release.
- Answer quality
- Improve concise priority ordering and controlling qualifications without weakening evidence safeguards.
- Release control
- Package exact changes through bounded implementation, independent review, live probes, and rollback-preserving promotion.
- Language
- Rust 2024
- API
- Axum + Tower
- Data
- PostgreSQL + pgvector
- Queries
- SQLx · read-only serving role
- Retrieval
- Lexical + vector + typed relationships
- Delivery
- JSON + keepalive SSE
- Serving now
- The answer runtime is a Rust service; Python remains only as frozen compatibility evidence.
- Current focus
- Retrieval recall, evidence completion, answer structure, controlling qualifications, and contained failure behavior.
- Not claimed
- Rust does not make database or model latency disappear. Its value here is stronger boundaries, concurrency, operability, and release clarity.
Privacy boundary: This record intentionally omits the client name, product identity, live link, repository, corpus contents, benchmark scores, provider settings, and infrastructure topology.
Need a knowledge system whose evidence boundary survives production?
I can help rebaseline an existing answer service, design a typed retrieval and citation path, or take a private RAG system from evaluation into controlled operation.