WaterLens
Inspiration
When you see unusual water in a river, canal, lake, or drainage system, the first question is usually simple:
"What is happening here?"
But getting a useful answer is not simple.
A photograph can show that water looks cloudy, discolored, or unusual, but it cannot tell you whether the water contains bacteria, chemicals, heavy metals, or other contaminants. At the same time, relevant information about the location may be scattered across maps, public reports, environmental records, news articles, and other sources.
We wanted to explore whether AI could help people investigate these observations without pretending that a photograph alone can prove something it cannot.
That led to WaterLens.
Instead of asking an AI model to simply look at a photograph and guess whether water is safe, WaterLens combines visual observations with geographic context and publicly available evidence, then separates what was observed, what was found, and what can reasonably be inferred.
Our goal is simple:
See water. Find context. Follow the evidence.
What We Built
WaterLens is an AI-powered environmental investigation tool.
A user provides:
- A photograph of a water source
- Its geographic location
- An optional observation or note
WaterLens then runs an investigation pipeline:
Photo + Location
│
▼
Visual Analysis
│
├──────────────► Geographic Context
│ │
▼ ▼
Research Planning
│
▼
Web Search
│
▼
Evidence Synthesis
│
▼
Assessment
The interface exposes these stages while the investigation is running, so the user can see the system analyzing the photograph, mapping the surrounding area, researching relevant information, finding sources, synthesizing evidence, and building the final assessment.
The result is not just an AI-generated paragraph. WaterLens produces a structured investigation that distinguishes between observations, external evidence, and inference.
Observation → Evidence → Inference
This separation is the core idea behind WaterLens.
Observation
Something directly visible in the photograph.
For example:
"The water appears brown and cloudy."
This is an observation, not proof of contamination.
Evidence
Information retrieved from external sources.
For example:
"A public report documented elevated turbidity in the surrounding basin."
This is evidence because it comes from an external source that can be traced back to its URL.
Inference
A conclusion drawn by combining observations and evidence.
For example:
"The available findings raise concern, but do not establish contamination at this exact location."
Only the final assessment stage is allowed to make this kind of inference.
This structure was important to us because an AI system should not turn uncertainty into confidence simply because the user asked a question.
Geographic Context
A photograph becomes much more useful when we know where it was taken.
WaterLens uses geographic data from OpenStreetMap through Overpass and Nominatim to understand the surrounding area.
Depending on the location, this can provide context such as:
- Nearby waterways
- Mapped features
- Settlements
- Infrastructure
- Surrounding geographic relationships
- Approximate upstream context
The upstream analysis is intentionally treated as an approximation rather than a complete hydrological model.
That distinction matters because geographic proximity does not automatically establish causation.
Web Research
WaterLens also searches publicly available information relevant to the investigation.
The system uses the location and visual context to guide research, retrieves relevant sources, classifies them, and extracts useful evidence.
The important part is that the model does not have to rely entirely on what it already knows.
Instead:
Location
+
Visual observations
+
Web research
↓
Relevant evidence
Sources remain associated with their URLs so that the investigation can be grounded in information that the user can actually inspect.
Responsible Uncertainty
One of the most important decisions we made was to make INSUFFICIENT_DATA a valid outcome.
WaterLens is not a laboratory.
A photograph cannot directly measure:
- Bacteria
- Chemicals
- Heavy metals
- Contamination levels
- Potability
Even if an image looks suspicious, that does not mean the water has been scientifically proven to be contaminated.
Likewise, finding a report about a nearby waterway does not automatically mean that the report describes the exact location being investigated.
When the available evidence is not strong enough, WaterLens should say:
INSUFFICIENT_DATA
rather than inventing certainty.
We believe this is an important property for AI systems working with environmental information.
Sometimes the most responsible answer is:
"We don't know yet."
How We Built It
WaterLens is built as a Next.js and TypeScript application.
The AI pipeline uses different models for different parts of the investigation rather than asking a single model to do everything.
NVIDIA Vision
│
▼
Cerebras
Research Planning
│
▼
Web Search
│
▼
Cerebras
Evidence Synthesis
│
▼
Groq
Final Reasoning
│
▼
Risk Assessment
The main technologies include:
- Next.js for the application
- TypeScript for the application and pipeline
- NVIDIA NIM for visual analysis
- Cerebras for research planning and evidence synthesis
- Groq for final reasoning
- OpenStreetMap for geographic data
- Overpass for geographic queries
- Nominatim for geocoding
- Search API for web research
- Supabase for persistence and image storage
- Vercel for deployment
The investigation progress is streamed to the browser so the UI can reflect real pipeline stages instead of using a fake loading animation.
Challenges
The biggest challenge was not simply making the AI produce an answer.
It was making the answer trustworthy enough to be useful.
AI models are very good at producing confident-sounding explanations, even when the available evidence is weak. That creates a serious problem for environmental questions.
We therefore had to design the pipeline around uncertainty.
The system needed to:
- Keep visual observations separate from external evidence.
- Keep retrieved sources separate from model-generated conclusions.
- Prevent untrusted web content and user notes from becoming model instructions.
- Avoid claiming that water is safe based only on an image.
- Reduce confidence when the supporting evidence is weak.
- Fall back to
INSUFFICIENT_DATAwhen a stronger conclusion is not justified.
Another challenge was operating within free-tier infrastructure.
The investigation combines multiple external services, each with its own rate limits and latency. We had to design the pipeline so that individual stages could degrade gracefully instead of causing the entire investigation to fail.
This led us to use different models for different tasks and to make the pipeline deadline-aware.
What We Learned
The biggest lesson was that building an AI application is not just about choosing a powerful model.
The surrounding system matters just as much.
For WaterLens, the difficult part was connecting:
Vision
+
Maps
+
Web Search
+
Evidence Extraction
+
Reasoning
+
Uncertainty
into one coherent investigation.
We also learned that knowing when not to answer is a feature.
A system that confidently produces an unsupported conclusion may look impressive in a demo, but it is much less useful in the real world.
Designing WaterLens around evidence and uncertainty changed the way we think about AI applications: instead of optimizing only for the most convincing answer, we should also optimize for whether the answer is justified.
What Makes WaterLens Different
WaterLens is not trying to be another chatbot that answers:
"Is this water polluted?"
It is trying to turn that question into an investigation.
Instead of:
Image → AI guess
WaterLens aims for:
Image
+
Location
+
Geographic context
+
Public evidence
+
Source traceability
↓
Structured assessment
That makes the result more transparent and gives the user a path to investigate further.
Earth Forward
WaterLens was built with the Earth Forward theme in mind.
Environmental information is often available, but it is not always easy for ordinary people to connect it to what they are seeing around them.
A strange-looking waterway is local.
A public environmental report may be somewhere else.
A map contains another piece of the puzzle.
A news article may contain another.
WaterLens brings these pieces together into a single investigation workflow. We hope this can make environmental context easier to explore and help people ask better questions about the places around them. WaterLens does not replace professional environmental testing or official investigations. It helps people take the first step:
Look closer. Find the evidence. Understand the context.
Built With
- cerebras
- groq
- next.js
- nominatim
- nvidia-nim
- openstreetmap
- overpass
- search-api
- supabase
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.