Personalised Photo Book Title Generation Using Retrieval-Augmented LLMs

popsa · Tech · 2026 · source Agentic: no · promotional bias: high · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Tech

Popsa wanted to generate better photo-book titles and subtitles for users who often chose generic titles, while meeting strict output format and brand requirements across languages.

Constraints:

Architecture

Popsa's Title Suggestion service starts inside the mobile photo-book workflow: the app reads timestamps/geocoordinates and runs on-device CNNs to identify image features, then the service decrypts/processes the design, reverse-geocodes locations, classifies the subject, and turns the result into a compact book description. A retrieval-based few-shot component fetches similar Photo Book examples and accepted titles from an example database, seeds an Amazon Bedrock conversation with those prior user/assistant examples, and asks Claude or Nova models for valid JSON containing title, subtitle, and category. Later latency work moved from Bedrock InvokeModel to ConverseStream, with FastAPI parsing streaming title-subtitle-category triplets and returning the first valid suggestion immediately while more suggestions continue in the background.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  mobile-photo-book-app["mobile-photo-book-app"] --> on-device-vision["on-device-vision"]
  mobile-photo-book-app --> title-suggestion-service["title-suggestion-service"]
  on-device-vision --> title-suggestion-service
  title-suggestion-service --> reverse-geocoder["reverse-geocoder"]
  title-suggestion-service --> subject-classifier["subject-classifier"]
  title-suggestion-service --> retrieval-few-shot-prompter["retrieval-few-shot-prompter"]
  example-photo-book-database["example-photo-book-database"] --> retrieval-few-shot-prompter
  retrieval-few-shot-prompter --> amazon-bedrock["amazon-bedrock"]
  amazon-bedrock --> streaming-fastapi-parser["streaming-fastapi-parser"]
  amazon-bedrock --> evaluation-loop["evaluation-loop"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
mobile-photo-book-app Collects selected photos and reads image metadata and geocoordinates from the user design. on-device-vision, title-suggestion-service
on-device-vision Runs convolutional neural networks on device to extract visual features such as beach, barbecue, or pet. mobile-photo-book-app, title-suggestion-service
title-suggestion-service Decrypts and processes the design, extracts timestamps, coordinates processing, and builds the description passed to prompting. mobile-photo-book-app, on-device-vision, reverse-geocoder, subject-classifier, retrieval-few-shot-prompter
reverse-geocoder Turns photo latitude/longitude metadata into place context for the book description. title-suggestion-service
subject-classifier Classifies the design subject from object landmarks and extracted features. title-suggestion-service
example-photo-book-database Stores example Photo Books and acceptable title suggestions used for retrieval-based few-shot context. retrieval-few-shot-prompter
retrieval-few-shot-prompter Retrieves similar designs and accepted titles, formats them as conversation examples, and appends the new design document. title-suggestion-service, example-photo-book-database, amazon-bedrock
amazon-bedrock Unified model API used to call Claude 3 Haiku and Amazon Nova models for title generation. retrieval-few-shot-prompter, streaming-fastapi-parser, evaluation-loop
streaming-fastapi-parser Parses ConverseStream output in real time and returns the first valid title-subtitle-category triplet. amazon-bedrock
evaluation-loop Runs guardrail checks, LLM-as-judge evaluation, internal testing, A/B tests, and direct user feedback comparisons. amazon-bedrock

Data flow

A customer selects photos for a book. The mobile app extracts timestamps/geocoordinates and on-device image features, then the Title Suggestion Service decrypts and processes the design, reverse-geocodes coordinates, classifies the design subject, and builds a natural-language description. That description enters retrieval-based few-shot prompting: similar historical photo books and accepted titles are retrieved, formatted as prior conversation examples, and sent through Amazon Bedrock to Claude or Nova. The model returns JSON title/subtitle/category suggestions. In the streaming version, FastAPI validates streamed triplets and returns the first polished suggestion as soon as it is valid.

5 supporting quotes
“When users select photos for a Photo Book design, our mobile app reads metadata—such as timestamps and geocoordinates—from the images and runs on-device convolutional neural networks to extract relevant features.”article, stated
“When our Title Suggestion Service receives a request, it first decrypts and processes the user’s design to extract the timestamps.”article, stated
“For a new Photo Book, we retrieved a few similar Photo Book designs and a random selection of their suggested titles.”article, stated
“we seeded the conversation with these examples as – messages before appending the user’s new design document as the final message.”article, stated
“we extended the FastAPI to parse streams in real time, returning the first suggestion immediately upon validation.”article, stated

Why this architecture

The architecture keeps deterministic product constraints close to the service and uses generative AI only after the design has been summarized into grounded book context. Retrieval-based few-shot prompting won because similar accepted examples let the LLM emulate brand/style while following JSON and category rules. Bedrock's unified API made model-family comparisons cheap, and ConverseStream solved perceived latency by returning the first validated suggestion before the full batch finished.

4 supporting quotes
“Our top results came from Retrieval-based few-shot prompting. We created a database of example Photo Books and acceptable title suggestions.”article, stated
“This allowed the large language model (LLM) to emulate prior responses while naturally following the rules that we defined.”article, stated
“The unified API of Amazon Bedrock has helped us to compare and test new models by flipping model IDs and shipping experiments in hours instead of weeks.”article, stated
“Even if more options are being generated in the background, lowering TTFS makes the feature feel more responsive, so suggestions are visible before the user moves on.”article, stated

Models used: Claude 3 Haiku · Amazon Nova Lite · Amazon Nova Pro · Amazon Nova Micro · on-device convolutional neural networks

Scale

Alternatives considered (roads not taken)

The rule/template Title Suggestion Graph

Rejected because: Retrieval-based few-shot prompting produced more creative, higher-rated suggestions than the earlier graph algorithm.

“This algorithm used the metadata and data of the selected photos to build a list of possible titles, following a set of rules and templates”article, stated
“Comparisons to our previous graph-based method show better results”article, stated

Amazon Nova Micro for production title generation

Rejected because: It beat the legacy graph but lagged other LLMs in user satisfaction, so Popsa focused on the remaining models.

“While Nova Micro-outperformed our legacy Graph method, it lagged in user satisfaction compared to the other LLMs and were set aside.”article, stated

Claude 3 Haiku as the ongoing default

Rejected because: Nova Lite offered nearly identical quality at lower cost and faster response times, while Nova Pro offered the highest satisfaction at higher cost.

“Nova Lite offered near-identical quality to Claude Haiku at lower cost and faster response times.”article, stated
“Nova Pro achieved the highest user satisfaction at 73% positive feedback with the lowest negative feedback at 12%.”article, stated

Waiting for a full batch through the Bedrock InvokeModel API

Rejected because: Streaming via ConverseStream lets the service return the first valid suggestion immediately, improving perceived responsiveness.

“we migrated from the InvokeModel API of Amazon Bedrock to the ConverseStream API, to stream tokens as they are generated.”article, stated
“Additional suggestions continue streaming in the background, but the client already has something ready to display.”article, stated

Patterns

rag-retrieval (retrieval)

For a new photo book, the system retrieves similar examples and their accepted title suggestions as few-shot context.

“For a new Photo Book, we retrieved a few similar Photo Book designs and a random selection of their suggested titles.”article, stated

structured-output-contract (output)

The model is constrained to return valid JSON with title, subtitle, and category keys.

“Finally, all outputs must be valid JSON with keys”article, stated

model-routing (model-operations)

Popsa used Bedrock's unified API to compare Claude and Nova model families by changing model IDs.

“The unified API of Amazon Bedrock proved crucial to their iterative approach, allowing them to compare and test new models by simply changing model IDs rather than rewriting integration code.”summary, stated

Tradeoffs

Move from rules/templates to retrieval-augmented generative suggestions.

Chose retrieval-based few-shot prompting over the Title Suggestion Graph rule/template algorithm.

Rationale: The source says the earlier graph used rules and templates, while top results came from retrieval-based few-shot prompting.

“Our top results came from Retrieval-based few-shot prompting.”article, stated

Prioritize Nova Lite for production economics after model comparison.

Chose Amazon Nova Lite for near-Haiku quality at lower cost and faster response over staying only with Claude 3 Haiku or using Nova Pro everywhere.

Rationale: Nova Pro had the highest user satisfaction, but Nova Lite gave near-identical quality to Claude Haiku with better cost and latency.

“Nova Pro achieved the highest user satisfaction at 73% positive feedback with the lowest negative feedback at 12%.”article, stated
“Nova Lite offered near-identical quality to Claude Haiku at lower cost and faster response times.”article, stated

Stream and validate suggestions incrementally.

Chose ConverseStream with real-time FastAPI parsing over waiting for the entire batch from InvokeModel.

Rationale: Returning the first validated triplet made the feature feel responsive while additional suggestions continued in the background.

“we extended the FastAPI to parse streams in real time, returning the first suggestion immediately upon validation.”article, stated
“Additional suggestions continue streaming in the background, but the client already has something ready to display.”article, stated

Evaluation

Popsa used programmatic guardrail checks, LLM-based quality assessment, internal testing, A/B tests, and user feedback.

Metrics: valid JSON rate · category validity · character-limit compliance · positive user feedback · cost · latency

“After narrowing to two or three top-performing options through this automated evaluation, they conducted extensive internal testing before rolling out to users.”summary, stated

Outcomes

The source reports over 5.5 million personalized titles generated in 2025.

“By moving from the Graph Algorithm to Claude 3 Haiku for generating title suggestions, we increased positive user feedback by 13% (from 58% to 71%).”article, stated