STM32 RAG Assistant
This is a RAG assistant for questions about the STM32G0x1 reference manual (RM0444). It covers the G031, G041, G071, and G081. Datasheets are out of scope. It answers in technical language and cites the section and the printed page it used.
I split the PDF along the manual’s own outline: 1965 sections, with printed page numbers taken from the footers. Those sections are stored as parent-child chunks and embedded for dense retrieval in Qdrant. Spanish queries are expanded into English before search. A domain reranker then reorders the passages; the score combines vector similarity with boosts when a passage mentions a peripheral, a register, or a function.
On a golden set of 28 questions (27 evaluated), after reranking:
- recall@3 went from 0.889 to 1.000
- MRR@10 went from 0.765 to 0.932
I built the pipeline, the reranker, the evaluation set, and the API. The agent runs on LangGraph and FastAPI, with Qdrant and Fastembed, Ollama locally and OpenAI in production, plus LangSmith traces and Docker and Kubernetes manifests. No public repo or demo.