AI Engineer NYC 2026 Online Talks
Your Fridge Is a Valid Payment Device — Eleonora Drykina & Nina Žižakić, In The Pocket
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Let retrieval widen, with limits and useful recovery
Ten relevant chunks can still be insufficient. A rulebook may point to another rulebook, requiring the agent to follow the reference before an answer is complete. A request to list every fee for a transaction type needs breadth: a top-ten search result is a selection, not an exhaustive inventory. These cases motivated a move from a fixed retrieve-then-generate pipeline to an agent that can request more evidence.
Four tools give the agent different ways to expand its view:
- Search rulebooks: always runs first and returns the ten selected chunks.
- Retrieve rulebook sections: fetches all chunks matching a section path, sorted by chunk index, restoring the passage around a result.
- Retrieve full rulebook: supplies an entire document when it is small enough.
- List available rulebooks: tells the agent what documents exist when it needs to orient its search.
These are available choices after the initial search, rather than a requirement to fetch every larger unit for every question.
The tools return useful alternatives when a request cannot be fulfilled. Above roughly 100,000 tokens, full-rulebook retrieval refuses to put the document into context and instead returns its available sections with a length warning. A section-name mismatch also returns the section list, allowing a retry using a real name. Both responses give the agent a concrete next choice instead of encouraging it to invent a section or abandon the search.
Traces exposed another failure: repeated searches for the same missing number, with slightly different wording and no new evidence. Most questions require two to four tool calls. Before a sixth call, a prompt instruction asks the agent whether the next request will fetch something genuinely new or merely repeat a failed search. This is a deliberation instruction rather than a stated hard call limit. The resulting research has a cost: median answer latency is 38 seconds.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
Related talks
- Beating RL With Reflection: GEPA and Optimize Anything
Extends the discussion of useful traces and fallible evaluators into methods for improving prompts and agent programs with diagnostic feedback.
Read the transcript and explore slides
Loading transcript and slides…