Skip to content

Document rejected RAG canary findings#1093

Merged
BigSimmo merged 4 commits into
mainfrom
codex/rag-answer-composition
Jul 23, 2026
Merged

Document rejected RAG canary findings#1093
BigSimmo merged 4 commits into
mainfrom
codex/rag-answer-composition

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

RAG impact: no retrieval behaviour change — candidate fd3131803 was reverted by 9236ce981; the final PR tree differs from origin/main only in docs/outstanding-issues.md.

Verification

  • npm run format:changed
  • git diff --check
  • final code tree equality was proven immediately after the revert
  • candidate run 30007833352: golden retrieval recall 1.0, zero reciprocal-rank regressions; answer gate failed unsupported-route p95
  • reverted confirmation 30009207429: golden retrieval recall 1.0; answer gate failed differently on citation failure

Code tests/build not rerun after the final docs-only commit: the code diff is empty and the candidate had already passed verify:cheap and verify:pr-local before being reverted.
UI verification not run: documentation only.

Risk and rollout

  • Risk: documentation-only; no runtime behavior.
  • Rollback: revert the docs commit.
  • Provider or production effects: two explicitly authorized read-only canary runs were completed; no migration, mutation, deployment or additional retry.

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

Notes

  • Rejected commit remains recoverable at local ref refs/archive/rejected-rag/20260723/monitoring-subject-gate.
  • No further live RAG run is recommended now.

Note

Low Risk
Documentation-only; no application code, deployment, or RAG behavior changes.

Overview
Updates docs/outstanding-issues.md only—no runtime or retrieval changes (reverted RAG experiment; tree matches main aside from this doc).

Adds a 2026-07-23 RAG reconciliation callout that supersedes the single-composer story in #18: lithium, ADHD, metabolic, and admission misses are documented as separate mechanisms (e.g. lithium fast-path, ADHD extractive budget, metabolic prose selection; #19 stays post-retrieval comparison). It notes the reverted lithium subject-evidence guard, archive ref refs/archive/rejected-rag/20260723/monitoring-subject-gate, keeps #29 for remaining fallback stubs, and defers further RAG tuning without a reproducer + passing canary pair.

Introduces P2 #51 to stabilise the live answer-quality canary before more RAG work: two byte-identical-tree runs passed golden retrieval but failed the answer gate for different reasons (unsupported-route p95 vs citation failure). Next action is gate/diagnostic work, not immediate retries.

Bumps the issues tracker next-id to 052 and surfaces #51 at the top of the open-items table.

Reviewed by Cursor Bugbot for commit 3694141. Configure here.

Prevent unrelated structured tables from satisfying medication monitoring threshold queries. Preserve the clinical subject through retrieval selection and document the remaining distinct RAG issues.\n\nVerified with focused Vitest, eval:rag:offline, verify:cheap, verify:pr-local, production-readiness, and a narrow live lithium diagnostic.
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • docs/outstanding-issues.md
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6a09e039-939e-420c-b4fa-02563074bb92

📥 Commits

Reviewing files that changed from the base of the PR and between 5df8c96 and 4001006.

📒 Files selected for processing (1)
  • docs/outstanding-issues.md

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/rag-answer-composition

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@supabase

supabase Bot commented Jul 23, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@BigSimmo

Copy link
Copy Markdown
Owner Author

Post-canary 30007833352 kept golden document recall at 1.0 with zero per-case reciprocal-rank regressions and improved the lithium targeting result, but the workflow failed its unsupported-route p95 gate (6,227 ms > 4,000 ms) and one additional answer case entered a review fallback. Per the protected RAG rollback rule, commit fd3131803 was reverted in 9236ce981. The reverted branch tree is byte-identical to current origin/main; confirmation canary pending. The rejected candidate remains recoverable at local archive ref refs/archive/rejected-rag/20260723/monitoring-subject-gate.

Correct the monitoring-miss diagnosis and capture the two distinct answer-gate failures observed on byte-identical trees. Preserve the rejected lithium candidate as an archive-only follow-up and explicitly stop immediate live retries.
@BigSimmo BigSimmo changed the title Require subject evidence for monitoring-range retrieval Document rejected RAG canary findings Jul 23, 2026
@BigSimmo
BigSimmo marked this pull request as ready for review July 23, 2026 13:20
@BigSimmo

Copy link
Copy Markdown
Owner Author

Reverted confirmation run 30009207429 failed the answer gate for citation-failure rate 0.0227, different from candidate run 30007833352 (unsupported-route p95 6,227 ms). Both byte-identical trees passed golden retrieval with recall 1.0. Final PR diff is documentation-only; no further live retry is recommended.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 369414187a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/outstanding-issues.md Outdated
@BigSimmo
BigSimmo enabled auto-merge (squash) July 23, 2026 13:24
Use the green main baseline and reverted confirmation as the byte-identical comparison, and describe the candidate run separately.
@BigSimmo
BigSimmo merged commit 569c633 into main Jul 23, 2026
25 checks passed
@BigSimmo
BigSimmo deleted the codex/rag-answer-composition branch July 23, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant