Add exact and semantic evidence admission, measured calibration, bounded tool execution, and independent held-out evaluation preparation with regression coverage and operator guides. Real-provider quality gates remain pending. Validation: 1300 provider-free tests passed; 3 Windows symlink skips. PostgreSQL acceptance not rerun because TEST_DATABASE_URL is unset.
145 lines
11 KiB
Markdown
145 lines
11 KiB
Markdown
# Live document MVP TODO
|
|
|
|
Updated 2026-10-08 against the revision 1.3 specifications and scoped-search repair review.
|
|
|
|
This checklist tracks implementation; it does not replace the governing
|
|
[delivery plan](../specifications/RAG-AI-Phase1-Delivery-Plan.md),
|
|
[implementation guide](../specifications/RAG-Phase1-Implementation-Guide.md),
|
|
[API catalog](../specifications/RAG-Phase1-API-Catalog.md) or
|
|
[database design](../specifications/RAG-Phase1-Database-Design.md).
|
|
Checked baseline items mean existing component implementation, not end-to-end
|
|
MVP acceptance. See the reference map for executed component checks; these do not certify the full MVP.
|
|
|
|
## Existing baseline to reuse
|
|
|
|
- [x] Phase 1: PostgreSQL/pgvector foundation, frozen processing/embedding profiles and trusted bootstrap.
|
|
- [x] Phase 2: bounded CLI intake, immutable originals, independent document/job IDs and request replay.
|
|
- [x] Phase 3: extraction, normalization, semantic chunk drafts, QC and immutable artifact candidates.
|
|
- [x] Phase 4: hosted embedding adapter, vector validation and bounded in-memory staging.
|
|
- [x] English revision 1.3 scope, workflow, API/database proposals and acceptance scenarios documented.
|
|
- [x] Phase 5 backend: worker, durable fenced artifact attachment, review/resume and atomic publication. Authenticated D06/D07 transport remains pending.
|
|
- [x] Phase 6: ingestion end-to-end acceptance and operational handoff; real-provider/Persian quality remains separate.
|
|
|
|
Do not rebuild Phases 1-4 for LangChain. A custom retriever/tool can call the
|
|
existing application services; a thin Embeddings wrapper is optional.
|
|
The prototype Chroma/Markdown chat does not search this upload pipeline.
|
|
|
|
## WP1 - Early real-provider proof
|
|
|
|
- [ ] Configure funded fixed embedding, extraction and Live profiles; verify compatible embedding identity/dimension.
|
|
- [ ] Prove Persian microphone input, spoken output and available transcripts on the target network.
|
|
- [ ] Prove a Live tool call executes on the backend and returns evidence.
|
|
- [ ] Verify provider audio formats, turn completion, interruption and error behavior.
|
|
- [ ] Record measured latency, provider cost and the delivery gate result.
|
|
|
|
Run this gate early while independent worker/API work continues. Four days is
|
|
conditional; three days is optimistic. A failed provider/network proof must be
|
|
reported before promising a live demo.
|
|
|
|
## WP2 - Identity and general browser upload
|
|
|
|
- [ ] Add forward auth/session schema and pre-created admin/user accounts; preserve the applied initial migration.
|
|
- [ ] Implement login, logout and current-user endpoints with trusted cookie identity, expiry, Origin and CSRF checks.
|
|
- [ ] Implement bounded authenticated multipart upload using the existing intake service.
|
|
- [ ] Preserve byte/title deduplication, immutable originals and independent documents for new upload keys.
|
|
- [ ] Expose document/job status and failure details according to the API catalog.
|
|
- [ ] Enforce declared format/structure/resource limits for future uploads of unknown total count.
|
|
|
|
The four supplied examples are acceptance fixtures, not a filename allowlist
|
|
or a four-document capacity limit.
|
|
|
|
## WP3 - Worker, review and publication (backend implemented; authenticated transport and Live invalidation pending)
|
|
|
|
- [x] Add reviewed forward extraction-state/audit changes without editing applied revisions.
|
|
- [x] Implement separate worker claim tokens, leases, heartbeats, bounded attempts and recovery.
|
|
- [x] Run existing extraction/chunking/embedding under the frozen processing profile.
|
|
- [x] Attach retained candidates/artifacts only under the current fenced claim.
|
|
- [x] Implement trusted D06/D07 backend services for exact-output review and evidence/digest-bound approval or rejection.
|
|
- [ ] Integrate authenticated D06/D07 transport with identity/organization/Origin/CSRF.
|
|
- [x] Release review-required work as failed with EXTRACTION_REVIEW_REQUIRED; avoid automatic repeated provider calls.
|
|
- [x] Resume the same eligible failed document/job through the trusted retry backend/CLI after approval; fresh output requires fresh review. Authenticated D04 transport remains pending.
|
|
- [x] Retain faithful complete FAQ extraction and explicitly approve included factual Q&A groups.
|
|
- [x] Publish all validated chunks plus ready state in one transaction; keep new ready documents inactive.
|
|
- [x] Implement atomic backend activation/selection, revision counters, access epochs and search-context rechecks with the documented lock order; see [search Phase 1/2 evidence](../agent-reference-map.md).
|
|
- [x] Verify duplicate workers, expired leases, stale approvals, retries and partial failures against isolated PostgreSQL.
|
|
|
|
## WP4 - Shared scoped search
|
|
|
|
- [x] Implement one backend pgvector search service using compatible bounded query embeddings; see [Phase 2 handoff](../guides/scoped-search-phase2.md).
|
|
- [x] Resolve persisted enabled actors and derive organization/user scope at the trusted operator boundary; model arguments cannot override scope. Browser identity and owned conversation integration remain pending in WP2/WP5.
|
|
- [x] Filter to authorized, ready, active, undeleted and unpurged documents in every retrieval branch.
|
|
- [x] Combine semantic evidence with exact normalized identifiers and bounded untrusted context in the same retrieval core.
|
|
- [x] Return faithful whole-chunk text, document_id/chunk_id/location and execution-wide source references within evidence budgets.
|
|
- [ ] Evaluate real Persian questions, numbers, conditions, exceptions and insufficient-evidence behavior.
|
|
- [ ] Record the measured decision on reranking/ANN; implement only if evaluation demonstrates a need.
|
|
|
|
## WP5 - LangChain and native Live
|
|
|
|
- [x] Expose the shared search through a strict sync/async LangChain tool with lazy imports, bounded admission/deadlines, cancellation and shutdown; see [Phase 3 handoff](../guides/scoped-search-phase3.md).
|
|
- [ ] Keep persistent secrets and provider-specific objects behind server adapters.
|
|
- [ ] Add minimal owned voice conversations, Live sessions and voice tool-call persistence through forward migrations.
|
|
- [ ] Implement session reservation and authenticated backend WSS audio relay to Gemini Live.
|
|
- [ ] Dispatch tools with trusted backend context; model arguments cannot override identity or knowledge scope.
|
|
- [ ] Correlate current-session transcripts, tool results and displayed sources.
|
|
- [ ] Handle follow-up context, interruption/cancellation, provider failure and session termination.
|
|
- [ ] Suppress stale evidence/audio after knowledge changes, access revocation or cancellation.
|
|
- [ ] Keep blocking embedding/provider calls off the audio event loop with bounded concurrency/deadlines.
|
|
|
|
## WP6 - UI, deployment and acceptance
|
|
|
|
- [ ] Build same-origin login and a minimal voice workspace with connection/microphone states.
|
|
- [ ] Add an admin Documents area for upload, status, retained review, retry and activation.
|
|
- [ ] Show available current-session transcripts/sources and actionable failures.
|
|
- [ ] Deploy one API and one separate worker with PostgreSQL/pgvector, persistent files and HTTPS/WSS.
|
|
- [ ] Validate both sample PDFs: reading order, dates, percentages, conditions and exceptions.
|
|
- [ ] Validate the sample infographic: headings and group relationships.
|
|
- [ ] Validate the sample DOCX: all 100 Q&A pairs and explicit factual inclusion.
|
|
- [ ] Validate unseen in-scope documents uploaded through the UI without code changes.
|
|
- [ ] Run provider-free regressions and isolated PostgreSQL acceptance with required database configuration.
|
|
- [ ] Run separately configured real-provider quality/voice checks; ordinary test skips are not acceptance.
|
|
- [ ] Rehearse upload-to-reviewed-ready-to-active-to-live-answer, follow-ups and interruption on the deployed target.
|
|
- [ ] Verify restart recovery, revocation, failure reporting and all MVP-01 through MVP-14 criteria.
|
|
- [ ] Record actual results, remaining limits and demo run instructions.
|
|
|
|
## Scoped-search technical checkpoint (2026-10-08)
|
|
|
|
Search milestone phases below are separate from ingestion Phases 1-6.
|
|
Implemented component checkmarks do not establish practical retrieval or Live readiness.
|
|
|
|
- [x] Phase 4 evaluation preparation and review repairs: 16 answerable and six unsupported original-derived draft annotations restored as UTF-8; status aligned; calibration-question overlap/malformed annotations rejected before settings/database/provider setup.
|
|
- [x] Final repair review: 52 targeted provider-free tests rerun and passed; original hashes/status/DOCX literal checks, pip check, tracked whitespace and all three applied-migration byte comparisons passed.
|
|
- [ ] Complete and freeze 20 answerable cases, including four unseen cases, plus six unsupported cases; obtain original approvals and required exact-output/factual DOCX human decisions. The unseen slots remain empty.
|
|
- [ ] Bind approved original hashes to actual eligible ready documents and select the corpus through the atomic selection service.
|
|
- [ ] Obtain funded-profile/provider-call authorization and separate bounded ingestion, calibration and evaluation budgets; measure and freeze the Phase 2 cutoff before held-out evaluation.
|
|
- [ ] Rerun mandatory isolated PostgreSQL acceptance with --require-postgres for the current repair checkpoint. TEST_DATABASE_URL is absent; the earlier 311-pass result is historical.
|
|
- [ ] Pass the real Phase 4 gate: at least 18/20, every critical case, all six unsupported cases returning no_evidence, and no unauthorized/ineligible sources.
|
|
|
|
The repair records a full provider-free run of 1300 passed with three existing
|
|
Windows symlink skips; that full run was not repeated during final review.
|
|
See the [Phase 4 operator guide](../guides/scoped-search-phase4.md),
|
|
[status snapshot](../calibration/phase4-status.json) and
|
|
[scoped-search plan](scoped-search-implementation-plan.md) for actual commands,
|
|
historical results and remaining prerequisites. Quality acceptance is not run;
|
|
provider calls are zero. Generated-answer and Live readiness remain unevaluated.
|
|
|
|
## Conditional delivery checkpoints
|
|
|
|
| Checkpoint | Required progress |
|
|
| --- | --- |
|
|
| Day 1 | WP1 proof started/completed; WP3 worker foundation and WP2 identity/upload underway |
|
|
| Day 2 | Reviewed complete ingestion/publication and activation; WP4 scoped evidence search |
|
|
| Day 3 | WP5 LangChain/Live connected; minimal WP6 browser flows |
|
|
| Day 4 | Example/unseen-file acceptance, failures/revocation/restart and HTTPS rehearsal |
|
|
|
|
Dependencies govern order; this table does not assume parallel staffing or
|
|
guarantee completion. Use delivery-plan Section 8 for the governing schedule.
|
|
|
|
## Deferred beyond this MVP
|
|
|
|
Full text chat and durable message/history UI, settings editing, rich management/
|
|
delete UI, recording, seamless reconnect, CTI and reranker/ANN without evidence.
|
|
Preserve their documented future contracts without making them Live prerequisites.
|
|
|
|
When an item is completed, attach the relevant implementation and actual
|
|
verification evidence. Do not check it solely because its design is documented.
|