id string | category string | task string | constraints list |
|---|---|---|---|
PWR01 | power | Plan a workflow for routine administrative records. | [
"Electricity may be unavailable for several hours.",
"Staff must preserve records and avoid duplicate entries."
] |
PWR02 | power | Recommend a process for completing administrative work during outages. | [
"The facility has intermittent electricity.",
"There is no budget for immediate infrastructure upgrades."
] |
PWR03 | power | Suggest a continuity plan for a digital administrative workflow. | [
"Power interruptions are unpredictable.",
"Staff must follow approved downtime procedures."
] |
SW01 | software_failure | Recommend a response when hospital software becomes unavailable. | [
"The cause of the failure is unknown.",
"The restoration time is unknown."
] |
SW02 | software_failure | Plan how staff should respond to a failed software update. | [
"Staff cannot administer the software themselves.",
"Authorized ICT support must approve technical changes."
] |
SW03 | software_failure | Recommend a process for recovering interrupted administrative work. | [
"The application is temporarily unavailable.",
"Existing records must not be overwritten or duplicated."
] |
CMP01 | computer_availability | Design a workflow for staff entering routine digital records. | [
"Several staff members share limited computers.",
"No new computers can be purchased this quarter."
] |
CMP02 | computer_availability | Suggest a practical way to schedule digital administrative tasks. | [
"Only a few functioning workstations are available.",
"Staff have competing administrative responsibilities."
] |
CMP03 | computer_availability | Recommend a phased plan for expanding digital recordkeeping. | [
"Computer availability is limited.",
"The hospital must continue its existing administrative work."
] |
STF01 | staff_guidance | Recommend a plan for helping staff use a hospital application. | [
"Some staff have limited experience with the software.",
"Only short training sessions can be scheduled."
] |
STF02 | staff_guidance | Suggest a way to reduce repeated user errors in a digital workflow. | [
"Formal training resources are limited.",
"Staff need simple instructions they can consult during work."
] |
STF03 | staff_guidance | Plan the introduction of a new administrative software feature. | [
"Staff familiarity with the existing system varies.",
"The workflow must remain operational during training."
] |
REC01 | incomplete_records | Plan a transition from paper records to digital recordkeeping. | [
"Some historical records are incomplete.",
"Existing records must not be silently discarded."
] |
REC02 | incomplete_records | Recommend a process for reconciling paper and electronic records. | [
"Some records exist only on paper.",
"Staff must identify potential duplicates."
] |
MIX01 | combined | Propose a practical plan for improving routine administrative workflows. | [
"Electricity is unreliable.",
"Computers are shared.",
"Some staff need additional software guidance.",
"Some records remain on paper."
] |
Can Small Language Models Plan Hospital Workflows Under Operational Constraints?
Abstract
This project evaluates whether constraint-aware prompting improves a small language model's ability to produce feasible hospital administrative workflow plans under operational constraints. The experiment uses Qwen3-4B and 15 fictional scenarios covering power outages, software failures, limited computer availability, staff guidance, incomplete records, and combined constraints.
Each scenario was evaluated under two prompting conditions: standard prompting and constraint-aware prompting, producing 30 model responses. Responses were manually scored across four dimensions: constraint adherence, feasibility, assumption control, and adaptation specificity. Each dimension received a score from 0 to 2, for a maximum total score of 8.
In this preliminary evaluation, constraint-aware prompting achieved a mean total score of 6.87, compared with 6.53 for standard prompting. No constraint violations were recorded in the 15 constraint-aware responses, while 4 of the 15 standard responses were recorded as violations. These results are descriptive and limited to the scenarios, model, prompts, and scoring procedure used in this experiment.
1. Motivation
1.1 Lived Experience and Research Motivation
My interest in this problem comes from my background in computer science and my work as a hospital System Analyst. My experience with hospital information systems, including Smart Clinic at Federal Medical Centre (FMC) Jalingo, has motivated me to think about the practical challenges of using digital systems in healthcare environments.
Hospital digitalisation is not determined by software functionality alone. The ability to use a system also depends on electricity availability, functioning software, access to computers, staff familiarity with digital procedures, and the completeness of available records.
These considerations have shaped the question I want to investigate: Can an AI model recommend a workflow that is not only logically reasonable but also feasible under the operational conditions in which hospital staff must carry it out?
I remembered a time when I used to work along and help nurses and doctors to show them how to use the software for clinical consultations as well as how to enter patients vitals. Some challenges then was the instability of electricity and shortage of access to computers.
1.2 The Underexplored Blind Spot
I hypothesise that language models can generate convincing administrative workflow recommendations without consistently accounting for the operational constraints that determine whether those recommendations can be implemented.
For example, a model might recommend immediately entering outstanding records into an electronic system without checking whether electricity is available, the software is functioning, or sufficient computers are accessible. The recommendation might appear reasonable in an ideal environment but become impractical under the stated conditions.
The blind spot I am investigating is the gap between generating a plausible workflow and generating a workflow that respects real-world operational constraints.
I will examine five categories of constraints:
- Power availability: How should a workflow adapt when electricity is unavailable?
- Software reliability: What should staff do when the digital system fails?
- Computer availability: How should work be organised when computers are limited or shared?
- Staff guidance: How should recommendations account for staff who require additional guidance?
- Record completeness: How should staff handle missing or incomplete records without inventing information?
I will also examine scenarios in which multiple constraints occur simultaneously.
1.3 Why Standard Benchmarks May Miss This Gap
Many language-model benchmarks evaluate factual knowledge, mathematical reasoning, coding, instruction following, and general problem-solving. However, performance on these tasks does not necessarily demonstrate that a model can create feasible operational plans under infrastructure and resource constraints.
A task may reward a coherent answer without testing whether the proposed actions depend on unavailable electricity, functioning software, accessible devices, trained staff, or complete records.
My hypothesis is that this gap may be underrepresented in evaluations that assume ideal operating conditions. I do not assume that all existing benchmarks overlook these factors; rather, I want to investigate whether explicitly representing such constraints exposes weaknesses that general reasoning evaluations may not reveal.
1.4 Why the Gap Matters
In hospital administration, impractical recommendations can waste staff time, increase confusion during system interruptions, or create risks of duplicated and inconsistent records. An AI-generated plan should therefore be evaluated not only for clarity and logical structure but also for whether its proposed actions are feasible under the stated conditions.
This question is particularly relevant to digital transformation in resource-constrained environments, including parts of Nigeria. AI systems intended for these settings should account for the operational realities of the people using them rather than assume that ideal infrastructure is always available.
This project focuses on non-clinical administrative workflow planning, not diagnosis or treatment. My objective is to investigate whether a small language model can consistently translate operational constraints into practical recommendations and whether constraint-aware prompting can improve its performance.
2. Research Questions
RQ1. Does constraint-aware prompting improve the overall quality of hospital administrative workflow plans compared with standard prompting?
RQ2. Does constraint-aware prompting reduce observed violations of explicitly stated operational constraints?
RQ3. How do the two prompting conditions compare across constraint adherence, feasibility, assumption control, and adaptation specificity?
3. Model and Reproducibility
- Model:
Qwen/Qwen3-4B - Model repository: https://huggingface.co/Qwen/Qwen3-4B
- Resolved model revision:
1cfa9a7208912126459214e8b04321603b3df60c - License metadata:
apache-2.0 - Inference framework: Hugging Face Transformers with PyTorch
- Chat template:
tokenizer.apply_chat_template(...) - Thinking mode: Disabled using
enable_thinking=False - Maximum new tokens: 300
- Decoding: Greedy decoding with
do_sample=False - Padding token:
tokenizer.eos_token_id - Inference context:
torch.inference_mode()
The revision above is the cached snapshot revision reported by the experiment environment. Recording this revision makes the model artifact more reproducible than recording the model name alone.
The generation function used in the experiment was:
def generate_response(
user_prompt,
system_prompt,
max_new_tokens=300
):
messages = [
{
"role": "system",
"content": system_prompt
},
{
"role": "user",
"content": user_prompt
}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
enable_thinking=False,
return_tensors="pt",
return_dict=True
)
inputs = inputs.to(model.device)
with torch.inference_mode():
output = model.generate(
**inputs,
max_new_tokens=max_new_tokens,
do_sample=False,
pad_token_id=tokenizer.eos_token_id
)
generated = output[
0,
inputs["input_ids"].shape[-1]:
]
return tokenizer.decode(
generated,
skip_special_tokens=True
).strip()
No explicit temperature, top-p, or top-k value was passed to model.generate() in this function. The experiment therefore reports the generation arguments actually shown in the implementation rather than assuming additional settings.
4. Evaluation Dataset
The evaluation dataset contains 15 fictional hospital operations scenarios.
| Category | Scenario IDs | Count |
|---|---|---|
| Power outages | PWR01-PWR03 | 3 |
| Software failures | SW01-SW03 | 3 |
| Computer availability | CMP01-CMP03 | 3 |
| Staff guidance | STF01-STF03 | 3 |
| Incomplete records | REC01-REC02 | 2 |
| Combined constraints | MIX01 | 1 |
| Total | 15 |
The scenarios represent operational planning challenges rather than clinical diagnosis or treatment tasks. The model is instructed to avoid making clinical decisions.
Dataset file: evaluation_dataset.jsonl
5. Experimental Methodology
5.1 Prompting conditions
Each of the 15 scenarios was evaluated using two prompting conditions.
Standard prompting
The model was asked to propose a practical workflow, identify immediate and longer-term actions, describe dependencies, and acknowledge unknown information. It was also instructed to avoid clinical decisions.
Constraint-aware prompting
The model was instructed to:
- Identify the stated operational constraints.
- Identify missing information.
- Draft a workflow plan.
- Check each proposed action against the constraints.
- Revise any actions that conflict with the constraints.
- Explain relevant risks and limitations.
5.2 Experimental design
Each scenario was run under both prompting conditions, producing 30 responses in total:
- 15 standard-prompt responses
- 15 constraint-aware responses
The same model and generation function were used for both conditions. The comparison is paired by scenario.
5.3 Manual scoring rubric
Each response was scored on four dimensions, each from 0 to 2.
| Dimension | What it evaluates |
|---|---|
| Constraint adherence | Whether the plan respects the scenario's stated constraints |
| Feasibility | Whether the proposed actions are practically achievable |
| Assumption control | Whether unsupported assumptions are avoided or clearly identified |
| Adaptation specificity | Whether the proposed adaptations respond specifically to the scenario |
The maximum total score is 8 per response.
A separate binary field, constraint_violation, records whether an explicit operational constraint violation was identified:
1- violation recorded0- no violation recordedNA- unclear or not assessable
The violation measure is separate from the total quality score.
6. Results
6.1 Mean quality scores
| Metric | Constraint-aware | Standard |
|---|---|---|
| Mean total score (maximum 8) | 6.87 | 6.26 |
| Mean constraint adherence (maximum 2) | 1.87 | 1.67 |
| Mean feasibility (maximum 2) | 1.53 | 1.33 |
| Mean assumption control (maximum 2) | 1.47 | 1.33 |
| Mean adaptation specificity (maximum 2) | 2.00 | 1.93 |
| Number of responses | 15 | 15 |
Constraint-aware prompting had a mean total score 0.33 points higher than standard prompting.
6.2 Recorded constraint violations
| Prompting condition | Recorded violations | Responses | Rate |
|---|---|---|---|
| Constraint-aware | 0 | 15 | 0.0% |
| Standard | 4 | 15 | 26.7% |
The four standard-prompt responses marked as violations were associated with scenarios CMP01, CMP02, PWR01, and PWR02.
These figures describe the manually evaluated responses in this experiment. They do not establish that constraint-aware prompting eliminates operational violations in real-world hospital settings.
6.3 Paired scenario comparison
For each scenario, the constraint-aware score was compared with the standard-prompt score.
- Constraint-aware score higher: 4 scenarios
- Standard score higher: 1 scenario
- Equal scores: 10 scenarios
- Mean paired score difference (constraint-aware minus standard): +0.33 points
The paired results suggest a modest improvement in overall scores for this dataset, with most scenarios receiving equal scores under both conditions.
7. Discussion
The preliminary results are consistent with the possibility that explicit constraint-checking instructions can improve a model's operational planning responses.
Three observations merit further investigation:
- Constraint adherence: The constraint-aware condition achieved a higher mean adherence score.
- Recorded violations: No violations were recorded in the constraint-aware responses, compared with four in the standard condition.
- Overall score: The mean total score was higher under constraint-aware prompting, although the absolute difference was modest.
The findings should be interpreted cautiously. The evaluation includes only one model, 15 fictional scenarios, two prompting conditions, and manually assigned scores. The results do not establish statistical significance, broad generalizability, or clinical or operational safety.
Before making stronger claims, the violation labels should be checked against the original scenario constraints and the exact model responses. Representative examples should be documented so readers can understand why each response was classified as a violation.
8. Proposed Path Forward
The results of this pilot motivate further investigation into methods that help language models account for operational constraints before recommending a workflow. I propose a combination of constraint-focused data curation, supervised fine-tuning, and explicit constraint verification.
These are proposed research directions; they have not been demonstrated by the current experiment.
8.1 Data Curation: A Constraint-Rich Hospital Workflow Dataset
My first proposal is to build a curated dataset of fictional, non-clinical hospital workflow scenarios that explicitly represent operational constraints.
The dataset should include:
- Single-constraint scenarios: One limitation, such as a power interruption or an unavailable computer.
- Multiple-constraint scenarios: Several simultaneous limitations, such as a software failure combined with limited device availability.
- Changing-condition scenarios: Situations where a resource becomes unavailable or is restored during a workflow.
- Incomplete-information scenarios: Cases where the model must acknowledge uncertainty or ask for clarification rather than invent missing details.
- Conflicting-objective scenarios: Tasks requiring the model to balance speed, record consistency, staff workload, and procedural requirements.
- Recovery scenarios: Situations requiring a safe administrative plan for resuming normal operations after a disruption.
Each example should include the task, available resources, explicit constraints, missing information, acceptable actions, prohibited actions, and an expert-reviewed reference plan where feasible.
Hospital IT personnel and relevant administrative staff should review a sample of the scenarios to ensure that the reference plans reflect practical requirements. The dataset should also include diverse operational contexts instead of treating one hospital as representative of every healthcare facility.
Only fictionalised or appropriately de-identified examples should be published, without confidential institutional information or identifiable patient data.
8.2 Fine-Tuning: Learning from Feasible and Infeasible Plans
A second direction is supervised fine-tuning using high-quality examples of constraint-aware workflow planning.
Each training example could contain:
- An administrative task and its operational context.
- Explicit constraints and missing information.
- A feasible workflow.
- An explanation of how the proposed actions respect the constraints.
- Examples of infeasible recommendations, annotated with the specific constraint violations.
- A corrected workflow that addresses those violations.
This approach could teach the model to distinguish between an action that is generally desirable and one that is actually possible under the stated conditions.
If sufficient high-quality examples become available, I would investigate parameter-efficient fine-tuning, such as Low-Rank Adaptation (LoRA), before attempting a more resource-intensive full fine-tuning procedure.
The adapted model should be compared with the original model using held-out scenarios, including combinations of constraints that were not present in the training set. Evaluation should measure whether fine-tuning improves constraint adherence and operational feasibility without increasing unsupported assumptions or degrading other relevant capabilities.
8.3 Architectural and Inference-Time Adjustment: Constraint Verification
A complementary approach is to introduce an explicit constraint-verification stage into the workflow-generation process.
The proposed pipeline would have six stages:
- Context extraction: Identify available resources, operational constraints, requirements, and unknowns.
- Plan generation: Generate a draft workflow for the requested task.
- Constraint checking: Check each major action against the stated constraints and resource requirements.
- Plan revision: Replace or remove actions that conflict with the constraints.
- Uncertainty reporting: Identify missing information and ask clarifying questions where necessary.
- Human review: Require appropriate personnel to review consequential recommendations before implementation.
The initial implementation could use a structured checklist or rule-based validator. For example, if a scenario explicitly states that no computer is available, a recommendation requiring immediate computer access should be flagged for revision.
A more advanced implementation could use a separate verifier model or a structured representation of resources, dependencies, and permitted actions. These approaches would need independent testing because adding a verification stage does not guarantee that every recommendation will be correct.
8.4 How the Proposed Approach Should Be Tested
Future work should compare three conditions:
- The original model with standard prompting.
- The original model with constraint-aware prompting and verification.
- A fine-tuned model, if adequate data and computing resources are available.
The evaluation should use held-out scenarios, transparent scoring criteria, and ideally independent reviewers. Relevant metrics would include constraint-violation rate, operational feasibility, unsupported-assumption rate, recovery-plan quality, and the frequency with which the model appropriately requests clarification.
The evaluation should also test unseen combinations of constraints to determine whether the model generalises beyond the examples used for training.
8.5 My Preferred Direction
My preferred starting point is constraint-focused data curation combined with explicit constraint verification.
Data curation would make operational limitations a central part of both training and evaluation. Verification would require the model to check whether its proposed actions are consistent with the resources and information actually available.
This is a practical starting point because it can be evaluated before undertaking a resource-intensive fine-tuning experiment. If the approach demonstrates consistent improvements, parameter-efficient fine-tuning could then be explored to make constraint-aware behaviour more reliable and less dependent on detailed prompts.
The current pilot provides preliminary evidence about prompting strategies only. It does not establish that the proposed dataset, fine-tuning procedure, or verification architecture will close the identified capability gap.
9. Limitations
This study has several limitations:
- Small dataset: Only 15 scenarios were evaluated.
- Single model: The experiment used Qwen3-4B only.
- Prompt sensitivity: Results may depend on the exact wording and structure of the prompts.
- Manual scoring: Scores and violation labels may be affected by evaluator judgment.
- Limited validation: The experiment did not test the plans in a live hospital environment.
- Fictional scenarios: Results may not represent the full complexity of actual hospital operations.
- Descriptive comparison: The reported summary does not establish statistical significance.
- No clinical validation: The model was not evaluated for clinical decision-making or patient-care recommendations.
Accordingly, the results should be treated as an exploratory evaluation of prompting strategies, not evidence that the model is ready for autonomous hospital workflow management.
10. Ethical Considerations
All evaluation scenarios are fictional. No real patient records or confidential hospital data were used in the scenario design described here.
The experiment concerns administrative and operational planning, not diagnosis, prescribing, triage, or other clinical decisions. Any future application in a hospital would require appropriate human oversight, privacy and security controls, local workflow validation, and institutional approval.
Model-generated plans should not be executed automatically based solely on this evaluation.
11. Reproducibility and Repository Contents
The repository should contain the following artifacts once each file has been verified and added:
.
├── README.md
├── Hospital_Operational_Constraints_Evaluation.ipynb
├── evaluation_dataset.jsonl
├── model_outputs.csv
├── manual_scores_completed.csv
├── summary_metrics.csv
└── requirements.txt
The notebook should document scenario loading, prompt construction, model inference, scoring-data preparation, metric calculations, and result generation.
The output CSV should preserve the generated responses and enough scenario and condition information to link each response to its evaluation record. The completed scoring CSV should preserve the manual scores and violation labels. The summary metrics file should be generated from those scoring records.
Only list files in the published repository after confirming that they exist and have been uploaded. Do not publish access tokens, private credentials, or confidential data.
Reproduction notes
The reported model revision is:
1cfa9a7208912126459214e8b04321603b3df60c
The recorded generation settings are max_new_tokens=300, do_sample=False, pad_token_id=tokenizer.eos_token_id, and enable_thinking=False.
Python, PyTorch, Transformers, hardware, and other dependency versions should be recorded from the actual experiment environment before publication. They are intentionally not specified here because their exact values have not yet been provided.
12. Conclusion
In this small, paired evaluation, constraint-aware prompting achieved a mean total score of 6.87 out of 8, compared with 6.53 for standard prompting. It also had no recorded constraint violations among 15 responses, while four violations were recorded in the standard condition.
These preliminary results motivate further investigation into explicit constraint-checking prompts for small language models used in operational planning. Larger evaluations, independent scoring, and real-world validation would be necessary before drawing stronger conclusions about reliability or deployment readiness.
- Downloads last month
- 4