Case study

2025

AI Photo Critique

Applied AIFocus: Multimodal analysis, retrieval pipeline, feedback design

A photo critique tool that combines GPT-4o, LangChain, Pinecone, and a structured feedback interface.

The problem

Useful photo feedback is difficult to find. Friends often say that a photo looks good. Online advice can conflict. Professional reviews cost money and take time.

I had the same problem with my work. I could see that a photo needed improvement, but I could not always identify the cause.

Generic AI feedback did not solve this problem. It often praised the composition without a clear reason. It could also give advice without relevant photography context.

I wanted specific feedback that a photographer could use. I also wanted the model to refer to selected photography material during each critique.

How I built it

The app uses Retrieval-Augmented Generation (RAG). This method adds selected reference material to the model prompt for each request.

The critique has four steps:

  1. GPT-4o examines the uploaded photo. It describes the subject, light, color, and composition.
  2. The app converts that description to an embedding. Pinecone uses the embedding to find related text from the reference material.
  3. LangChain adds the selected text and image description to a prompt.
  4. GPT-4o writes the critique and sends it to the interface as a stream.

I can update the reference material without model training. The ingestion script splits PDF files into text chunks and saves their embeddings in Pinecone.

The critique experience

I used two sections: "What Works Well" and "Areas for Improvement." This structure identifies strengths before it gives direct advice.

The system prompt requires these sections. It also asks for specific guidance about composition, light, and technique.

The interface renders the response as Markdown. It keeps the photo above the critique and shows a changing status before the first text arrives.

The response then appears as a stream. After the critique is complete, the photographer can select another photo.

Limits and service protection

The app permits three requests from one IP address during a rolling one-hour period. Upstash Redis stores the request count.

If the limit is reached, the API returns a 429 response. The interface gives a general request error, but it does not show the exact reset time.

The current upload control asks the browser for an image file. The server checks that a file exists. It does not yet verify file size or MIME type.

The critique also depends on Pinecone. If retrieval fails, the request fails. The app does not make a critique without the reference material.

These limits are important. They define what the current product does, and they show where it still needs work.

What I learned

RAG fit the product better than model training. I can change the reference material without a new model or a training process.

Prompt structure has a large effect on quality. A clear role and response format produced more useful results than a short request.

Each step affects the next step. An incomplete image description can cause the system to select less relevant text.

A public AI tool needs cost controls. The request limit protects a small project from automated use and unexpected API costs.

Clear output is part of the product. The two-section format makes the critique easier to scan and use.