Fix clinical-subject dose retrieval#571
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughSummary by CodeRabbit
WalkthroughMedication dose and risk retrieval now extracts clinical-subject terms, matches them against evidence, adjusts ranking, and requires contextual dose or route support in coverage gating. Tests cover co-located evidence, unrelated medication contexts, and subject-aware result ranking. ChangesMedication dose context
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Query
participant RetrievalSelection
participant ClinicalSearch
participant RAGCoverageGate
participant Evidence
Query->>RetrievalSelection: build medication dose retrieval intent
RetrievalSelection->>ClinicalSearch: match clinical subject against Evidence
ClinicalSearch-->>RetrievalSelection: return subject signal and score adjustment
RetrievalSelection->>RAGCoverageGate: evaluate selected evidence
RAGCoverageGate->>ClinicalSearch: check contextual dose and route match
ClinicalSearch->>Evidence: inspect extracted evidence text
Evidence-->>RAGCoverageGate: return contextual match status
RAGCoverageGate-->>Query: accept or reject evidence
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b8c5cb785e
ℹ️ 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".
Summary
Verification
npx vitest run tests/smart-rag-api.test.ts tests/retrieval-query-variants.test.ts tests/retrieval-selection.test.ts tests/clinical-search.test.ts tests/eval-search.test.ts(122 passed)npm run eval:rag:offline(21 files, 265 tests passed)npm run verify:cheap(210 files passed, 1 skipped; 1,934 tests passed, 1 skipped)opioid-withdrawal-doses: document recall 1.0, content recall 1.0, nDCG@10 0.9912, irrelevant-source rate 0, required-signal coverage 1.0Safety