AI Engineer NYC 2026 Online Talks

Your Fridge Is a Valid Payment Device — Eleonora Drykina & Nina Žižakić, In The Pocket

Slide chapters

19 slide and demo groups · Timestamps are approximate.

Payment device categories

A client’s rulebook lists familiar payment devices alongside cuff links, handbags, dresses and refrigerators. The page is one of the documents used to build the speakers’ RAG system.

Text in image
‘3230’ – Card
‘3231’ - Phone Mobile phone
‘3232’ - Tablet/e-reader Tablet computer or e-reader
‘3233’ - Watch/Wristband Watch or wristband, including a fitness band, smart strap, disposable band, watch add-on, and security/ID band
‘3234’ – Sticker
‘3235’ – PC or laptop
‘3236’ - Device Peripheral Mobile phone case or sleeve
‘3237’ - Tag Key fob or mobile tag
‘3238’ - Jewelry Ring, bracelet, necklace, and cuff links
‘3239’ - Fashion Accessory Handbag, bag charm, and glasses
‘3330’ - Garment Dress
‘3331’ - Domestic Appliance Refrigerator, washing machine
‘3332’ - Vehicle, including vehicle attached devices
‘3333’ - Media/Gaming Device Media or gaming device, including a set top box, media player, and television
‘3334’-‘3939’: RFU

1 - 26 or 28 | M | Proprietary Data (Determined by issuer/third party; Default value of '00' if field not used.) | ‘00’

Interface text:
Card Profiles for Wearables.pdf
Page [illegible] of 38
Sort By: Search Rank  Page Order
Refrigerator
Found on 1 page
Done

0:11Demo milestone

The rulebooks

The client's payment scheme spans roughly 270 rulebooks and 6,000 PDF pages. Much of its knowledge sits in tables, while references connect the rulebooks.

Text in image
The rulebooks

Documents with the rules of a national payment scheme.

RULEBOOKS
~270

PAGES OF PDF
~6,000

TABLES
~3,000

REFERENCES BETWEEN RULEBOOKS
~2,000

Rulebooks
[illegible]

Rulebook chatbot example

The chatbot answers that a fridge is listed as a domestic appliance, shows other device types, and cites the rulebook section and page. A follow-up asks about a washing machine.

Text in image
Can I pay with my fridge?

Yes. Device type 3331, “Domestic Appliance”, explicitly lists refrigerators and washing machines (7120 Card Profiles for Wearables, page 16).

Some of the other device types
Code | Device type | Examples
3230 | Card
3233 | Watch/Wristband | Watch or wristband, including a fitness band
3238 | Jewelry | Ring, bracelet, necklace, and cuff links
3330 | Garment | Dress
3331 | Domestic Appliance | Refrigerator, washing machine

SOURCES
7120 · Card Profiles for Wearables
Section 4.2.1 · page 16

Oh, so my washing machine can pay too?

3:15Demo milestone

The whole system

For each rulebook release, offline indexing turns PDFs into chunks and stores embeddings in Qdrant. For each question, an agent searches the database and streams an answer back through FastAPI to the member portal.

Text in image
The whole system

INDEXING · OFFLINE, ONCE PER CORPUS RELEASE

PDFs
one set per corpus release
↓
Text and tables
every page, tables kept intact
↓
Section-aware chunks
+ metadata + LLM rulebook summary
↓
Dense + BM25 embeddings
one of each, per chunk

WRITES →
once per release

Vector database
Qdrant

READS →
hybrid search,
RRF fusion

SERVING · ONLINE, PER QUESTION

Member portal
where the question comes in

question ↓ ↑ streamed answer, SSE

FastAPI
the HTTP + SSE layer

routes to the agent ↓ ↑ the agent’s answer

Agent
Google ADK · four retrieval tools

Indexing the rulebooks

The pipeline splits rulebook PDFs into chunks, adds metadata and processes tables, then generates dense and BM25 embeddings for a Qdrant vector database.

Text in image
Indexing the rulebooks

Rulebooks

01
Split PDFs into chunks

02
Enrich chunks with metadata

03
Special processing for tables

04
Generate two types of embeddings (dense + BM25)

Vector database
Qdrant

Document examples: 2 · 2.1; 2 · 2.1; 3 · 3.1; 6 · 6.5

Split PDFs into chunks

Paragraphs fill chunks of about 2,000 characters without overlap, while tables stay intact. Section paths support citations and let the agent retrieve a whole section in order.

Text in image
Split PDFs into chunks

01 SPLIT   02 METADATA   03 TABLES

4.1
CHUNK 7
4 › 4.1

CHUNK 8
4 › 4.1

4.2
CHUNK 9
4 › 4.2

CHUNK 10
4 › 4.2 › TABLE

CHUNK SIZE
~2,000 characters
paragraphs packed until the chunk is full

OVERLAP
none
a section is its chunks, in order

TABLES
never split
a table stays in one chunk

Enrich chunks with metadata

Each chunk carries metadata for source citations and agent context. Section paths help fetch whole sections, while chunk indexes let the agent put them back in order.

Text in image
01 SPLIT   02 METADATA   03 TABLES

Enrich chunks with metadata

ONE CHUNK

4.3 Device Type
The Device Type identifies the kind of device on which the payment application is personalized. The Issuer shall set it to one of the values listed below, for example ‘3331’ for a domestic appliance such as a refrigerator or washing machine. Values ‘3334’ to ‘3939’ are reserved for future use.

FIELD | VALUE | USED FOR
document_name | 7120 – Card Profiles for Wearables | Source card and PDF link
page_numbers | [15] | Page on the source card
section_hierarchy | 4 › 4.3 Device Type | Citations and fetching a whole section
chunk_index / total_chunks | 14 / 35 | Rebuilding a section in order
rulebook_id | 7120 | Rulebook list for the agent
document_summary | “This rulebook specifies the personalization requirements…” | AI-generated context for the agent
[business logic fields] | … | Agent hints: rulebook type, roles, tables

Special processing for tables

Merged PDF cells become repeated values in CSV rows, helping the agent retrieve the correct fee for each payment type. The speakers say this improved answer correctness.

Text in image
01 SPLIT   02 METADATA   03 TABLES

Special processing for tables

IN THE PDF
Payment | Fee type | EUR
Domestic | Scheme fee | 0.05
         | Processing fee | 0.03
         | Refund fee | 0.10
Cross-border | | 0.15
             | Scheme fee | 0.12

STORED AS CSV
Payment,Fee type,EUR
Domestic,Scheme fee,0.05
Domestic,Processing fee,0.03
Domestic,Refund fee,0.10
Cross-border,Refund fee,0.15
Cross-border,Scheme fee,0.12

Over to the online half

The member portal sends questions through FastAPI to an agent, which searches a vector database of roughly 4,000 indexed chunks. The answer streams back through the same path using SSE.

Text in image
Over to the online half

INDEXING · DONE

~4,000 chunks
each knowing where it lives in its rulebook

SERVING · ONLINE, PER QUESTION

Member portal
where the question comes in

question ↓ ↑ streamed answer, SSE

FastAPI
the HTTP + SSE layer

routes to the agent ↓ ↑ the agent’s answer

Agent
Google ADK · four retrieval tools

READS
↓
hybrid search, RRF fusion

Vector database
Qdrant

Finding the right ten chunks

Dense embeddings and BM25 are fused and reranked to select ten chunks. In a 63-question retrieval evaluation, hybrid search raised hit rate from 92% to 97% without losing any question dense search found.

Text in image
Finding the right ten chunks

01 SEARCH   02 AGENTIC   03 UX   04 LOGGING   05 EVALS

DENSE EMBEDDINGS
Great for meaning. But to an embedding, rulebook codes, message names and field codes look like noise, and they’re often exactly what the member is asking about.

BM25
The mirror image: exact tokens, yes. Paraphrases, no.

HIT RATE, DENSE ONLY
92%

HIT RATE, DENSE + BM25 FUSED
97%

QUESTIONS HYBRID LOSES
0

Agentic retrieval

The agent starts with 10 chunks, then can retrieve whole sections or small rulebooks, or list available rulebooks. This lets it follow cross-references and handle questions that need more context.

Text in image
Agentic retrieval

01 SEARCH   02 AGENTIC   03 UX   04 LOGGING   05 EVALS

AGENT
↓
Google ADK, deciding which tool to call

search_rulebooks
10 chunks, always called first

retrieve_rulebook_sections
whole sections, in order, by section path

retrieve_full_rulebook
an entire rulebook, only for small ones

list_available_rulebooks
what exists

No fixed retrieve-then-generate pipeline. Rulebooks refer to each other, so one question can need several searches, and some questions need a lot of context. A single top-k search doesn't cover that.

Agentic retrieval in practice

Oversized rulebooks and missing sections return section lists so the agent can retry. Before a sixth tool call, it checks whether the search is adding anything new. Median answer time: 38 seconds.

Text in image
Agentic retrieval in practice

• Rulebook too big (>~100k tokens) → the full-rulebook tool refuses, hands back the section list
• Section name not found → hands back the available sections so the agent can retry
• “Tool call discipline”: 2–4 calls for most questions; before a 6th, ask “am I fetching something new, or rephrasing a search that already failed?”

MEDIAN ANSWER TIME
38s
a small research task, not a chat reply

Interface text:
01 SEARCH   02 AGENTIC   03 UX   04 LOGGING   05 EVALS

Our first UI didn’t stream

The first UI used Pydantic component models, so it waited for valid JSON before rendering. Users saw nothing for 38 seconds, then the whole answer appeared at once.

Text in image
Our first UI didn’t stream

EXAMPLE OF A COMPONENT MODEL

class DateComponent(BaseModel):
    type: Literal["date"] = "date"
    label: str
    value: date

class AgentResponse(BaseModel):
    blocks: list[
        DateComponent | TextBlock | SourceCard
        | ChecklistComponent | CollapsibleComponent
    ]

Rulebooks Assistant
31s
nothing to render yet
payload isn’t valid JSON until the last token arrives
only renders once the whole response validates

PROBLEM
You can’t stream a partial Pydantic object. The response only becomes valid JSON once the last token arrives, so the user sees nothing for 38 seconds and then the whole answer at once.

Interface text:
01 SEARCH  02 AGENTIC  03 UX  04 LOGGING  05 EVALS

Stream the text, add the sources after

The client styles markdown token by token, then attaches a clickable source card after the answer finishes. The card holds extra information separately from the streamed prose.

Text in image
Stream the text, add the sources after

Rulebooks Assistant

Yes — under the current device-type rules, a fridge with an embedded secure element qualifies as a valid payment device, provided it meets the certification requirements in section 4.2.1.

Certification still has to be renewed at every rulebook release.

SOURCES
7100 – Terminals
4xxx · Technical
1300 – Ruleboo...
2xxx · Legal

01
Stream markdown
token by token, styled live on the client

02
Attach the source card
added once retrieval is done, separate from the streamed text

The source card never had the streaming problem to begin with. You can still add ready-made components to the answer, as long as they hold extra information that stands on its own, not the answer itself.

Interface text:
01 SEARCH  02 AGENTIC  03 UX  04 LOGGING  05 EVALS

Logging every interaction

Azure Table Storage records questions and answers, tool calls, feedback and source or copy clicks, alongside the last 20 messages as context. The team chose this simple event table for an early-stage product.

Text in image
Logging every interaction

01 SEARCH   02 AGENTIC   03 UX   04 LOGGING   05 EVALS

EVERY INTERACTION
↓
logged to Azure Table Storage

Question & answer
every turn, start to finish

Tool calls
which retrieval tools ran, and their arguments

Feedback
thumbs up or down on the answer

Source & copy clicks
opening a source card, or copying an answer

Conversation context
last 20 messages, sent along as context

The simplest logging solution that fit an early-stage product. A table of events answered every question we actually had.

Evaluating with real questions

Questions come from member testing and behavioural guidelines. About 86 end-to-end tests use an LLM judge and check source citations, alongside a retrieval-only evaluation.

Text in image
Evaluating with real questions

WHERE THE QUESTIONS COME FROM
• Two rounds of user testing with members
• Behavioural guidelines: no advice, stay neutral, and say so when something isn’t in the rulebooks

HOW WE RUN IT
• ~86 end-to-end tests, run with promptfoo
• Full agent → LLM judge (rubric) + source-document match
• Plus the retrieval-only eval from search

Interface text:
01 SEARCH  02 AGENTIC  03 UX  04 LOGGING  05 EVALS

When to trust an eval result

Rerun evals before trusting a change: 5 of 12 flips did not reproduce. Also check the rubric—a judge penalized a date as hallucinated even though it appeared in the rulebook.

Text in image
When to trust an eval result

FIND YOUR NOISE FLOOR

LLM judges give slightly different scores on each run, so rerun before you trust a change. For us, 5 of 12 “flips” between runs didn’t reproduce the second time.

SOMETIMES THE RUBRIC IS THE BUG

A “hallucinated” date the judge kept punishing turned out to be real text, sitting right there in the rulebook.

Interface text:
01 SEARCH  02 AGENTIC  03 UX  04 LOGGING  05 EVALS

Real usage June to September 2026

From June to September, 34 internal users asked 896 questions. AI analysis found that 93% were real questions by the third month and used follow-ups to assess conversations after ratings tapered off.

Text in image
Real usage June to September 2026

01 SEARCH  02 AGENTIC  03 UX  04 LOGGING  05 EVALS

USAGE NUMBERS
896 questions
114 conversations
34 people
4 months
24 👍
9 👎
32 of the 33 ratings came in the first month
91 source clicks
18 answers copied

AI ANALYSIS
01 Red teaming in the first month
1 in 3 messages in the first month tried to break it or were off-topic. By the third month, 93% were real questions.

02 Using it for real cases
Customer emails, raw protocol messages, data tables, a draft reply to check. Long pasted messages went from 8 in the first three months to 21 in September alone.

03 Feedback from follow-up questions
The thumbs went quiet, so we look at the follow-up instead: 49 conversations went well, 6 didn’t.

Main learnings

Section paths help the agent retrieve answers and zoom out. Switching from a single-shot call to agentic retrieval improved evaluation scores; early user interviews supplied evaluation cases and shaped product decisions.

Text in image
CLOSE

Main learnings

• Keep the document's structure. The section path is the field we use most.
• Tables need their own pipeline
• Give the agent zoom levels and let it decide how much context it actually needs
• Agentic retrieval beats a single-shot RAG call
• Stream what's naturally text; add a structured component only where the UX needs one
• Test with real users early. It gives you your eval set, and it shapes the product.

Read the talk

Your Fridge Is a Valid Payment Device

Eleonora Drykina and Nina Žižakić explain how a payment-rulebook assistant preserves table meaning, reconstructs larger passages and widens retrieval—then makes a 38-second answer usable and its evaluation open to challenge.

From a talk by Nina Žižakić and Eleonora Drykina

At a glance

Ideas worth remembering

  • Non-overlapping chunks, section paths and chunk indexes let the agent reconstruct larger passages instead of relying only on isolated search hits.

  • Repeating merged table labels in CSV preserves which categories apply to each row, reducing the risk of retrieving a fee under the wrong heading.

  • Hybrid dense and BM25 retrieval raised the reported retrieval hit rate from 92% to 97% on 63 questions; this was not an end-to-end answer accuracy result.

  • Broader retrieval needs bounded tools: oversized documents return section lists, invalid section names return valid alternatives, and repeated searches trigger reconsideration.

  • Streaming Markdown separately from a completed source card made a median 38-second answer progressively readable.

  • Evaluation changes need investigation: judge decisions can vary between runs, and an incorrect rubric can penalize a fact that is present in the source.

A surprising payment device, a demanding evidence problem

A refrigerator appears in a payment rulebook alongside phones, cards, cufflinks, a handbag and a dress. That is the origin of “Your Fridge Is a Valid Payment Device,” the talk by Nina Žižakić, an AI engineer, and Eleonora Drykina, a product engineer at In The Pocket. Their assistant serves an anonymous Belgian payments client, turning questions about its rulebooks into answers users can check against the documents.

