AI Search — Cited Answers Across Fibre2Fashion
The new Fibre2Fashion header search: one box that finds supplier and buyer listings, news, articles and trade fairs, and answers in plain words with numbered links to its sources. The prototype has been through three releases and an editorial review; the production site, and the search box in the header of every Fibre2Fashion site, are being built now.

- Year
- 2026
- Type
- Day job
- Role
- Built the prototype with one other developer · production build in progress
- Status
- In progress
What needed solving
The search box in every Fibre2Fashion header ran on Elasticsearch, behind a results site built in 2020: keyword matches in lists, and no answer. A visitor asking which suppliers sell a yarn, or what changed in a market this week, got a page of listings to read. The new search had to answer from Fibre2Fashion's own listings and stories, show where each part of the answer came from, and replace the old box on every site without each site being changed.
The solution
The prototype
An ASP.NET Core app with a plain-JavaScript front end over Google Vertex AI Search: one data store of supplier and buyer listings, news, articles, trade fairs and Fibre2Fashion's own pages, a streamed answer with citations, follow-up questions in the same conversation, and related questions written from the answer's own sources. I restructured it into controllers, services and models behind interfaces, so another answer model can be plugged in, and split its single page into modules. An editorial review listed what read wrong (Turkey and Türkiye as two countries, "UK GDP" answered with France's, author names not found, related questions nobody could answer), and one change worked through the list.
The production version
Now being rebuilt in ASP.NET MVC 5 on .NET Framework 4.8, the framework the Fibre2Fashion sites and their shared header are built on, to the Figma designs: a results page with an AI Overview card that streams its answer, a sources column and a follow-up thread, results re-ranked for recency, related questions, and popular searches from Google Analytics; and a JSON API the header box calls. The header box is a shared embedded view: every site's header renders it server-side, the old Elasticsearch box now returns it, and AMP pages get a plain form to the same results page. Its script and styles are served by the search site itself, so the box and the API it calls always ship together.
What changed
- Three prototype releases in November 2026, and the editorial review's list worked through in one change
- Answers stream: the sources appear in about three seconds and the text follows as it is written, where the card used to sit empty for five to seven
- Searches about 16,800 documents in its latest import — supplier and buyer listings, news, articles, trade fairs and Fibre2Fashion's own pages
- In progress: the production site in ASP.NET MVC, and the AI box replacing the Elasticsearch box in every Fibre2Fashion header, desktop, mobile and AMP
Technical highlights
- The first three pages are re-ranked as 0.8 relevance + 0.2 recency, with a half-life per kind (news 30 days, leads 90, upcoming trade fairs 60): at equal weights a recent half-match ("France's GDP" for "UK GDP") beat older full matches
- The query is read for intent: a named content type becomes a filter, "latest" or "today's" becomes a newest-first sort run by the engine, and those words leave the text that is searched
- Answers cite up to 15 sources, only fibre2fashion.com links survive, and citation offsets are converted from UTF-8 bytes to characters so each numbered pill lands on the right words
- Guardrails tuned against real queries: the adversarial filter is off because it refused "trump tariffs" with 54 matching stories, answers are pinned to English after a misspelt query came back in Indonesian, and the relevance threshold applies only from two words ("Turkey" fell from 219 results to 1)
- Follow-ups continue a server session, so "which of these are in Delhi?" is rewritten against the conversation before it is searched
- The header box keeps the bill down: completions after 120 ms, the billed search only after a one-second pause and three characters, so a fast typist costs one search at most; results and completions are cached for ten minutes and the results page reuses what the dropdown fetched
- A cancelled request cancels the Google call, the same failure is mailed once per 15 minutes rather than once per search, and the gRPC channels are shut down when the app stops, or an in-process restart could not reach Google until the app pool was recycled
// Next step
Need something like this?
I take on a small number of projects each quarter. Let's talk if your idea fits.
// More day job work

News Desk
Human-in-the-Loop Story-Discovery Agent
An automated newsroom agent that reproduces an editorial team's morning routine — harvests ~65 primary and ~75 secondary curated source pages across 17 countries for textile/apparel news, scores and de-dupes the best stories with an LLM, confirms each against its primary source, then drafts publish-ready articles. Two-phase with a human in the loop, streamed live over SSE.
Python 3.11 · FastAPI · OpenAI · Gemini · Claude

AI Article Gen
Document-to-Publish Pipeline
Turns a raw Word document into a publish-ready article package — headline, key takeaways, table of contents, body, SEO metadata, FAQs — plus the DOCX, PDF and HTM artefacts the public site serves.
Python · FastAPI · OpenAI · Claude · Gemini

TexPro
Market Intelligence Rebuild + Moda AI
Fibre2Fashion's paid market-intelligence dashboard for the textile industry, rebuilt from the ground up in Angular 21 — trade, pricing, sustainability and supplier data — with Moda AI, a full-page assistant that streams answers from the dashboard's own data modules, and an MCP server, live for subscribers, that lets Claude and ChatGPT ask TexPro directly.
Angular 21 · TypeScript · Signals · zoneless