NACE recodification with RAG: a reproducible pipeline on SSPCloud

A reproducible Retrieval-Augmented Generation (RAG) pipeline for recoding free-text descriptions of economic activities into the NACE 2.1 nomenclature, running end-to-end on SSPCloud (Qdrant vector database, llm.lab gateway, S3 / MinIO). Inspired by subject 2 of the 2026 AIML4OS funathon.

Author
Affiliation

Julien Pramil

Published

July 27, 2026

1 What is this tutorial?

This tutorial is written in Python and shows a Retrieval-Augmented Generation (RAG) pipeline for an automatic-coding use case: recoding free-text descriptions of economic activities into the new NACE 2.1 nomenclature. The whole pipeline runs end-to-end on the SSPCloud (Insee’s open-source data-science platform): a Qdrant vector database for retrieval, the llm.lab gateway for embeddings and generation, and S3 / MinIO for the data. The same recipe applies to any statistical nomenclature or controlled vocabulary, and to any environment that exposes an OpenAI-compatible LLM endpoint and a Qdrant instance.

This tutorial is inspired by subject 2 of the 2026 funathon — see its dedicated website: funathon-project2. Compared to that more pedagogical version, this notebook is direct: every step of the RAG pipeline is shown with its working code, without question/answer scaffolding.

2 How to use it?

TipTry it interactively

Launch a ready-to-use VS Code service on SSPCloud: it clones this repository, installs the Python environment (uv sync), and downloads the tutorial as a runnable Jupyter notebook — no local installation required.

Onyxia

Ready to read the full walkthrough first? Go to the tutorial.

Reuse

CC-BY 4.0