From “Table 1” to Searchable Knowledge

A Practical Guide to Handling Large Legal Tables in RAG Pipelines

When working with legal documents—especially EU legislation like EUR-Lex—you quickly run into a hard problem: tables.

Not small tables.
Not friendly tables.
But hundreds-row, multi-page tables buried inside 300+ page PDFs, translated into 20+ languages.

If you are building a Retrieval-Augmented Generation (RAG) system, naïvely embedding these tables almost always fails. You end up with embeddings that contain nothing more than:

“Table 1”

…and none of the actual data users are searching for.

This post describes a production-grade approach to handling large legal tables in a RAG pipeline, based on real issues encountered while indexing EU regulations (e.g. Regulation (EC) No 1333/2008).


The Core Problem

Let’s start with a real example from EUR-Lex:

ANNEX III
PART 6
Table 1 — Definitions of groups of food additives

The table itself contains hundreds of rows like:

  • E 170 — Calcium carbonate
  • E 260 — Acetic acid
  • E 261 — Potassium acetates

What goes wrong in many pipelines

  1. The table heading (“Table 1”) is detected as a section.
  2. The actual <table> element is ignored or stored separately.
  3. Embeddings are generated from the heading text only.

Result:

Embedding text length: 7
Embedding content: "Table 1"

The data exists visually—but not semantically.


Design Goals

We defined a few non-negotiable goals:

  1. The table must be searchable
    Queries like “E170 calcium carbonate” must hit the table.
  2. IDs must be stable and human-readable
    ANNEX_III_PART_6_TABLE_1 is better than _TBL0.
  3. Structured data must be preserved
    We want JSON rows for precise answering, not just text.
  4. Embeddings must stay within limits
    Some tables have hundreds of rows.
Continue reading “From “Table 1” to Searchable Knowledge”

My Four NTK 2022 Sessions – Published at Last

Back in 2022, I had one of my most active conference years ever.
I delivered four separate talks at the NTK conference—covering .NET MAUI, Blazor, cross-platform development, and even a deep dive into one of the very first production .NET MAUI apps in Slovenia.

For various reasons, I never managed to publish these sessions on my blog, even though I did that regularly in previous years. So today I’m finally fixing that and adding all four NTK 2022 talks here—better late than never.

After 2022, I took a two-year break from speaking…
…but this year, I’m back on stage again. 😊

Below are summaries of all four talks in the order they were delivered.


1) Build a Mobile or Desktop App with .NET MAUI

📍 Europa B+D
📑 Slides: https://rasper87.blog/wp-content/uploads/2025/11/1_ustvarimobilnoalinamiznodotnetmaui.pdf

This session introduced the fundamentals of .NET MAUI, Microsoft’s modern cross-platform framework that allows developers to build native mobile and desktop applications from a single shared codebase.

Key topics:

  • One project for Android, iOS, Windows, macOS, and Linux
  • Native access to device-specific features
  • UI built with XAML that compiles to native controls
  • Live demos covering:
    • layouts
    • navigation
    • REST API calls
    • using a local SQLite database
    • handling platform-specific features
  • Introduction to MAUI + Blazor Hybrid, enabling HTML/CSS/C# UI inside a native MAUI shell

The goal was to give attendees a clear picture of how MAUI simplifies cross-platform development and why it’s becoming a key part of the .NET ecosystem.


2) .NET MAUI Blazor – Build a Universal App with HTML, CSS, and C#

📍 Emerald 1
📑 Slides: https://rasper87.blog/wp-content/uploads/2025/11/2_mauiblazor.pdf

The second session focused on the powerful combination of .NET MAUI + Blazor, showing how developers can build a single codebase that runs as:

  • a desktop app
  • a mobile app
  • and even a web app

all by using HTML, CSS, and C#.

Highlights:

  • Explanation of MAUI Blazor architecture
  • Benefits of reusing the same components across platforms
  • How BlazorWebView integrates web UI inside a native MAUI app
  • Multiple live demos demonstrating shared UI logic

The session showed how MAUI Blazor provides a path for .NET developers who prefer web technologies but still want native performance and full device access.

Continue reading “My Four NTK 2022 Sessions – Published at Last”

Bringing Back My .NET MAUI Content – Starting With an Older Video (in Slovenian)

A few days ago I realized that although I’ve been actively following .NET MAUI since the very first preview releases, my blog doesn’t really show that story. In the last few years I simply didn’t have enough time to keep this place updated, which means that a lot of MAUI-related content never made it here.

So, let’s start fixing that.

Today I’m sharing a short video I recorded three years ago, back when I was still working in one of my previous companies (not my most recent one). It’s not a deeply technical, developer-oriented presentation, but more of a high-level overview that introduces the platform and what it enables.

Video: https://www.youtube.com/watch?v=WaGi6dnsTTI

Why .NET MAUI matters

.NET MAUI is a cross-platform framework that allows you to build a single application from one shared codebase, and run it on:

  • Windows
  • macOS
  • Linux
  • iOS
  • Android

This means that the same logic, UI structure, and project architecture can power desktop and mobile experiences at the same time.

And if you combine .NET MAUI with Blazor, you push this even further — a single codebase can serve:

  • Desktop apps
  • Mobile apps
  • Web applications

All with shared components, shared UI logic, and shared development patterns.

About the video

Unfortunately, the video is recorded in Slovenian and not in English — sorry to all my non-Slovenian readers — but it still gives a good introductory overview of the concepts, goals, and the direction Microsoft was taking with MAUI at the time.

Even though the video is older, the core ideas remain relevant, and it’s a nice warm-up for all the new MAUI-related content I plan to publish here.

More MAUI content coming soon

I’ve been following .NET MAUI closely from the very beginning, experimenting with previews, RC versions, and release builds. Now that I’m restarting my writing cadence, I’ll finally start sharing more of that knowledge here.

More articles, samples, and insights on .NET MAUI and Blazor Hybrid apps are coming — I promise.

That’s all folks!

Cheers!
Gašper Rupnik

{End.}

Running a Vite Frontend from .NET Aspire

One of the nicest features of .NET Aspire is that it can orchestrate not just APIs and databases, but also frontends.
That means your backend, frontend, and supporting infrastructure can all be started with a single dotnet run — no separate terminal tabs, npm installs, or manual steps.

Let’s look at a minimal example where Aspire runs a Vite dev server directly from your project.

Folder Layout

Here’s the structure we’ll use:

03_ViteApps/
├─ AppHost.cs
├─ ViteApps.csproj
├─ appsettings.json
├─ appsettings.Development.json
└─ my-vite-app-npm/        # Vite project (package.json, src, index.html)

The .NET Aspire project (AppHost.cs) lives at the root, and your Vite app sits inside my-vite-app-npm/.

Continue reading “Running a Vite Frontend from .NET Aspire”

Website Powered by WordPress.com.

Up ↑