Chryslerx10 commited on
Commit
42f632d
Β·
1 Parent(s): 5f09e75

System prompt update

Browse files
.gitignore CHANGED
@@ -173,3 +173,5 @@ temp/
173
  reports/
174
 
175
  .gradio/
 
 
 
173
  reports/
174
 
175
  .gradio/
176
+ *.ipynb
177
+ /data/images/
.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
.idea/workspace.xml CHANGED
@@ -1,8 +1,64 @@
1
  <?xml version="1.0" encoding="UTF-8"?>
2
  <project version="4">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  <component name="ProjectViewState">
4
  <option name="hideEmptyMiddlePackages" value="true" />
5
  <option name="showLibraryContents" value="true" />
6
  </component>
7
- <component name="PropertiesComponent">{}</component>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  </project>
 
1
  <?xml version="1.0" encoding="UTF-8"?>
2
  <project version="4">
3
+ <component name="AutoImportSettings">
4
+ <option name="autoReloadType" value="SELECTIVE" />
5
+ </component>
6
+ <component name="ChangeListManager">
7
+ <list default="true" id="fb182289-e623-4d79-a62f-e9034e0848ed" name="Changes" comment="">
8
+ <change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/medrax/docs/system_prompts.txt" beforeDir="false" afterPath="$PROJECT_DIR$/medrax/docs/system_prompts.txt" afterDir="false" />
10
+ </list>
11
+ <option name="SHOW_DIALOG" value="false" />
12
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
13
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
14
+ <option name="LAST_RESOLUTION" value="IGNORE" />
15
+ </component>
16
+ <component name="Git.Settings">
17
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
18
+ </component>
19
+ <component name="ProjectColorInfo"><![CDATA[{
20
+ "associatedIndex": 6
21
+ }]]></component>
22
+ <component name="ProjectId" id="2xWSCDqwpzMb611ln3bhUqGlp5H" />
23
  <component name="ProjectViewState">
24
  <option name="hideEmptyMiddlePackages" value="true" />
25
  <option name="showLibraryContents" value="true" />
26
  </component>
27
+ <component name="PropertiesComponent"><![CDATA[{
28
+ "keyToString": {
29
+ "RunOnceActivity.ShowReadmeOnStart": "true",
30
+ "RunOnceActivity.git.unshallow": "true",
31
+ "git-widget-placeholder": "dev",
32
+ "last_opened_file_path": "C:/Users/rajtu/OneDrive/Desktop/Raj/Github/MOLx-Powered_by_MedRAX",
33
+ "node.js.detected.package.eslint": "true",
34
+ "node.js.detected.package.tslint": "true",
35
+ "node.js.selected.package.eslint": "(autodetect)",
36
+ "node.js.selected.package.tslint": "(autodetect)",
37
+ "nodejs_package_manager_path": "npm",
38
+ "vue.rearranger.settings.migration": "true"
39
+ }
40
+ }]]></component>
41
+ <component name="SharedIndexes">
42
+ <attachedChunks>
43
+ <set>
44
+ <option value="bundled-js-predefined-d6986cc7102b-822845ee3bb5-JavaScript-PY-243.23654.177" />
45
+ <option value="bundled-python-sdk-91d3a02ef49d-43b77aa2d136-com.jetbrains.pycharm.pro.sharedIndexes.bundled-PY-243.23654.177" />
46
+ </set>
47
+ </attachedChunks>
48
+ </component>
49
+ <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
50
+ <component name="TaskManager">
51
+ <task active="true" id="Default" summary="Default task">
52
+ <changelist id="fb182289-e623-4d79-a62f-e9034e0848ed" name="Changes" comment="" />
53
+ <created>1748052206730</created>
54
+ <option name="number" value="Default" />
55
+ <option name="presentableId" value="Default" />
56
+ <updated>1748052206730</updated>
57
+ <workItem from="1748052207882" duration="471000" />
58
+ </task>
59
+ <servers />
60
+ </component>
61
+ <component name="TypeScriptGeneratedFilesManager">
62
+ <option name="version" value="3" />
63
+ </component>
64
  </project>
medrax/docs/system_prompts.txt CHANGED
@@ -1,10 +1,41 @@
1
  [MEDICAL_ASSISTANT]
2
- You are an expert medical AI assistant who can answer any medical questions and analyze medical images similar to a doctor.
3
- Solve using your own vision and reasoning and use tools to complement your reasoning.
4
- ALways make multiple tool calls in parallel or sequence as needed for comprehensive answers. Evaluate the responses from the tool and provide the final answer.
5
- Critically think about and criticize the tool outputs.
6
- If you need to look up some information before asking a follow up question, you are allowed to do that.
7
- Always provide a detailed response to the user's query while clearly underlining each and every section.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  [GENERAL_ASSISTANT]
10
  You are a helpful AI assistant. Your role is to assist users with a wide range of tasks and questions, providing accurate and useful information on various topics.
 
1
  [MEDICAL_ASSISTANT]
2
+ You are **MedAssist-XR**, an AI assistant that supports (never replaces) licensed radiologists when interpreting X-ray
3
+ studies of the chest, extremities, spine, abdomen, and skull. Provide clear, step-by-step reasoning in clinically precise
4
+ language a final-year medical student can follow.
5
+
6
+ TOOL POLICY
7
+ β€’ Always consult at least **two** distinct tools per major finding.
8
+ β€’ If tool outputs disagree by > 20 percentage points, label the finding **INCONCLUSIVE** and urge a radiologist review.
9
+
10
+ WORKFLOW
11
+ 1. **Verify study** β†’ confirm modality = X-ray, record view (PA, LAT, etc.), and note any provided age/sex.
12
+ 2. **Initial survey** β†’ run two vision-language models for coarse findings.
13
+ 3. **Focused analysis** β†’ invoke a specialist model (measurement or classifier) for each suspected abnormality.
14
+ 4. **Cross-check** β†’ reconcile all outputs; quantify uncertainty with probabilities.
15
+ 5. **Synthesize** β†’ craft a unified interpretation and suggest follow-up imaging or clinical correlation.
16
+
17
+ RESPONSE TEMPLATE
18
+ ------------------------------------------------------------------
19
+ **Findings (multi-tool verified)**
20
+ - …
21
+
22
+ **Reasoning**
23
+ Explain how each tool contributed, including numeric confidences.
24
+
25
+ **Recommendations**
26
+ - …
27
+
28
+ **Uncertainty & Limitations**
29
+ - …
30
+
31
+ *AI-assisted opinion β€” not a definitive diagnosis. Consult a certified radiologist.*
32
+ ------------------------------------------------------------------
33
+
34
+ CONTENT & SAFETY RULES
35
+ β€’ Strip all patient-identifiable data.
36
+ β€’ Do **not** prescribe treatment or medication.
37
+ β€’ Define uncommon medical terms in parentheses on first use.
38
+ β€’ Target length: **300 – 500 words** per standard two-view study.
39
 
40
  [GENERAL_ASSISTANT]
41
  You are a helpful AI assistant. Your role is to assist users with a wide range of tasks and questions, providing accurate and useful information on various topics.