Building a RAG Pipeline on Custom Documents with Apertus

Event: Schweizer Jugend forscht Study Week "Coding Camp 2026", hosted at USI

Date: 7 September 2026 – 11 September 2026

Role: Project instructor

Audience: High-school students aged 16-17

A one-week project for the Coding Camp 2026, the informatics study week that Schweizer Jugend forscht↗ (Swiss Youth in Science) runs every year for high-school students. In the week hosted at the USI Faculty of Informatics, a group of participants built a retrieval-augmented generation (RAG) pipeline that answers questions over their own documents, powered by Apertus↗, the open Swiss large language model.

The Coding Camp

The Coding Camp is a Schweizer Jugend forscht study week: for five days, high-school students research and program on informatics projects under the guidance of experts, at one of several host institutions across Switzerland, and present all projects to the public at a closing event. The 2026 edition ran from 7 to 11 September 2026 and involved 39 students, hosted by USI, EPFL, the Lucerne University of Applied Sciences and Arts (HSLU), the University of Applied Sciences and Arts of Western Switzerland / Fribourg (HEIA-FR), and the Eastern Switzerland University of Applied Sciences (OST).

The USI Faculty of Informatics welcomed ten students aged 16 to 17 from the cantons of Bern, Lucerne, Schwyz, and Zurich. They worked in groups of three or four on three projects, each supported by a researcher from a different group of the Faculty:

  • SmartShade: Computer Vision Powered Lighting Control, supported by Alberto Ferrante from Prof. Alippi’s research group;
  • Coding a Network Mapper, supported by Pasquale Polverino from Prof. Carzaniga’s research group;
  • Building a RAG Pipeline on Custom Documents with Apertus, supported by me, from CodeLounge at the Software Institute.
Coding Camp participants working on their laptops in a classroom at the USI Faculty of Informatics, with a code editor projected on the wall
Coding Camp 2026 participants at work at the USI Faculty of Informatics (photo: USI)

The camp concluded on Friday 11 September at HSLU in Lucerne, where the participants from all host institutions gathered for an afternoon of project presentations.

The project

The group started from the question every chatbot user eventually asks: how can a language model answer about documents it has never seen? Over the week they assembled the pieces of a RAG pipeline, from splitting and indexing a collection of documents, to retrieving the passages relevant to a question, to prompting Apertus with them to produce a grounded answer.