
AIHazardDetectionforElderCare:HazardLens
AproofofconceptforaseniorcareSaaScompanythatwantedtocatchdangersbeforearesidentgetshurt.HazardLenslooksatcameraimagesfromcarefacilities,flagsriskslikewaterspills,andgotitright98%ofthetimeintesting.
Who is the client and what did they need?
The client is a SaaS company that builds digital tools and automation software for elderly care facilities. Their products already help care homes run day to day. The next thing they wanted to try was AI that can watch for danger.
The idea was simple to say and hard to build. Take the camera feeds and photos a facility already has, and let software look for hazards in them. A water spill on a hallway floor is a good example. For a senior resident, that small puddle can mean a fall and a serious injury. If the system sees it first, staff can clean it up before anyone walks through.
Before putting real money into a full product, the client wanted proof that the idea works. They came to Xpiderz for our AI and prompt engineering experience and asked us to build a proof of concept. We called it HazardLens.
Why did we pick an LLM for image classification?
There is more than one way to teach software to read an image. We went with large language models that can also see images, and the reason was practical. They are simple to set up, and they are easy to change later.
What mattered most here was telling image labels and classes apart. Is this floor clear, or is there a hazard on it? An LLM handles that kind of question well, and you steer it with a prompt, not with months of custom model building. For a proof of concept that had to give a clear answer fast, that was the right fit.
How does HazardLens work?
HazardLens does its job in two steps. First it learns, then it judges. In the learning step, the system writes and improves its own prompt from a set of labeled images. In the judging step, it uses that saved prompt to classify new images as they come in.
We taught it with four classes of sample images, covering scenes that are clear and scenes where a hazard is present. Everything runs on AWS. Lambda handles the work each time an image arrives, and Bedrock hosts the models that do the looking. Bedrock returns a label for each image and hands the result back to Lambda.
Under the hood, HazardLens has four working parts:
-
Automated Training
You give the system a new set of images with labels. It then does its own prompt engineering, trying a prompt, checking the results, and improving it. After a few rounds, the best prompt is saved so it can be used in daily operation.
-
Inference
When a new image comes in, the system puts together the image, the classification task, the labels, and the saved prompt. Out comes the final answer: is there a hazard in this picture or not.
-
Serverless on AWS
AWS Lambda is the event-driven compute layer, so the system only runs when there is an image to check. Images sit in S3, and Bedrock gives access to the models. Python, boto3, and LangChain tie the pieces together.
-
More Than One Model
We did not bet on a single LLM. We tested the setup with a suite of models, including Anthropic Claude and Amazon Nova, to see how the results hold up when the model changes.
Can it detect more than water spills?
Yes, and that turned out to be one of the most useful findings. Our validation showed the approach works well across different LLM setups, which confirmed the idea is technically sound and not tied to one model.
It also means the system is easy to retrain for a new job. Fire detection and warehouse analytics are two examples. All it takes is a new image feed and an updated script that changes the labels and prompts. The same pipeline then learns the new task, spots unusual patterns, warns staff, and helps stop incidents before they happen.
Measured Results
What do the numbers say?
What a small proof of concept showed about AI hazard detection in care facilities.
What did the client get out of it?
The client received a validated proof of concept that answers their main question. Yes, a real-time AI application for hazard detection can be built, and it can be accurate.
- 98% accuracy on a small scale. Even with a limited set of images, the model was very precise at pointing out possible safety threats.
- Less risk in the investment. The client now has real test data behind the decision to fund a full product, not just a good feeling about it.
- A base to build on. The same pipeline can be pointed at new hazards and new settings without starting over.
What happens next?
With the idea proven, we are working with the client to plan the next stage. The goal is to grow the HazardLens proof of concept into a full AI application that care facilities can use every day.
Have an AI idea you want to test first?
Tell us what you want to prove. We reply within 48 hours, and everything you share stays confidential.