The corpus contains around 270 PDFs, 6,000 pages and 3,000 tables. Rulebooks also refer to one another, so the evidence for an answer may extend beyond the first relevant passage. Two requirements shape the system: every answer needs the rulebook, section and page that support it, and scheme-specific facts must come from those documents. General knowledge can supply the meaning of a bank; it must not quietly supply another payment scheme’s fees or operating rules.

What lets a user check an apparently surprising answer? In the demonstration, the question is “Can I pay with my fridge?” The chatbot answers from the rulebooks, can display a table when the evidence is tabular, and places sources below the answer with section information and access to the rulebook. The source card connects the explanation to something the user can inspect, while follow-up questions keep the investigation in the same conversation.

The answer ties device type 3331 to the cited rulebook page, with the matching table row and source card visible below.Open full source frame
The answer ties device type 3331 to the cited rulebook page, with the matching table row and source card visible below.
0:000:30
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:00 · section reference included

Index small passages without losing the larger document

The system separates offline indexing from online serving. Each new rulebook release is converted into chunks and stored in a vector database. At question time, an agent searches that database and streams its answer back. Indexing prepares both dense retrieval and BM25 search, but the first important decision comes before either: preserve enough document structure to recover a larger passage later.

Text is extracted page by page, split into paragraphs and packed into chunks of about 2,000 characters. Tables stay intact rather than being divided between chunks. Regular expressions recognize headings such as “chapter 3” or “4.2.1,” giving each chunk a section path. The chunks do not overlap: selecting the chunks for a section and restoring their order reconstructs the section without repeated boundary text. A search result can therefore become an entry point into a larger body of evidence.

Which fields make a chunk both citable and reconstructable? The metadata has several distinct jobs:

  • Source location: the rulebook name and page support citations and links back to the PDF.
  • Reconstruction: the section path selects the relevant passage; the chunk index restores its order, up to an entire rulebook.
  • Document identity and context: rulebook IDs identify available documents, while an LLM-generated summary of each rulebook is attached to its chunks so the agent can understand the document a passage belongs to.
  • Business context: rulebook type, applicable roles and a table flag accompany search results.
5:135:43
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

5:13 · section reference included

Make merged table labels explicit

The initial extraction treated PDFs as plain text and underestimated how much meaning lived in table layout. In the dummy example, “domestic” spans several rows, “cross-border” spans two more, and “refund” spans across both groups. Those merged labels express relationships between categories and values. Flattening the page without preserving the relationships can leave the agent selecting the wrong row or column—an especially consequential error when the value is a fee.

How can a row retain the headings that originally applied to it through merged cells? The pipeline converts tables to CSV and duplicates the spanning fields into the rows they qualify. That makes the category context explicit in text instead of depending on visual position. The agent can retrieve a row together with its applicable labels, rather than trying to infer those labels from damaged PDF extraction. The team reports a substantial improvement in answer correctness from this change, without giving an isolated numerical result. The completed index contains around 4,000 chunks.

9:4410:14
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

9:44 · section reference included

Combine meaning with identifiers

Serving begins by finding ten useful chunks among roughly 4,000. Dense embeddings compare vector representations of the question and passages, helping match meaning across different wording. But rulebook codes, message names and identifiers may be the most important part of a member’s question, even when semantic similarity handles them poorly. BM25 supplies lexical matching for those exact tokens; it is less suited to matching paraphrases. The two methods address different retrieval failures.

One Qdrant call combines both searches. Dense retrieval contributes its top 50 results and BM25 contributes its top 50. Reciprocal rank fusion, or RRF, merges their ranked results into 30 candidates without requiring the two retrieval scores to be calibrated against each other. A further reranking step favors section coherence, and ten chunks reach the agent. The recording names section coherence as the criterion without specifying its scoring procedure.

How do the two candidate streams become one evidence set? The diagram shows their convergence before the final selection. On a retrieval-only evaluation of 63 questions, the hybrid method raised the reported hit rate from 92% to 97%, retaining every question that dense retrieval had already found. That result measures retrieval success, not the correctness of complete generated answers.

Two retrieval methods converge before the agent sees evidence

Dense searchretrieval — Top 50 semantic matches
BM25 searchretrieval — Top 50 lexical matches
Reciprocal rank fusionCombine rankings into 30 candidates without calibrating retrieval scores
Section-coherence rerankingSelect the top ten chunks
AgentReceives ten retrieved chunks
Dense and lexical results are parallel inputs to rank fusion. Section-coherence reranking then reduces the combined candidates to ten chunks.
Read the diagram as text
  • Dense search. retrieval — Top 50 semantic matches
  • BM25 search. retrieval — Top 50 lexical matches
  • Reciprocal rank fusion. Combine rankings into 30 candidates without calibrating retrieval scores
  • Section-coherence reranking. Select the top ten chunks
  • Agent. Receives ten retrieved chunks
  • Dense search → Reciprocal rank fusion: Ranked semantic candidates.
  • BM25 search → Reciprocal rank fusion: Ranked lexical candidates.
  • Reciprocal rank fusion → Section-coherence reranking: 30 fused candidates.
  • Section-coherence reranking → Agent: Ten selected chunks.
11:4312:12
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

11:43 · section reference included

Separate readable progress from completed UI components

A 38-second answer changes the interface problem. The first design offered the agent UI components described as Pydantic models: source cards, events and collapsible checklists, alongside text. The goal was a more readable answer than a sheet of prose. In that implementation, rendering depended on receiving a complete structured object. Partial output was not yet a valid complete JSON response, so users saw nothing until generation finished.

What can appear before the whole answer is ready? The revised design streams Markdown prose token by token and styles it as it arrives. The source card remains a structured UI component, appended after the answer finishes streaming. Its useful action—opening supporting evidence—can wait until the user has read the explanation. Separating the two output types lets readable content arrive progressively while preserving a clickable source card. It changes the experience of waiting without claiming to reduce the underlying research time.

Once an answer is visible, the next questions concern use: does someone open the source, copy the answer, continue the conversation or leave? Azure Table Storage records questions, tool calls, answers, positive and negative feedback, and actions such as source clicks and answer copies. Conversation context is deliberately limited to the last 20 messages. The team considers that sufficient for the current product stage, leaving further expansion to demonstrated needs.

15:1315:43
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

15:43 · section reference included

Check the answer—and challenge the judge

Evaluation questions come from two rounds of testing with actual members and from behavioral requirements. The assistant should avoid giving advice, remain neutral about competitors and clearly acknowledge when the rulebooks do not contain an answer. About 86 end-to-end tests run through Promptfoo, combining an LLM judge against a rubric with a check that the correct source document was cited. The separate retrieval evaluation helps distinguish finding evidence from using it correctly.

Two failures made the evaluator itself part of the investigation:

  • Unstable judgments: five of twelve result flips did not reproduce on rerun. An apparent change in performance therefore needed another run before the team trusted the difference.
  • An incorrect expectation: the judge repeatedly penalized a date as hallucinated, but inspection found that date in the rulebook. The rubric was wrong about the source.

A judge result can identify something worth investigating; it cannot replace checking what the underlying document actually contains.

18:2818:58
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

18:28 · section reference included

Real use moves from breaking the assistant to checking replies

The assistant launched internally in June. At the time of the talk, 34 users had asked around 900 questions across more than 100 conversations; release to external members and clients remained a goal for the end of the year. Thumbs-up and thumbs-down feedback became sparse after the first month, although source clicks and answer copies continued to provide observable usage events.

The first month included requested red teaming: users tried to break the assistant or steer it off topic. By the third month, the team’s LLM-assisted analysis classified more than 90% of questions as real questions. Concrete uses included pasting a client email and asking for help answering it, supplying a raw protocol message or table, and checking a drafted reply. The product was becoming part of handling an existing case, with the user bringing the working material into the conversation.

