Lab Equipment Semantic Engine

Real-time vector search across science lab manufacturing products powered by Next.js, OpenAI & Pinecone

How it Works
Instruction: Enter a search query or click a search prompt preset to test semantic similarity retrieval from Pinecone:

Live Query Processing Pipeline

01

User Prompt

Next.js API

Captures intent & query text

02

Vectorize

OpenAI Embeddings

Translates query into 1,536 math dimensions

03

Similarity Match

Pinecone Vector DB

Finds nearest product coordinates

04

Grounded Answer

GPT-4o Mini (RAG)

Generates response strictly from CMS data

Search result matches will show here.

Engine Diagnostics

Embedding Modeltext-embedding-3-small (1536 dim)
Vector IndexPinecone (Cosine Distance)
CMS Synchronisation
Sanity Webhooks Active

How It Works

An automated pipeline connecting content, vector search, and AI generation.

STEP 01

Content Updates

When an editor creates, edits, or deletes product details in Sanity Studio, Sanity automatically sends a webhook alert to our server.

STEP 02

AI Translation

Our backend sends the updated text to OpenAI, converting words into a list of mathematical numbers (vector coordinates) representing semantic meaning.

STEP 03

Vector Storage

Those mathematical coordinates are saved in Pinecone—a specialised vector database built to compare data meaning at high speed.

STEP 04

Smart Search & Answers

User queries are converted into coordinates, matched in Pinecone, and passed to OpenAI to write an accurate, grounded answer.

Architecture & Deployment

Integration Overview: Flexible AI Discovery Overlay

This solution operates as a flexible AI discovery engine hosted on Vercel. It can be deployed in two distinct ways depending on your enterprise architecture:

Standalone Deployment

Serves as a complete, self-contained AI web solution paired with any frontend rendering engine or CMS (e.g., Next.js, WordPress, or Drupal).

Monolithic Sidecar

Runs alongside your existing enterprise platform (e.g., ASP.NET, Sitecore) to add natural language search and AI visibility without replacing your legacy database or interrupting operations.

The Executive Summary

"Whether built as a new standalone frontend or deployed as a zero-risk sidecar to your monolithic database, this architecture delivers instant AI search, automated catalog sync, and next-generation search engine visibility."

1. Do You Still Need Sanity CMS?

Yes. Sanity acts as a specialised Headless Content Graph that sits parallel to your primary database.

  • Role: Sanity stores complex, interconnected product data (e.g., Equipment → Accessories → Applications) using flexible GROQ queries.
  • Automated Catalog Syncing: Your existing database remains the master record. Whenever an editor updates a product, a background job automatically syncs the changes to Sanity via API. Sanity then immediately refreshes Pinecone (for AI intent matching) and Vercel (for high-speed delivery) in milliseconds.

2. How the System Powers Your Platform Beyond Search

Plug-and-Play AI Search Experience

Embed the search UI onto your existing site using a single line of JavaScript (like Google Analytics) or via a fast CDN routing rule.

Embedded JSON-LD Schemas for AI Engines

Vercel serves an edge-cached API (GET /api/schema/[id]) that your legacy site fetches and injects directly into its HTML <head> tag. This ensures external AI tools (ChatGPT, Perplexity) accurately parse and cite your catalog.

Public AI Discovery Gateways

The system automatically publishes a standardised llms.txt file and an AI-specific sitemap, giving third-party AI crawlers a fast, structured gateway to index your full catalog.

Demand-Driven FAQ Generation

The middleware analyses customer search queries. When interest surges for a specific topic (e.g., "Best centrifuges for cold room assays"), Next.js automatically generates permanent, pre-rendered Q&A pages optimised for Google AI Overviews.