Product / what we are building

Two hundred phones, a natural language search box, and one question: how do you build something that actually understands what a user means? Eight layers. Each fixes one failure of the version before it.

After
(, ) →
recommend
The full 8-layer pipeline — what we are about to build, step by step
query_user
Natural language from the user — "something for my mom who struggles with technology"
phones
The catalogue — phones.json with 200 phones, pre-embedded in phones_embeddings.json
response
A grounded, personalised recommendation the user can act on
# The product

A phone recommender for the Indian market.

User: "something for my mom who
       struggles with technology"

The finished system:
→ understands natural language intent
→ searches 200 phones semantically
→ returns a grounded recommendation
→ answers follow-up questions
→ remembers preferences across sessions
→ checks live stock and current pricing

# Natural language in. Honest answer out.

The finished product understands what a user means — not just what they typed. Eight layers make this possible.

1 / 5

What you build

  • Clone the repo: git clone https://github.com/llmfn/phones
  • phones.json and phones_embeddings.json are included — no download needed
  • Follow the setup instructions in the repo README to configure your API key
  • Run the baseline: uv run layer1/app.py

What it fixes

You have a working baseline — BM25 keyword search over a real product catalogue. Every layer from here is motivated by a specific failure of this foundation.

phones.json
The product catalogue — 200 phones, each with specs (structured), signals (use cases and personas), and a narrative field written for semantic search.
fn
The LLM call — the fundamental unit of the pipeline. Takes inputs, returns a shaped output. fn appears in every layer from Layer 2 onward.
query_user
The raw natural language input from the user. The first thing that enters the pipeline. Never modified — always passed through unchanged alongside any rewrites.
Pipeline
The sequence of fn calls and search operations that transforms query_user into response. Each layer adds one argument or step to justify its existence.
The Middle Law

The interesting part of an LLM product is not the model. The model is the middle.

A user types "something for my mom who struggles with technology" into the search box. Zero results. Not because the phone doesn't exist — it does. Because the search box matches tokens, not intent. The product is technically functional. It is useless. Eight specific failures need eight specific fixes.

What it reveals

Natural language intent is invisible to the baseline. "something for my mom" returns zero matches. The 8 layers ahead fix this — one failure at a time.