Rct Bias Assessment Rob2
Automates Risk of Bias 2 (ROB2) assessment for RCT papers by analyzing text against specific domains and synthesizing a report. Use when you need to assess the quality of a clinical trial paper or evaluate risk of bias.
SKILL.md
RCT Bias Assessment (ROB2)
This skill assesses the risk of bias in Randomized Controlled Trials (RCTs) using the ROB2 tool. It analyzes the text for specific domains (Randomization, Deviations, Missing Data, Measurement, Reported Result) and synthesizes an overall judgement.
When to Use
- Use this skill when you need automates risk of bias 2 (rob2) assessment for rct papers by analyzing text against specific domains and synthesizing a report. use when you need to assess the quality of a clinical trial paper or evaluate risk of bias in a reproducible workflow.
- Use this skill when a data analytics task needs a packaged method instead of ad-hoc freeform output.
- Use this skill when the user expects a concrete deliverable, validation step, or file-based result.
- Use this skill when
scripts/assess_rob2.pyis the most direct path to complete the request. - Use this skill when you need the
rct-bias-assessment-rob2package behavior rather than a generic answer.
Key Features
- Scope-focused workflow aligned to: Automates Risk of Bias 2 (ROB2) assessment for RCT papers by analyzing text against specific domains and synthesizing a report. Use when you need to assess the quality of a clinical trial paper or evaluate risk of bias.
- Packaged executable path(s):
scripts/assess_rob2.pyplus 1 additional script(s). - Reference material available in
references/for task-specific guidance. - Structured execution path designed to keep outputs consistent and reviewable.
Dependencies
Python:3.10+. Repository baseline for current packaged skills.Third-party packages:not explicitly version-pinned in this skill package. Add pinned versions if this skill needs stricter environment control.
Example Usage
See ## Usage above for related details.
cd "20260316/scientific-skills/Data Analytics/rct-bias-assessment-rob2"
python -m py_compile scripts/assess_rob2.py
python scripts/assess_rob2.py --help
Example run plan:
- Confirm the user input, output path, and any required config values.
- Edit the in-file
CONFIGblock or documented parameters if the script uses fixed settings. - Run
python scripts/assess_rob2.pywith the validated inputs. - Review the generated output and return the final artifact with any assumptions called out.
Implementation Details
- Execution model: validate the request, choose the packaged workflow, and produce a bounded deliverable.
- Input controls: confirm the source files, scope limits, output format, and acceptance criteria before running any script.
- Primary implementation surface:
scripts/assess_rob2.pywith additional helper scripts underscripts/. - Reference guidance:
references/contains supporting rules, prompts, or checklists. - Parameters to clarify first: input path, output path, scope filters, thresholds, and any domain-specific constraints.
- Output discipline: keep results reproducible, identify assumptions explicitly, and avoid undocumented side effects.
Usage
- Input: Provide the full text or relevant sections of the RCT paper.
- Process:
- The skill extracts the Study Reference (Author, Year).
- It assesses each of the 5 ROB2 domains in parallel (conceptually) or sequentially.
- It synthesizes an overall risk judgement.
- It outputs a JSON-structured summary and a detailed report.
Domain Assessment Guidelines
Refer to rob2_guidelines.md for the detailed questions and logic for each domain.
Workflow Steps
- Extract Study Info: Identify the first author and year (e.g., "Wang, 2018").
- Assess Domains:
- Domain 1 (Randomization): Check allocation sequence and concealment.
- Domain 2 (Deviations): Check blinding and protocol deviations.
- Domain 3 (Missing Data): Check attrition and ITT analysis.
- Domain 4 (Measurement): Check outcome measurement appropriateness.
- Domain 5 (Reported Result): Check for selective reporting.
- Synthesize: Determine the Overall Risk of Bias based on the domain results.
- High: Any domain is High.
- Some concerns: No High, but at least one Some concerns.
- Low: All domains are Low.
Output Format
The final output should be a JSON object compatible with the following schema:
{
"Study": "Author, Year",
"D1": "Low/Some concerns/High",
"D2": "Low/Some concerns/High",
"D3": "Low/Some concerns/High",
"D4": "Low/Some concerns/High",
"D5": "Low/Some concerns/High",
"Overall": "Low/Some concerns/High"
}
Helper Scripts
PDF Text Extraction
When the user provides a PDF file path, use extract_pdf.py to extract the text content before assessment:
python extract_pdf.py
This script will:
- Extract text from the PDF file (e.g.,
gefitinib nejmoa0810699.pdf) - Save the extracted text to
full_text.txt - Handle multi-page documents with proper page separators
Usage flow:
- User provides PDF file path
- Run
python extract_pdf.pyto extract text - Read the generated
full_text.txtfile - Perform ROB2 assessment on the extracted text
Text Cleaning
Use scripts/assess_rob2.py to clean the text output if needed (removing markdown code blocks) or to validate the JSON structure.
from scripts.assess_rob2 import clean_text
# usage
cleaned_json = clean_text(llm_output)