Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IntentArena

AI Commerce Content Stress Test

Make product content AI-recommendable.

IntentArena helps brands test how AI shopping agents understand their products, discover why a product loses a recommendation, make a targeted content improvement, and measure the impact against the same shopper intent.

Measure what agents understand. Fix only what matters. Prove the lift.


Why IntentArena?

Traditional product optimisation asks:

"Is the product content good?"

IntentArena asks:

"Can an AI shopping agent understand the product well enough to recommend it?"

A product can be a strong fit for a shopper but still lose when important decision-making information is missing, unclear, or difficult for an AI agent to use.

IntentArena turns this into a measurable optimisation loop.


How IntentArena Works

Upload Product
      ↓
Product Twin
      ↓
Generate Shopper Agents
      ↓
AI Arena
      ↓
Identify Why It Lost
      ↓
Fix Current Query
      ↓
Human Review
      ↓
Create New Product Version
      ↓
Same Shopper Rerun
      ↓
Measure Lift

The key idea is that IntentArena does not simply rewrite product content and run a completely different test.

It keeps the shopper intent constant so the effect of the content change can be measured.


Core Features

🤖 Shopper Agents

Generate diverse, realistic shopping intents with:

  • Natural-language queries
  • Hard requirements
  • Preferences
  • Different budgets and priorities

🏆 AI Arena

Evaluate the target product against simulated competitors for a specific shopper intent.

The Arena produces a ranking based on how well each product matches the shopper.

🔍 Failure Analysis

When the target product loses, IntentArena identifies the product information that was insufficiently communicated for that shopper.

✏️ Targeted Content Improvement

Generate a small, focused content improvement rather than rewriting the entire product description.

The improvement is designed to better communicate an existing product strength relevant to the shopper.

👤 Human Review

Suggested changes are not automatically applied.

Users can:

Reject
Edit
Accept

Only accepted or edited suggestions create a new Product Version.

🔄 Same-Query Rerun

After a content improvement, the same shopper query is rerun against the new Product Version.

This allows the change in ranking to be measured under controlled conditions.

📚 Product Versioning

Every accepted improvement creates a new Product Version while preserving previous evaluations.

Product
│
├── V1
│   └── Shopper Results
│
├── V2
│   └── Shopper Results
│
└── V3
    └── Shopper Results

Previously completed shoppers remain associated with the Product Version they were evaluated against. They are not rerun automatically after a content update.

Current and future evaluations use the latest Product Version.


Product Optimisation Loop

For a losing shopper query:

Current Product Version
          ↓
AI Arena
          ↓
Product loses
          ↓
Failure Analysis
          ↓
Content Opportunity
          ↓
Suggested Improvement
          ↓
Human Review
      ↙       ↓       ↘
   Reject    Edit    Accept
               ↓
        New Product Version
               ↓
        Same Shopper Query
               ↓
          AI Arena Again
               ↓
          Compare Results

The objective is not to guarantee that the product wins.

The objective is to determine whether better product communication changes what an AI shopping agent understands.


Setup

Requirements

  • Node.js
  • PostgreSQL
  • OpenAI API key

1. Clone the repository

git clone https://github.com/kelv5/IntentArena.git
cd IntentArena

2. Install dependencies

Backend:

cd server
npm install

Frontend:

cd ../client
npm install

3. Configure environment variables

Create:

server/.env

Add the required database and OpenAI configuration.

Example:

DATABASE_URL="postgresql://USER:PASSWORD@localhost:5432/intentarena"
OPENAI_API_KEY="your_api_key"

Do not commit .env files or API keys to GitHub.

4. Set up the database

From the server directory:

npx prisma generate
npx prisma migrate dev

5. Start the backend

cd server
npm run dev

The backend runs on:

http://localhost:3001

6. Start the frontend

In another terminal:

cd client
npm run dev

The frontend runs on:

http://localhost:3000

Architecture

┌──────────────────────────────────────────┐
│                  Client                  │
│                                          │
│          Next.js + React + TypeScript    │
│                                          │
│  Product Upload                          │
│  Shopper Agents                          │
│  AI Arena                                │
│  Failure Analysis                        │
│  Fix Current Query                       │
│  Results / Version History               │
└──────────────────┬───────────────────────┘
                   │
                   │ HTTP / REST API
                   ↓
┌──────────────────────────────────────────┐
│                 Server                   │
│                                          │
│             Express + TypeScript         │
│                                          │
│  Product Routes                          │
│  Simulation Routes                       │
│  Arena Routes                            │
│  Fix Current Query Routes                │
│                                          │
│  Product Service                         │
│  Shopper Service                         │
│  Simulation Service                      │
│  Arena Service                           │
│  Fix Current Query Service               │
└──────────────┬───────────────┬───────────┘
               │               │
               ↓               ↓
      ┌────────────────┐  ┌────────────────┐
      │   OpenAI API   │  │   PostgreSQL   │
      │                │  │                │
      │ Extraction     │  │ Products       │
      │ Generation     │  │ Versions       │
      │ Ranking        │  │ Shoppers       │
      │ Diagnosis      │  │ Results        │
      │ Improvements   │  │ Suggestions    │
      └────────────────┘  └────────────────┘
                               │
                               ↓
                         ┌────────────┐
                         │   Prisma   │
                         │    ORM     │
                         └────────────┘

Tech Stack

Layer Technology
Frontend Next.js, React, TypeScript
Backend Node.js, Express, TypeScript
AI OpenAI API
Validation Zod
Database PostgreSQL
ORM Prisma
API REST / HTTP

Project Structure

IntentArena/
├── client/
│   └── src/
│       └── app/
│           ├── test-upload/
│           ├── shopper-agents/
│           ├── arena/
│           ├── fix-current-query/
│           └── results/
│
├── server/
│   ├── prisma/
│   │   └── schema.prisma
│   │
│   └── src/
│       ├── routes/
│       │   ├── product.routes.ts
│       │   ├── simulation.routes.ts
│       │   ├── arena.routes.ts
│       │   └── fix-current-query.routes.ts
│       │
│       └── services/
│           ├── product.service.ts
│           ├── simulation.service.ts
│           ├── shopper.service.ts
│           ├── arena.service.ts
│           └── fix-current-query.service.ts
│
└── README.md

Prototype Scope

The current prototype focuses on running shoes and uses simulated competitors and shopper agents.

The architecture is designed to extend to:

  • Other product categories
  • Larger product catalogues
  • Batch catalogue testing
  • Multi-model evaluation
  • CSV imports
  • PIM integrations
  • Commerce platform integrations

Future Direction

IntentArena is built around one principle:

AI-commerce optimisation should be measurable at the level of shopper intent.

Instead of rewriting an entire catalogue and hoping AI systems respond differently, IntentArena provides a controlled optimisation loop:

What did the agent understand?
            ↓
Why did it make that decision?
            ↓
What content matters?
            ↓
Did the change improve the result?

Test it. Fix it. Prove the lift.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages