Spaces:
Sleeping
Sleeping
Rajan Sharma
commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,40 +1,35 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
-
|
| 18 |
-
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
-
|
| 25 |
-
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
-
|
| 35 |
-
|
| 36 |
-
- Secure user identification
|
| 37 |
-
- Comprehensive medical knowledge base integration
|
| 38 |
-
|
| 39 |
-
## Disclaimer
|
| 40 |
-
This AI assistant is for informational purposes only and should not be used as a substitute for professional medical advice, diagnosis, or treatment.
|
|
|
|
| 1 |
+
# Clarity Ops — Two-Phase Medical Analytics Engine
|
| 2 |
+
|
| 3 |
+
This repo implements a universal, scenario-agnostic medical analytics workflow:
|
| 4 |
+
|
| 5 |
+
1) **Phase 1: Clarification Questions** (<=5, grouped by category)
|
| 6 |
+
2) **Phase 2: Structured Analysis** (schema-validated, unit-checked, math-verified, policy-aligned)
|
| 7 |
+
|
| 8 |
+
The engine never invents data. If inputs are missing/ambiguous, it asks for clarifications first.
|
| 9 |
+
|
| 10 |
+
## Quick start
|
| 11 |
+
|
| 12 |
+
1. Populate a scenario in `/packs/<scenario>/` (see `/packs/mdsi` as an example).
|
| 13 |
+
2. (Optional) Put known answers to clarifications in `clarifications.json`.
|
| 14 |
+
3. Run the pipeline (pseudo-call in your orchestration):
|
| 15 |
+
- `run_two_phase.run_clarityops("packs/mdsi")`
|
| 16 |
+
4. Review the final JSON. It passes:
|
| 17 |
+
- JSON Schema validation
|
| 18 |
+
- Unit/range checks
|
| 19 |
+
- Math consistency
|
| 20 |
+
- Policy/constraints adherence
|
| 21 |
+
5. (Optional) Compare against `/packs/<scenario>/expected.json` with the rule-based grader.
|
| 22 |
+
|
| 23 |
+
## Folder overview
|
| 24 |
+
- `/core`: Global medical rules (units, ranges, privacy)
|
| 25 |
+
- `/prompts`: System + two-phase user template
|
| 26 |
+
- `/schemas`: Output schema for Phase 2
|
| 27 |
+
- `/validators`: Hard guardrails (schema/units/math/policy)
|
| 28 |
+
- `/graders`: Rule-based grader for gold answers
|
| 29 |
+
- `/pipeline`: Two-phase orchestration
|
| 30 |
+
- `/packs/<scenario>`: Scenario Pack (inputs, constraints, schema selection, rubric, expected)
|
| 31 |
+
|
| 32 |
+
## Notes
|
| 33 |
+
- This repo shows reference Python code for validators and pipeline. Hook the prompts into your LLM runner of choice.
|
| 34 |
+
- All numbers are examples unless your scenario pack provides them.
|
| 35 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|