With explicit ratings fading, follow-up behavior became a proxy for sentiment. Thanks or a move to another topic counted as positive; repeating the same question suggested a negative interaction. On that basis, the team judged most conversations to have gone well. This is an inferred satisfaction signal: a topic change does not verify an answer, and a repeated question does not by itself establish that the previous one was wrong.

19:5920:29
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

19:59 · section reference included

Keep the structure that the next decision needs

The closing lessons connect document preparation to agent behavior. Section paths support both precise retrieval and a deliberate zoom out; tables need processing that preserves their relationships. Multiple retrieval levels then let the agent choose how much evidence to request. The team reports that moving from a single-shot model call to agentic retrieval improved evaluation results substantially, though it gives no separate numerical comparison for that change.

The interface follows the same practical discipline: stream prose so the answer becomes usable as it arrives, and add structured components where the interaction needs them. Early user interviews supply cases for the Promptfoo suite, giving later changes a test grounded in actual questions. That is how the team decides whether something it expects to be an improvement actually improves the product.

22:5523:25
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

22:55 · section reference included

Resources

Read the complete timestamped transcript

17 slide groups · 2 demo milestones. Extracted from the recording; expand builds to follow changes. Timestamps are approximate.

  1. 0:00

    Uh, hi, and welcome to our talk titled, uh, Your Fridge is a Valid Payment Device: Uh, Unremarkable RAG in Production. Uh, let me start by explaining the title. So, um, this is a pla- page from one of our client's rule books. Uh, so it's one of the many documents we, uh, built our, uh, RAG system around. So you would expect, uh, sort of a dry financial document, and that's mostly actually what it, it is. Uh,

  2. Payment device categories

    A client’s rulebook lists familiar payment devices alongside cuff links, handbags, dresses and refrigerators. The page is one of the documents used to build the speakers’ RAG system.

    Text in image
    ‘3230’ – Card
    ‘3231’ - Phone Mobile phone
    ‘3232’ - Tablet/e-reader Tablet computer or e-reader
    ‘3233’ - Watch/Wristband Watch or wristband, including a fitness band, smart strap, disposable band, watch add-on, and security/ID band
    ‘3234’ – Sticker
    ‘3235’ – PC or laptop
    ‘3236’ - Device Peripheral Mobile phone case or sleeve
    ‘3237’ - Tag Key fob or mobile tag
    ‘3238’ - Jewelry Ring, bracelet, necklace, and cuff links
    ‘3239’ - Fashion Accessory Handbag, bag charm, and glasses
    ‘3330’ - Garment Dress
    ‘3331’ - Domestic Appliance Refrigerator, washing machine
    ‘3332’ - Vehicle, including vehicle attached devices
    ‘3333’ - Media/Gaming Device Media or gaming device, including a set top box, media player, and television
    ‘3334’-‘3939’: RFU
    
    1 - 26 or 28 | M | Proprietary Data (Determined by issuer/third party; Default value of '00' if field not used.) | ‘00’
    
    Interface text:
    Card Profiles for Wearables.pdf
    Page [illegible] of 38
    Sort By: Search Rank  Page Order
    Refrigerator
    Found on 1 page
    Done

    0:11Demo milestone

  3. 0:30

    but there are some, uh, fun sort of tidbits, uh, there too. For example, um, this page, uh, which, uh, shows a list of devices you can pay with. So it's... there's, uh, stuff you'd expect there, like, uh, phone or cards, but then there's also more creative, uh, ones like, uh, cufflinks, a handbag, a garment dress, and even a refrigerator. So I thought it was really cool to find a, a fun fact like this in documents,

  4. Payment device categories

    A client’s rulebook lists familiar payment devices alongside cuff links, handbags, dresses and refrigerators. The page is one of the documents used to build the speakers’ RAG system.

    Text in image
    ‘3230’ – Card
    ‘3231’ - Phone Mobile phone
    ‘3232’ - Tablet/e-reader Tablet computer or e-reader
    ‘3233’ - Watch/Wristband Watch or wristband, including a fitness band, smart strap, disposable band, watch add-on, and security/ID band
    ‘3234’ – Sticker
    ‘3235’ – PC or laptop
    ‘3236’ - Device Peripheral Mobile phone case or sleeve
    ‘3237’ - Tag Key fob or mobile tag
    ‘3238’ - Jewelry Ring, bracelet, necklace, and cuff links
    ‘3239’ - Fashion Accessory Handbag, bag charm, and glasses
    ‘3330’ - Garment Dress
    ‘3331’ - Domestic Appliance Refrigerator, washing machine
    ‘3332’ - Vehicle, including vehicle attached devices
    ‘3333’ - Media/Gaming Device Media or gaming device, including a set top box, media player, and television
    ‘3334’-‘3939’: RFU
    
    1 - 26 or 28 | M | Proprietary Data (Determined by issuer/third party; Default value of '00' if field not used.) | ‘00’
    
    Interface text:
    Card Profiles for Wearables.pdf
    Page [illegible] of 38
    Sort By: Search Rank  Page Order
    Refrigerator
    Found on 1 page
    Done

    0:47Demo milestone

  5. 1:00

    uh, you'd expect to be, uh, very boring.

  6. 1:05

    Um, so, uh, uh, let's, uh, introduce ourselves. Uh, this is the only photo that we have of the two of us together. Uh, we don't usually wear, uh, XR headsets, uh, but on this day at the office, uh, we were trying all fun... k- all kinds of fun, uh, gadgets. Um, so I am Nina. I am an AI engineer.

  7. 1:28

    Um, and I'm Eleonora. I'm a product engineer. We work at In The Pocket, uh, a digital product studio with main office based in Belgium. We help our clients with AI transformation and custom software.

  8. 1:43

    And, uh, today, uh, we are gonna talk about a RAG project we built for one of our clients, uh, a large, uh, Belgian, uh, fintech company, and it will, uh, stay anonymous, uh, for, for the, for this talk. Um, so at its core, uh, this is a classic, uh, RAG problem. Uh, and in this talk, we wanna show, like, the technical decisions we had to make and, uh, to go deep into how,

  9. 2:13

    how we built this. Um, it's the... a talk we... that would've been useful, uh, for us, uh, at the beginning of, uh, this project. Um, so, uh, what is, uh, the problem we ha- uh, have? Um, so our client is, uh, running the biggest payment scheme in Belgium, uh, and all the r- rules, uh, about this scheme are, uh, written down in, uh, rule books. So these are, uh,

  10. The rulebooks

    The client's payment scheme spans roughly 270 rulebooks and 6,000 PDF pages. Much of its knowledge sits in tables, while references connect the rulebooks.

    Text in image
    The rulebooks
    
    Documents with the rules of a national payment scheme.
    
    RULEBOOKS
    ~270
    
    PAGES OF PDF
    ~6,000
    
    TABLES
    ~3,000
    
    REFERENCES BETWEEN RULEBOOKS
    ~2,000
    
    Rulebooks
    [illegible]
  11. The rulebooks

    The client's payment scheme spans roughly 270 rulebooks and 6,000 PDF pages. Much of its knowledge sits in tables, while references connect the rulebooks.

    Text in image
    The rulebooks
    
    Documents with the rules of a national payment scheme.
    
    RULEBOOKS
    ~270
    
    PAGES OF PDF
    ~6,000
    
    TABLES
    ~3,000
    
    REFERENCES BETWEEN RULEBOOKS
    ~2,000
    
    Rulebooks
    [illegible]
  12. 2:43

    PD- around 270 PDFs, uh, so or, or around 6,000 pages. A lot of the informations is, uh, a lot of the information is in tables, um, around 3,000 tables. Uh, and this is how they, uh, sort of structure their, uh, knowledge. A lot of important, uh, knowledge is in the tables themselves. And the, uh, rule books, uh, refer to each other a lot. So, uh, one rule book would refer to another, and then, yeah, that one to another

  13. 3:13

    one, et cetera. Um, so doing a RAG for a financial institution, um, comes with, uh, some challenges. Um, the first one being the citations. So of course, always, uh, answers should be correct. Uh, but especially, uh, in a financial context, it's even, uh, more important. Um, so every answer needs to cite the exact rule book,

  14. Rulebook chatbot example

    The chatbot answers that a fridge is listed as a domestic appliance, shows other device types, and cites the rulebook section and page. A follow-up asks about a washing machine.

    Text in image
    Can I pay with my fridge?
    
    Yes. Device type 3331, “Domestic Appliance”, explicitly lists refrigerators and washing machines (7120 Card Profiles for Wearables, page 16).
    
    Some of the other device types
    Code | Device type | Examples
    3230 | Card
    3233 | Watch/Wristband | Watch or wristband, including a fitness band
    3238 | Jewelry | Ring, bracelet, necklace, and cuff links
    3330 | Garment | Dress
    3331 | Domestic Appliance | Refrigerator, washing machine
    
    SOURCES
    7120 · Card Profiles for Wearables
    Section 4.2.1 · page 16
    
    Oh, so my washing machine can pay too?

    3:15Demo milestone

  15. 3:43

    uh, section and page, um, so that people can see where the answer is coming from. And the second, uh, challenge is grounding. Uh, so the LLM, uh, that's, uh, running underneath is a general, uh, model, so it's trained on, on, uh, general knowledge. So it knows a lot, including, uh, things about other payment schemes, uh, or how they work or their fees. So we kind of had to, uh, decide and make sure that the knowl- which knowledge is okay

  16. 4:13

    to, to use. To, for example, it's okay to know what a bank is. That makes sense, and it's not something that would be, uh, defined in the rule books. Um, but, uh, what another payment scheme charges or how it works, that's, uh, should not end up in an answer unless it is in the rule books. Um, so, um, this is what the solution we built looks like. So it's a chatbot. Uh, so you ask a question, and it answers

  17. 4:43

    based on, um, these rule books. If the answer is in a table, um, it will show that table as well. Uh, and below the answer is the list of sources it used to, um, retrieve the... or to make the answer, including, uh, specifying the, uh, section and the part of the rule book such that the user can open, uh, uh, that rule book. And in this example, I ask, "Can I pay with my fridge?" I got an answer, and I can then ask also

  18. 5:13

    follow-up questions. Um, this is, uh, what the whole system looks like. Uh, so it has, uh, two parts. On the left part is, uh, the indexing, so this is what we do sort of offline. Uh, and every new release of the, these rule books, um, we turn these PDFs into chunks and store them in a vector database. And on the right, uh, uh, part is about the serving, so the online part for every, uh,

  19. The whole system

    For each rulebook release, offline indexing turns PDFs into chunks and stores embeddings in Qdrant. For each question, an agent searches the database and streams an answer back through FastAPI to the member portal.

    Text in image
    The whole system
    
    INDEXING · OFFLINE, ONCE PER CORPUS RELEASE
    
    PDFs
    one set per corpus release
    ↓
    Text and tables
    every page, tables kept intact
    ↓
    Section-aware chunks
    + metadata + LLM rulebook summary
    ↓
    Dense + BM25 embeddings
    one of each, per chunk
    
    WRITES →
    once per release
    
    Vector database
    Qdrant
    
    READS →
    hybrid search,
    RRF fusion
    
    SERVING · ONLINE, PER QUESTION
    
    Member portal
    where the question comes in
    
    question ↓ ↑ streamed answer, SSE
    
    FastAPI
    the HTTP + SSE layer
    
    routes to the agent ↓ ↑ the agent’s answer
    
    Agent
    Google ADK · four retrieval tools
  20. 5:43

    uh, question that a user asks. Um, the agent searches this vector database, um, and then the answer gets streamed, uh, back to the user. So I'll talk about the indexing, and Eleonora will talk about the serving part. Uh, so about the indexing. The setup is, uh, pretty simple. So we start with the PDFs, we split them into chunks, we, uh, add me-metadata to,

  21. Indexing the rulebooks

    The pipeline splits rulebook PDFs into chunks, adds metadata and processes tables, then generates dense and BM25 embeddings for a Qdrant vector database.

    Text in image
    Indexing the rulebooks
    
    Rulebooks
    
    01
    Split PDFs into chunks
    
    02
    Enrich chunks with metadata
    
    03
    Special processing for tables
    
    04
    Generate two types of embeddings (dense + BM25)
    
    Vector database
    Qdrant
    
    Document examples: 2 · 2.1; 2 · 2.1; 3 · 3.1; 6 · 6.5
  22. Indexing the rulebooks

    The pipeline splits rulebook PDFs into chunks, adds metadata and processes tables, then generates dense and BM25 embeddings for a Qdrant vector database.

    Text in image
    Indexing the rulebooks
    
    Rulebooks
    
    01
    Split PDFs into chunks
    
    02
    Enrich chunks with metadata
    
    03
    Special processing for tables
    
    04
    Generate two types of embeddings (dense + BM25)
    
    Vector database
    Qdrant
    
    Document examples: 2 · 2.1; 2 · 2.1; 3 · 3.1; 6 · 6.5
  23. 6:14

    uh, each chunk. Uh, we do some special processing for, uh, the tables and then, uh, we, uh, generate the embeddings. We generate two types of embeddings, a dense one and a BM25. So I'll, uh, now go into detail about the first three steps, and Eleonora will later talk about the embeddings. Um, so, uh, the first step, splitting PDFs into chunks. Um, the way it works is

  24. Split PDFs into chunks

    Paragraphs fill chunks of about 2,000 characters without overlap, while tables stay intact. Section paths support citations and let the agent retrieve a whole section in order.

    Text in image
    Split PDFs into chunks
    
    01 SPLIT   02 METADATA   03 TABLES
    
    4.1
    CHUNK 7
    4 › 4.1
    
    CHUNK 8
    4 › 4.1
    
    4.2
    CHUNK 9
    4 › 4.2
    
    CHUNK 10
    4 › 4.2 › TABLE
    
    CHUNK SIZE
    ~2,000 characters
    paragraphs packed until the chunk is full
    
    OVERLAP
    none
    a section is its chunks, in order
    
    TABLES
    never split
    a table stays in one chunk
  25. 6:44

    we pull out the text from, uh, every page, uh, we split it into, uh, paragraphs, and we sort of pack paragraphs into a chunk until it reaches about 2,000, um, uh... around 2,000 characters. Uh, and we also make sure that we never split a table over, uh, two chunks. Uh, we also detect se-section headers using, uh, regular expressions, so things like, uh, chapter 3 or 4.2.1.

  26. 7:14

    Um, and that gives every chunk its, uh, section path. Uh, s- for example, this one lives in chapter 4, section, uh, 4.2. And, um, that path is used for, uh, adding a citation, uh, but also it's used to, uh, fetch the whole, uh, section when the agent, uh, needs more context. Um, and this all works because we don't overlap chunks. So,

  27. 7:44

    uh, a section is, uh, like, is just a collection of chunks, uh, and i-if we put them back in order, it's, uh, back sort of, uh, as it originated. Um, for the second step, we, um, for every chunk we add metadata. So in this example, we see the, the text of the chunk, uh, from this fridge rule book. Um, and then below is, are some, uh, metadata fields. Uh, so we need the, um,

  28. Enrich chunks with metadata

    Each chunk carries metadata for source citations and agent context. Section paths help fetch whole sections, while chunk indexes let the agent put them back in order.

    Text in image
    01 SPLIT   02 METADATA   03 TABLES
    
    Enrich chunks with metadata
    
    ONE CHUNK
    
    4.3 Device Type
    The Device Type identifies the kind of device on which the payment application is personalized. The Issuer shall set it to one of the values listed below, for example ‘3331’ for a domestic appliance such as a refrigerator or washing machine. Values ‘3334’ to ‘3939’ are reserved for future use.
    
    FIELD | VALUE | USED FOR
    document_name | 7120 – Card Profiles for Wearables | Source card and PDF link
    page_numbers | [15] | Page on the source card
    section_hierarchy | 4 › 4.3 Device Type | Citations and fetching a whole section
    chunk_index / total_chunks | 14 / 35 | Rebuilding a section in order
    rulebook_id | 7120 | Rulebook list for the agent
    document_summary | “This rulebook specifies the personalization requirements…” | AI-generated context for the agent
    [business logic fields] | … | Agent hints: rulebook type, roles, tables
  29. 8:15

    the rule book name and the, the page, such that we can actually show it in the citation or, uh, in the source, uh, card to the user. Um, w- together with, uh, and th-that the user can then, uh, it can be linked to the PDF. Um, we also, uh, use the, the section paths, uh, both for that, for the citation, but also for the agent to be able to fetch the whole

  30. 8:44

    section at once. Uh, and then we also have the chunk index, uh, which lets the agent put, uh, a section or even a rule book, uh, back together. Um, the agent uses, uh, rule book IDs to be able to get a list of all the rule books or see what's available. And at indexing time, for each rule book, we generate, uh, an LLM, uh, yeah, using an LLM, we generate a summary,

  31. 9:14

    um, which is then attached to each, uh, chunk for its, uh, uh, for, about its, uh, rule book. Um, and that, in that way, the agent knows what the document's, uh, passage comes from. Um, and for the rest is, um, the rest of the metadata is, uh, business logic fields. So, um, what type of, uh, rule book it is, which role, uh, roles it applies to, uh, whether it

  32. 9:44

    contains a table, and these are the things that agent, um, uses, uh, with the, or gets with the search results. Um, then the third step is the table processing. This one, uh, is important because, uh, as I said, there is a lot of knowledge within the tables. We initially didn't, uh, kinda realize it, um, and so we, uh, the, the initial processing was just straightforward, uh,

  33. Special processing for tables

    Merged PDF cells become repeated values in CSV rows, helping the agent retrieve the correct fee for each payment type. The speakers say this improved answer correctness.

    Text in image
    01 SPLIT   02 METADATA   03 TABLES
    
    Special processing for tables
    
    IN THE PDF
    Payment | Fee type | EUR
    Domestic | Scheme fee | 0.05
             | Processing fee | 0.03
             | Refund fee | 0.10
    Cross-border | | 0.15
                 | Scheme fee | 0.12
    
    STORED AS CSV
    Payment,Fee type,EUR
    Domestic,Scheme fee,0.05
    Domestic,Processing fee,0.03
    Domestic,Refund fee,0.10
    Cross-border,Refund fee,0.15
    Cross-border,Scheme fee,0.12
  34. 10:14

    fetching, uh, getting the plain text from, uh, the PDF, and that didn't format the tables well. But in this dummy example, you see that the, the domestic, uh, field, uh, spans over multiple rows, and cross-border over two more rows, and then the refund spans over both. So if that's not, um, uh, cle- uh, or well, uh, put into text, uh, yeah, the agent can fetch wrong information, and especially with

  35. 10:44

    important things like fees, uh, it's important to, uh, yeah, fetch the, the right, uh, row and for the right column. So what we do is we transform the tables into a CSV format. So we duplicate basically those, um, uh, those fields, and then we, uh, uh, in that way, the agent, uh, fetches it, and when it fetches it, it, um, fetches the correct,

  36. 11:15

    uh, uh, the co- correct, uh, row, that the one that it needs. And that really made a, a big difference for the correctness of the answers. Um, so this was, um, uh, about the indexing. Now we have these around four thousand chunks. Um, and now, uh, Eleonora will talk about the serving part.

  37. Over to the online half

    The member portal sends questions through FastAPI to an agent, which searches a vector database of roughly 4,000 indexed chunks. The answer streams back through the same path using SSE.

    Text in image
    Over to the online half
    
    INDEXING · DONE
    
    ~4,000 chunks
    each knowing where it lives in its rulebook
    
    SERVING · ONLINE, PER QUESTION
    
    Member portal
    where the question comes in
    
    question ↓ ↑ streamed answer, SSE
    
    FastAPI
    the HTTP + SSE layer
    
    routes to the agent ↓ ↑ the agent’s answer
    
    Agent
    Google ADK · four retrieval tools
    
    READS
    ↓
    hybrid search, RRF fusion
    
    Vector database
    Qdrant
  38. 11:39

    Yep.

  39. Finding the right ten chunks

    Dense embeddings and BM25 are fused and reranked to select ten chunks. In a 63-question retrieval evaluation, hybrid search raised hit rate from 92% to 97% without losing any question dense search found.

    Text in image
    Finding the right ten chunks
    
    01 SEARCH   02 AGENTIC   03 UX   04 LOGGING   05 EVALS
    
    DENSE EMBEDDINGS
    Great for meaning. But to an embedding, rulebook codes, message names and field codes look like noise, and they’re often exactly what the member is asking about.
    
    BM25
    The mirror image: exact tokens, yes. Paraphrases, no.
    
    HIT RATE, DENSE ONLY
    92%
    
    HIT RATE, DENSE + BM25 FUSED
    97%
    
    QUESTIONS HYBRID LOSES
    0
  40. 11:43

    Okay, so the previous part, build the index. Uh, now this part is gonna be ar- about finding this right ten chunks out of four thousand chunks that have been prepared. The obvious move here would be go for dense embeddings, turn the question and every chunk into a vector, compare the distance. And that is great for the meaning, but rulebook codes, message names, exact identifiers would look like

  41. Finding the right ten chunks

    Dense embeddings and BM25 are fused and reranked to select ten chunks. In a 63-question retrieval evaluation, hybrid search raised hit rate from 92% to 97% without losing any question dense search found.

    Text in image
    Finding the right ten chunks
    
    01 SEARCH   02 AGENTIC   03 UX   04 LOGGING   05 EVALS
    
    DENSE EMBEDDINGS
    Great for meaning. But to an embedding, rulebook codes, message names and field codes look like noise, and they’re often exactly what the member is asking about.
    
    BM25
    The mirror image: exact tokens, yes. Paraphrases, no.
    
    HIT RATE, DENSE ONLY
    92%
    
    HIT RATE, DENSE + BM25 FUSED
    97%
    
    QUESTIONS HYBRID LOSES
    0
  42. Finding the right ten chunks

    Dense embeddings and BM25 are fused and reranked to select ten chunks. In a 63-question retrieval evaluation, hybrid search raised hit rate from 92% to 97% without losing any question dense search found.

    Text in image
    Finding the right ten chunks
    
    01 SEARCH   02 AGENTIC   03 UX   04 LOGGING   05 EVALS
    
    DENSE EMBEDDINGS
    Great for meaning. But to an embedding, rulebook codes, message names and field codes look like noise, and they’re often exactly what the member is asking about.
    
    BM25
    The mirror image: exact tokens, yes. Paraphrases, no.
    
    HIT RATE, DENSE ONLY
    92%
    
    HIT RATE, DENSE + BM25 FUSED
    97%
    
    QUESTIONS HYBRID LOSES
    0
  43. Finding the right ten chunks

    Dense embeddings and BM25 are fused and reranked to select ten chunks. In a 63-question retrieval evaluation, hybrid search raised hit rate from 92% to 97% without losing any question dense search found.

    Text in image
    Finding the right ten chunks
    
    01 SEARCH   02 AGENTIC   03 UX   04 LOGGING   05 EVALS
    
    DENSE EMBEDDINGS
    Great for meaning. But to an embedding, rulebook codes, message names and field codes look like noise, and they’re often exactly what the member is asking about.
    
    BM25
    The mirror image: exact tokens, yes. Paraphrases, no.
    
    HIT RATE, DENSE ONLY
    92%
    
    HIT RATE, DENSE + BM25 FUSED
    97%
    
    QUESTIONS HYBRID LOSES
    0
  44. 12:12

    noise to an embedding. But to the member who's asking the question, quite often this is the essence of the question. With BM25, we have the mirror image, exact tokens would work, paraphrases wouldn't. So we combined both of them in one Qdrant, Qdrant call and fused them with reciprocal rank fusion. Um, dense's top 50, BM25's top 50 fused down to the top 30, re-ranked for section coherence and

  45. 12:42

    top 10 fed to the agent. Um, and the nice thing about RRF is that we don't need to calibrate the score between these two legs. Um, on the retrieval only evaluation, uh, of 63 questions compared with dense embeddings only, hybrid approach moved hit rate from 92 to 97% and didn't lose a single question that, um, dense embeddings already could find out. Okay, so

  46. Agentic retrieval

    The agent starts with 10 chunks, then can retrieve whole sections or small rulebooks, or list available rulebooks. This lets it follow cross-references and handle questions that need more context.

    Text in image
    Agentic retrieval
    
    01 SEARCH   02 AGENTIC   03 UX   04 LOGGING   05 EVALS
    
    AGENT
    ↓
    Google ADK, deciding which tool to call
    
    search_rulebooks
    10 chunks, always called first
    
    retrieve_rulebook_sections
    whole sections, in order, by section path
    
    retrieve_full_rulebook
    an entire rulebook, only for small ones
    
    list_available_rulebooks
    what exists
    
    No fixed retrieve-then-generate pipeline. Rulebooks refer to each other, so one question can need several searches, and some questions need a lot of context. A single top-k search doesn't cover that.
  47. 13:12

    we have our 10 decent chunks, but not every question fits in 10 chunks. Some of them are chained. One rulebook points to another, and the answer would be only complete once you follow that pointer. Some of them need breadth. List every fee for this transaction type is never gonna fit in the top 10 of anything. So instead of a fixed retrieve, then generate pipeline, our agent has four tools, narrow to wide. Search rulebooks always comes first.

  48. 13:43

    That's the 10 chunks we were talking about previous slide. If that is not enough, retrieve rulebook sections pulls the whole section in order by section path, which is exactly the approach Nina mentioned earlier, um, storing the section path. And this base off here, zooming out, is just fetch every chunk with this path sorted by chunk index. Above that is retrieve full rulebook, which works

  49. 14:13

    for small rulebooks only, and list available rulebooks for when agent needs to know what exists at all. So a few guardrails made this work in practice. First, if a rulebook is too big, over roughly, uh, 100k tokens, the full rulebook tool refuses to dump its content into the context and hands back the available section

  50. Agentic retrieval in practice

    Oversized rulebooks and missing sections return section lists so the agent can retry. Before a sixth tool call, it checks whether the search is adding anything new. Median answer time: 38 seconds.

    Text in image
    Agentic retrieval in practice
    
    • Rulebook too big (>~100k tokens) → the full-rulebook tool refuses, hands back the section list
    • Section name not found → hands back the available sections so the agent can retry
    • “Tool call discipline”: 2–4 calls for most questions; before a 6th, ask “am I fetching something new, or rephrasing a search that already failed?”
    
    MEDIAN ANSWER TIME
    38s
    a small research task, not a chat reply
    
    Interface text:
    01 SEARCH   02 AGENTIC   03 UX   04 LOGGING   05 EVALS
  51. 14:43

    list instead, with a warning that the rulebook is too long. Second, if a section name doesn't match, it hands back the available sections so that the agent can retry rather than give up or try to invent the name. And last, uh, there is a tool called Discipline, instruction in the prompt, because most of the questions require two to four calls. Uh, but before sixth call, the agent

  52. 15:13

    is told to ask itself whether it's fetching something genuinely new or just rephrasing a search that already failed before. And this one came from us watching real traces when the agent tried the same search again and again, hoping that number would eventually show up. So cost for all of this is latency, a median of 38 seconds per answer. It is not just a chat reply, it is a

  53. 15:43

    small research task. And, uh, we lean on streaming to make 38 seconds feel like something is actually happening and not just chat being stuck, which takes me to the next slide. So in our first iteration, we really wanted to step away from the basic chatbot UI, and we prepared UI components and described them as Pydantic models available to the agent, saying, "Here are the components you have. Use

  54. Our first UI didn’t stream

    The first UI used Pydantic component models, so it waited for valid JSON before rendering. Users saw nothing for 38 seconds, then the whole answer appeared at once.

    Text in image
    Our first UI didn’t stream
    
    EXAMPLE OF A COMPONENT MODEL
    
    class DateComponent(BaseModel):
        type: Literal["date"] = "date"
        label: str
        value: date
    
    class AgentResponse(BaseModel):
        blocks: list[
            DateComponent | TextBlock | SourceCard
            | ChecklistComponent | CollapsibleComponent
        ]
    
    Rulebooks Assistant
    31s
    nothing to render yet
    payload isn’t valid JSON until the last token arrives
    only renders once the whole response validates
    
    PROBLEM
    You can’t stream a partial Pydantic object. The response only becomes valid JSON once the last token arrives, so the user sees nothing for 38 seconds and then the whole answer at once.
    
    Interface text:
    01 SEARCH  02 AGENTIC  03 UX  04 LOGGING  05 EVALS
  55. 16:13

    them in your answer together with text." For example, source card was a component, an event could be a component, there could be collapsible checklist component, and so on. The idea was to have somewhat AI-generated UI, which would be more readable than a plain sheet of text. The problem is you can't stream a partial Pydantic object. It only becomes a valid JSON once the very last token arrives. As you can see here, for a system whose answers take 38 seconds,

  56. 16:43

    that meant 38 seconds of nothing on screen, and then everything arrives at once. So the fix that saved the experience was splitting the answer in two parts. The agent now streams markdown prose token by token, and the front end styles it live as it arrives. And then the source card is one piece that says it's a real UI component. It doesn't hold, um, any information you want to click before you read the whole answer, so we're

  57. Stream the text, add the sources after

    The client styles markdown token by token, then attaches a clickable source card after the answer finishes. The card holds extra information separately from the streamed prose.

    Text in image
    Stream the text, add the sources after
    
    Rulebooks Assistant
    
    Yes — under the current device-type rules, a fridge with an embedded secure element qualifies as a valid payment device, provided it meets the certification requirements in section 4.2.1.
    
    Certification still has to be renewed at every rulebook release.
    
    SOURCES
    7100 – Terminals
    4xxx · Technical
    1300 – Ruleboo...
    2xxx · Legal
    
    01
    Stream markdown
    token by token, styled live on the client
    
    02
    Attach the source card
    added once retrieval is done, separate from the streamed text
    
    The source card never had the streaming problem to begin with. You can still add ready-made components to the answer, as long as they hold extra information that stands on its own, not the answer itself.
    
    Interface text:
    01 SEARCH  02 AGENTIC  03 UX  04 LOGGING  05 EVALS
  58. 17:13

    not losing anything by waiting for the full answer to stream before appending this component. And that gives us a clickable card instead of a plain link sitting in the text, which is nicer for the user. Um, but once this answer, um, is on screen, the next question would be what the user actually does with it. Clicks the source, copies the answer, keeps the conversation going,

  59. 17:43

    or drop off. So that's the user experience we want to keep track of, and, um, this brings us to logging. Um, so for now, we went with the simplest logging solution, Azure Table Storage. We log every question, tool call, answer, feedback, good or bad, uh, plus events like clicking source, copy answer Together with the conversation history, which stays deliberately small.

  60. Logging every interaction

    Azure Table Storage records questions and answers, tool calls, feedback and source or copy clicks, alongside the last 20 messages as context. The team chose this simple event table for an early-stage product.

    Text in image
    Logging every interaction
    
    01 SEARCH   02 AGENTIC   03 UX   04 LOGGING   05 EVALS
    
    EVERY INTERACTION
    ↓
    logged to Azure Table Storage
    
    Question & answer
    every turn, start to finish
    
    Tool calls
    which retrieval tools ran, and their arguments
    
    Feedback
    thumbs up or down on the answer
    
    Source & copy clicks
    opening a source card, or copying an answer
    
    Conversation context
    last 20 messages, sent along as context
    
    The simplest logging solution that fit an early-stage product. A table of events answered every question we actually had.
  61. 18:13

    It's just last 20 messages. It's context. Um, for where we are now with this product, it's enough. Once the product grows, we will figure out what we will actually need by then.

  62. Evaluating with real questions

    Questions come from member testing and behavioural guidelines. About 86 end-to-end tests use an LLM judge and check source citations, alongside a retrieval-only evaluation.

    Text in image
    Evaluating with real questions
    
    WHERE THE QUESTIONS COME FROM
    • Two rounds of user testing with members
    • Behavioural guidelines: no advice, stay neutral, and say so when something isn’t in the rulebooks
    
    HOW WE RUN IT
    • ~86 end-to-end tests, run with promptfoo
    • Full agent → LLM judge (rubric) + source-document match
    • Plus the retrieval-only eval from search
    
    Interface text:
    01 SEARCH  02 AGENTIC  03 UX  04 LOGGING  05 EVALS
  63. 18:28

    And how do we know that any of this actually works? Um, our eval questions come from real sources, two rounds of user testing with actual members, plus behavioral guidelines for what our AI assistant must and must not do. For example, no advice, stay neutral about competitors, and say clearly when something isn't present in the rulebook. Um, we have about 86

  64. Evaluating with real questions

    Questions come from member testing and behavioural guidelines. About 86 end-to-end tests use an LLM judge and check source citations, alongside a retrieval-only evaluation.

    Text in image
    Evaluating with real questions
    
    WHERE THE QUESTIONS COME FROM
    • Two rounds of user testing with members
    • Behavioural guidelines: no advice, stay neutral, and say so when something isn’t in the rulebooks
    
    HOW WE RUN IT
    • ~86 end-to-end tests, run with promptfoo
    • Full agent → LLM judge (rubric) + source-document match
    • Plus the retrieval-only eval from search
    
    Interface text:
    01 SEARCH  02 AGENTIC  03 UX  04 LOGGING  05 EVALS
  65. 18:58

    end-to-end tests run with Promptfoo for agent, LLM judge against the rubric, plus check that the right source document actually got cited, plus the retrieval-only evaluation from earlier. Um, two things we learned from running evals that we would like to share is first, that LLM Judge evals have noise floor, and you need to rerun

  66. When to trust an eval result

    Rerun evals before trusting a change: 5 of 12 flips did not reproduce. Also check the rubric—a judge penalized a date as hallucinated even though it appeared in the rulebook.

    Text in image
    When to trust an eval result
    
    FIND YOUR NOISE FLOOR
    
    LLM judges give slightly different scores on each run, so rerun before you trust a change. For us, 5 of 12 “flips” between runs didn’t reproduce the second time.
    
    SOMETIMES THE RUBRIC IS THE BUG
    
    A “hallucinated” date the judge kept punishing turned out to be real text, sitting right there in the rulebook.
    
    Interface text:
    01 SEARCH  02 AGENTIC  03 UX  04 LOGGING  05 EVALS
  67. 19:28

    before you trust the delta. For example, when we ran our own eval, 5 out of 12 flips didn't reproduce. And the second, sometimes the rubric itself is the bug, uh, not the model. So we had a hallucinated date that the judge kept punishing, and then it turned out that this date was actually real text sitting in the rulebook.

  68. Real usage June to September 2026

    From June to September, 34 internal users asked 896 questions. AI analysis found that 93% were real questions by the third month and used follow-ups to assess conversations after ratings tapered off.

    Text in image
    Real usage June to September 2026
    
    01 SEARCH  02 AGENTIC  03 UX  04 LOGGING  05 EVALS
    
    USAGE NUMBERS
    896 questions
    114 conversations
    34 people
    4 months
    24 👍
    9 👎
    32 of the 33 ratings came in the first month
    91 source clicks
    18 answers copied
    
    AI ANALYSIS
    01 Red teaming in the first month
    1 in 3 messages in the first month tried to break it or were off-topic. By the third month, 93% were real questions.
    
    02 Using it for real cases
    Customer emails, raw protocol messages, data tables, a draft reply to check. Long pasted messages went from 8 in the first three months to 21 in September alone.
    
    03 Feedback from follow-up questions
    The thumbs went quiet, so we look at the follow-up instead: 49 conversations went well, 6 didn’t.
  69. 19:59

    Yeah. So now about the, um, the usage. Um, so we launched this, uh, rulebook assistant in, uh, June. Uh, for, uh-- So initially, it was launched only to, uh, the internal users, uh, of our client, and the goal is to, by the end of the year, launch it to, um, their, uh, external members and, uh, their clients. Um, so for now, we have,

  70. 20:29

    um, uh, yes, some, some already, uh, usage, uh, numbers. Uh, we have around 900 questions so far, uh, split into, uh, more than 100 conversations. Around 34, uh, yeah, 34 people are, uh, actually using it. Um, we also, uh, captured the thumbs up, thumbs down, uh, feedback, but most of the people kind of stopped using that feature, uh, after the first

  71. 20:59

    month. And, uh, we also have information about how many times the sources were clicked or the answers were copied. Uh, but those are the numbers. We also, uh, used AI to, um, uh, for the, uh, uh, uh, analytics. Uh, so, uh, uh, on the right-hand, we, we, uh, have, uh, yeah, how LLM interpreted it. What we saw is that, um, in the first month, as we asked,

  72. 21:28

    uh, the people, uh, we had some, uh, red teaming, so people were trying to, uh, break this assistant, trying to get off-topic, uh, or questions. But, uh, by the third month, uh, and more than, uh, or more than 90% of, uh, the questions were actually real questions. Um, secondly, um, people use it for, uh, real cases. So we saw people, uh, using it for, uh, they would paste an email from their cl- uh, client,

  73. 21:58

    uh, and ask for help answering it, or, uh, they would, uh, paste a raw protocol message, uh, table, et cetera, and then they would, um, draft a, a reply that they want checked. And, uh, thirdly, um, we also, yeah, since we didn't have m-many, much feedback from thumbs up, thumbs down, uh, we were trying to, um, interpret the sentiment of the conversation by looking at the follow-up questions.

  74. 22:28

    Uh, so, um, i-if people say thanks or move on to a new topic, uh, we would, uh, yeah, um, count that as a positive, uh, interaction. And if they ask, uh, the same thing again, then it was probably a negative interaction. Uh, and that's, um, most we-- from that, we saw that most of the conversation, uh, went, uh, well.

  75. Main learnings

    Section paths help the agent retrieve answers and zoom out. Switching from a single-shot call to agentic retrieval improved evaluation scores; early user interviews supplied evaluation cases and shaped product decisions.

    Text in image
    CLOSE
    
    Main learnings
    
    • Keep the document's structure. The section path is the field we use most.
    • Tables need their own pipeline
    • Give the agent zoom levels and let it decide how much context it actually needs
    • Agentic retrieval beats a single-shot RAG call
    • Stream what's naturally text; add a structured component only where the UX needs one
    • Test with real users early. It gives you your eval set, and it shapes the product.
  76. 22:55

    So what are, uh, to, to, to sort of summarize, what are the main learnings, um, from this project so far? Uh, we, um, on the document side, we, uh, want to, uh, find that it's important to keep the structure. So the section part is important also both for, uh, retrieving the answer as well as, uh, being able for the agent to sort of zoom out, um, the, the, uh, knowledge. Uh, we also saw that the

  77. 23:25

    tables need their own, uh, sort of special treatment, uh, and their own, uh, processing. Um, from the agent side, yeah, as mentioned, giving it multiple zoom levels, uh, and deciding, uh, how much context it needs, uh, was important. And in general, it was, um, uh, very beneficial once we switched from a, uh, like a single shot, uh, call to an LLM to an agentic retrieval. We saw that,

  78. 23:55

    uh, the, uh, evaluation, uh, go, uh, numbers go up by quite some margin. Uh, from the UX, uh, perspective, uh, streaming, uh, was what made it, uh, sort of, uh, uh, a usable and, uh, a good tool. Uh, and, uh, we only add a structured component when the, when it's, like, uh, required by the, uh, UX. Uh, and then the last one, uh, it w- we found it

  79. 24:25

    important that, uh, we tested with, uh, real users early on and, uh, to also use these, uh, tests to, uh, create, uh, or to use these, uh, user interviews to create the Promptfoo evaluation, uh, evaluations that we can, uh, use to, uh, shape the product and make the decisions of, uh, if some-- if an im-- what we think is an improvement actually is an improvement. So thank you for listening

  80. 24:55

    to our talk.

  81. 24:56

    Thanks.