A Local-First AI/ML Intelligence Layer for Retrieval-Augmented Generation in a Spring Boot Application

Large language models (LLMs) exhibit strong generative capability but suffer from hallucination, stale knowledge, and an inability to cite sources. Retrieval-Augmented Generation (RAG) mitigates these weaknesses by grounding responses in externally retrieved documents. This paper presents the design and implementation of an AI/ML intelligence layer that integrates RAG into an existing Spring Boot / Kotlin application with minimal new infrastructure. The layer reuses the application's embedded SQLite database as a vector store, serialises embedding vectors as little-endian BLOBs, and performs brute-force cosine-similarity search in process. A local, Docker-native Ollama runtime provides both the embedding model (nomic-embed-text) and the generative model (llama3.2), eliminating external API keys. We describe the layered architecture, the ingestion and query pipelines, the data model, tenant-scoped security, and deployment topology, and we discuss the scalability and quality trade-offs of the local-first approach. The result is a reference pattern for adding private, citeable, document-grounded chat to conventional enterprise web stacks without adopting a heavyweight vector database or third-party LLM subscription.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-03
DOI
https://doi.org/10.5281/zenodo.23908287
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Local-First AI/ML Intelligence Layer for Retrieval-Augmented Generation in a Spring Boot Application

Khairi Md.Juri
Zenodo (CERN European Organization for Nuclear Research)
Topic Modeling
article

A Local-First AI/ML Intelligence Layer for Retrieval-Augmented Generation in a Spring Boot Application

Khairi Md.Juri
article en

Abstract

Large language models (LLMs) exhibit strong generative capability but suffer from hallucination, stale knowledge, and an inability to cite sources. Retrieval-Augmented Generation (RAG) mitigates these weaknesses by grounding responses in externally retrieved documents. This paper presents the design and implementation of an AI/ML intelligence layer that integrates RAG into an existing Spring Boot / Kotlin application with minimal new infrastructure. The layer reuses the application's embedded SQLite database as a vector store, serialises embedding vectors as little-endian BLOBs, and performs brute-force cosine-similarity search in process. A local, Docker-native Ollama runtime provides both the embedding model (nomic-embed-text) and the generative model (llama3.2), eliminating external API keys. We describe the layered architecture, the ingestion and query pipelines, the data model, tenant-scoped security, and deployment topology, and we discuss the scalability and quality trade-offs of the local-first approach. The result is a reference pattern for adding private, citeable, document-grounded chat to conventional enterprise web stacks without adopting a heavyweight vector database or third-party LLM subscription.

Zenodo (CERN European Organization for Nuclear Research)
University of Technology Malaysia (MY)
Openalex Percentile: Top 16%
Topic Modeling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
A Local-First AI/ML Intelligence Layer for Retrieval-Augmented Generation in a Spring Boot Application — Khairi Md.Juri · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS