"1 Million Tokens Trust Me Bro" 🔍

Testing Your Vendors' Claims
Before They Break Production

Paul-Louis Nech
Staff ML @ Algolia

Raise your hand if you've ever picked a vendor based on their marketing claims 🤚

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Keep it up if you tested those claims before shipping to production ✋

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Yeah. That's what I thought. 😏

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

The Problem 🧩

Building Agent Studio at Algolia

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

The Problem 🧩

Building Agent Studio at Algolia

Marketing claims everywhere:

  • "1M tokens!" (Gemini)
  • "400K context window!" (GPT-5)
  • "Enterprise-grade reliability!"

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

The Stakes ⚠️

  • Wrong choice = production incidents

  • Can't experiment at scale without shipping...

  • Or can we?

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

You don't need a PhD 🎓

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

You need three things 🎯

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

1. Realistic Use Cases 📊

Good: Start with lorem ipsum

  • Test basic retrieval works

  • Establish baseline methodology

  • We did this with pizza facts!

  • Generated with json-generator.com

{
  "title": "History of Pizza Toppings - 10k tokens",
  "introduction": "{{lorem(7, 'paragraphs')}}",  // ← Template
  "personal_note": "I love a good pizza
    with gorgonzola and pistachios.",  // ← Needle 1
  "first_part": "{{lorem(70, 'paragraphs')}}",  // ← Template
  "break_page": {
    "personal_memory": "My first pizza
      was in Orléans, in France.",  // ← Needle 2
    "historical_note": "{{lorem(1, 'paragraph')}}"  // ← Template
  },
  "second_part": "{{lorem(60, 'paragraphs')}}",  // ← Template
  "fun_fact": "Leonardo da Pisa solved
    the Quadrature of the Pie Circle
    problem in 1433?"  // ← Needle 3
}
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

1. Realistic Use Cases 📊

  • Better: Use realistic data
  • CIA Factbook (nested, complex)
  • Blog posts (flat, realistic)
  • Structures your API will actually handle
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

1. Realistic Use Cases 📊

  • Best: Scale progressively

  • 10K → 50K → 100K → 200K → 500K

  • Find where it breaks

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

2. Needle in Haystack 🎯

  • The Test:

  • Hide specific facts at beginning/middle/end

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

2. Needle in Haystack 🎯

🎯 [needle] [...haystack...] 🎯 [needle] [...haystack...] 🎯 [needle]
  • Scale the haystack:

  • 10K → 50K → 100K → 200K → 500K

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

2. Needle in Haystack 🎯

  • Ask the model to retrieve them

  • Measure: Did it find them?

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

3. Reproducibility 🔁

  • Run It 10 Times

  • One success = luck

  • 10/10 successes = reliability

  • 7/10 successes = production risk

  • The Metric:

  • Reliability = Perfect Runs / Total Runs

  • 90%+ = Ship it ✅

  • Below 90% = Investigate ⚠️

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Test Architecture 🏗️

  • The Flow:

  • 1️⃣ Build payload with needles hidden

  • 2️⃣ Send to LLM

  • 3️⃣ Ask specific questions

  • 4️⃣ Check responses

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Test Architecture 🏗️

  • Loop 10 times:
✅ Found all 3 = 100%
⚠ Found 2/3 = 67%
❌ Found 0/3 = 0%
  • Reliability = ✅ / 10
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Value of Information 📈

  • Science to Act 👊

  • Not Science to Know 🤔

  • Value: Quick wins early, then plateau

  • Cost: Tiny, grows exponentially

  • The sweet spot: Stop when cost > value

  • Our timebox: 1 day

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

What I Found 🔬

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Journey 1: Pizza Facts 🍕

  • The Setup:
  • Hidden facts in pizza history
  • 3 needles across document
  • Tested on Algolia RAG
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Journey 1: Pizza Facts 🍕

===== Testing 512_tokens across all endpoints =====
Testing 512_tokens on
  https://generative-us.algolia.com...
Testing 512_tokens on
  https://generative-eu.algolia.com...
Testing 512_tokens on
  https://conversational-ai-dev.algolia.com...

✅ Pizza preference found in 512_tokens
   on generative-us.algolia.com
✅ First pizza experience found in 512_tokens
   on generative-us.algolia.com
✅ Pie quadrature solver found in 512_tokens
   on generative-us.algolia.com

All secrets found on generative-us for 512_tokens
===== ALL TEST RESULTS =====

Endpoint: generative-us.algolia.com
Token Size: 512_tokens
Status: ✅ PASSED

Response: My personal pizza preference is
that I love a good pizza with gorgonzola
and pistachios. I had my first pizza in
Orléans, in France. It was a simple
margherita that changed my appreciation
for authentic cuisine. The person who
solved the Quadrature of the Pie Circle
problem is Leonardo da Pisa in 1433....

Cost for 512_tokens: estimated 0.000$
Total cost: 0.00$
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Mistral: The First Failure ❌

Mistral Small → 8K window

Fails at 10K+ tokens

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Mistral: The First Failure ❌

  • Mistral Small → 8K window

  • Fails at 10K+ tokens

  • Model hallucinated:

  • Said: "Archimedes"

  • Truth: "Leonardo da Pisa"

  • Lesson: Models invent plausible answers

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

The Root Cause 🔍

  • Mistral Small ModelFile:
# Default: num_ctx = 8192
# We never set it!
  • Ollama defaults to 8K
  • Assumption "get advertised limits" was WRONG
  • Never configured num_ctx explicitly

  • Lesson: You don't know what you don't test.
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

GPT-4: Before Fix ⚙️

Before optimization:

Failures at 20K+ tokens

Cutoff was too aggressive

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

GPT-4: After Fix ✅

After graceful cutoffs:

Now handles 64K tokens!

3x improvement

Better strategy > hard limits

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Journey 2: Testing GPT-5 🤖

Months later, asked to give this talk

Time to test OpenAI's latest claims!

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Journey 2: Testing GPT-5 🤖

Test Setup:

  • Blog Posts (flat data)
  • CIA Factbook (nested data)
  • 3 models: nano, mini, standard
  • 10 runs each for reliability
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Blog Posts: Flat Data 📝

Setup:

 70 posts = 100K tokens
140 posts = 200K tokens
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Blog Posts: Flat Data 📝

Results:

Scale nano mini standard
100K 100% ✅ 100% ✅ 100% ✅
200K 100% ✅ 100% ✅ 100% ✅

All models perfect!

{
  "post_author": "Paul-Louis Nech",
  "post_title": "Building an App That Gives
    Music Advice Through a Conversation",
  "post_date_formatted": "Nov 8th 2017",
  "content": "What would a search interface
    without a search box look like? After
    a few weeks of exploration, I created
    an app that gives music advice...",
  "time_to_read": "5 min",
  "...": "~1,973 chars per post"
}
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

CIA Factbook: Nested Data 🗂️

Setup:

10 countries = 133K tokens
15 countries = 192K tokens
20 countries = 258K tokens
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

CIA Factbook: Nested Data 🗂️

  • Results:
Scale nano mini standard
133K 20% ⚠️ 100% ✅ 100% ✅
192K 10% ⚠️ 100% ✅ 100% ✅
258K 80% ⚠️ 100% ✅ 100% ✅
  • Structure matters!
{
  "name": "France",
  "Geography": {
    "Geographic coordinates": {
      "text": "46 00 N, 2 00 E"
    },
    "Area": {
      "total ": {
        "text": "643,801 sq km"
      }
    }
  },
  "People and Society": {
    "Population": {
      "total": {
        "text": "68,305,148"
      }
    }
  },
  "...": "deeply nested structure"
}
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

What This Tells Us 💡

  • Flat structures (blog posts):

  • ✅ All models handle 200K+ tokens

  • Nested structures (CIA Factbook):

  • ✅ Mini/Standard: Handle complexity

  • ⚠️ Nano: Struggles with deep nesting

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

What This Tells Us 💡

  • The bizarre U-curve:

  • 133K: 20%

  • 192K: 10% ⚠️

  • 258K: 80%

  • Nano's performance is unpredictable with nested data

  • Takeaway: Structure matters as much as token count
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

But here's where it gets interesting... 🐛

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

The Plot Twist 🔄

  • Initial Test Results:

  • Nano: 100% ✅

  • Mini: 70% ⚠️

  • Standard: 33% ❌

  • Conclusion:

  • "Cheap models win!"

  • I thought I found something amazing...

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

The Plot Twist 🔄

  • Tried to reproduce:

  • Run 1: nano 100%, std 100%

  • Run 2: nano 100%, std 100%

  • Run 3: nano 100%, std 100%

  • "Wait... everything 100%?" 🤔

  • Different dataset:

  • "Also 100%?" 🧐

  • If you can't reproduce it,
  • you don't understand it.
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

The Bug 🐛

# WRONG (what I did first):
pop_value = pop_total.get("total", "N/A")  # ❌

# RIGHT:
pop_value = pop_total.get("text", "N/A")   # ✅
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

The Bug(s) 🐛

# Also WRONG:
total_area = area_data.get("total", {})    # ❌ missing space!

# RIGHT:
total_area = area_data.get("total ", {})   # ✅ note the space!

My "shocking finding" was a bug in MY test.

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

The Lesson 📚

  • Testing the vendor means testing YOURSELF first.

  • Reproducibility isn't just for science class

  • It's your production safety net

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

The Lesson 📚

  • The twist:

  • Started testing vendors ✓

  • Found my own bugs ✓

  • This PROVES the method works ✓

  • Finding your own bugs is proof you're doing it right

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

What You Can Do Tomorrow 🚀

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

It's Easier Than You Think 💪

Resources Needed:

  • Time: 1 day
  • Cost: Under $50 in API credits
  • Code: ~200 lines Python
  • Skills: Basic scripting
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

It's Easier Than You Think 💪

  • You DON'T need:

  • ❌ Research team

  • ❌ Weeks of work

  • ❌ PhD in ML

  • ❌ Complex infrastructure

  • Just curiosity and stubbornness

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Progressive Testing 📋

  • 1️⃣ Step 1: Run once, validate logic (30 min)

  • Catch bugs early, fix your test

  • 2️⃣ Step 2: Run 10x at small scale (1 hour)

  • Establish baseline reliability

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Progressive Testing 📋

  • 3️⃣ Step 3: Scale up incrementally (2 hours)

  • Find where it breaks

  • 4️⃣ Step 4: Analyze results (1 hour)

  • Make your decision

  • ⏱️ Total: One day, production-ready data

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Red Flags 🚩

During Testing:

  • ❌ Can't reproduce vendor's demo
  • ❌ Performance degrades with realistic data
  • ❌ Reliability below 90% across runs
  • ❌ Latency spikes at scale
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Red Flags 🚩

  • What to Do:
  • → Investigate before production
  • → Document everything
  • → Trust the data, not the marketing
'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

What We Learned: GPT-5 📊

  • Claims:

  • "400K context window"

  • Reality:

  • 400K = 272K input max (architectural split)

  • 200K tokens: Reliable for flat data ✅

  • 258K tokens: Mini/Standard handle nested ✅

  • Nano: Struggles with complexity ⚠️

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

What We Learned: GPT-5 📊

  • Our Decision:

  • Mini = Good balance

  • Standard = Complex reasoning

  • Nano = Simple flat data only

  • Based on DATA, not marketing

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

What About Gemini? 🤔

  • Claims:

  • "1M tokens!" (Gemini 2.5)

  • What We Found:

  • ✅ Perfect accuracy at 42K and 133K

  • ✅ Actually outperformed GPT-5

  • ✅ 2-3x slower but more reliable

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

What About Gemini? 🤔

  • The Problem:

  • Can't test 1M tokens without paying

  • Rate limits (free tier):

  • 250K tokens per minute

  • 250 requests per day

  • 1.29M token test:

  • ❌ Hit rate limit immediately (5 min wait)

  • ❌ Only 250 attempts per day total

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

What About Gemini? 🤔

  • The Lesson:

  • Marketing claims vs testable claims

  • Some features require budget to validate

  • Know your limits:

  • What CAN you test for free?

  • What REQUIRES paying?

  • Plan accordingly

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

LIVE DEMO 🎬

Let's run a reliability test right now.

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

The Core Message 💯

  • "1 Million Tokens Trust Me Bro"

  • "Cool story, show me the data"

  • "I tested it. Here's what works."

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

If You Take Away One Thing 💯

  • Trust, but Verify.

  • Test them yourself.

  • One person, one day, can validate production-critical decisions

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Your Action Items ✅

  • Next Monday:

  • 1️⃣ Pick ONE vendor claim

  • 2️⃣ Design ONE realistic test

  • 3️⃣ Run it 10 times

  • 4️⃣ Make decisions on DATA

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Your Action Items ✅

  • Remember:

  • The vendors won't always tell you the truth.

  • But the data will.

'1M Tokens Trust Me Bro': Testing your Vendors' claims | Paul-Louis Nech | Staff ML @ Algolia

Thank You 🙏

Talk hook: Set the scene - we're here to test bold claims

Let them raise hands, pause for effect

Most hands drop here - that's the point

Friendly pause, smile. Transition: But we can fix this.

Stakes: Making the wrong choice means production incidents

They all sound amazing. But...

Transition: Actually, you CAN test. One person, one day.

Lorem ipsum is actually a good starting point!

Now we're getting closer to production

This is the way. Progressive testing finds the limits.

Core methodology: Hide facts, ask questions, measure retrieval

Progressive scaling finds the breaking point

Find where each model starts to struggle

Reproducibility is everything - catches YOUR bugs too

Simple loop - no complex infrastructure needed

Count perfect runs out of 10 attempts

Know when to STOP gathering info and START acting

This was the first journey - testing our own RAG system

Started promising. But then we scaled up...

First failure point discovered

Key insight: Hallucination is the failure mode

This is why testing matters - assumptions break silently

Our system was the bottleneck

Success: Testing led to real improvements

New journey begins

Comprehensive test across model tiers

First test: Simple flat structures

Good news: 200K works with simple data

Now testing complex nested structures

Nano struggles, shows bizarre U-curve. Mini/Standard perfect.

Choose based on your data complexity

This influenced our model choice

I thought I found something amazing

Wait, this doesn't match. What's going on? This is where reproducibility saved me

Wrong nested key in my extraction code

Humbling moment: I was testing my own bugs, not the models

Finding my own bugs proved the method works

This is actually a success story

Just curiosity and stubbornness

Anyone can do this

Start small, validate, then scale

Four simple steps

These are your signals to dig deeper

Let the data guide your decisions

Nuanced reality vs simple claim

Real decisions from real testing

Gemini was actually impressive... but

"1M tokens" claims need enterprise access to verify

Be realistic about what you can validate in 1 day

Switch to terminal, run live_demo.py

Trust but verify

This is the key takeaway

Actionable - you can start next week

Let data guide your decisions

Scan QR or visit link for everything