28 apr

RAG (Retrieval-Augmented Generation) in an ERP context


E-invoicing in Germany: How to implement the obligation with SAP Business One

Retrieval-Augmented Generation (RAG) is the currently dominant architectural pattern for providing a large language model with current, company-internal knowledge without retraining the model itself. A RAG pipeline fetches relevant text snippets from a vector database with each request and passes them to the LLM along with the user’s query as context. The model then generates the answer based on this context – rather than based on its static training knowledge.

Context

In the ERP environment, RAG is particularly valuable because company knowledge comes from heterogeneous sources: SAP B1 manuals, CoSIT specifications for e-invoicing, DATEV documentation, internal wikis, customer requirement specifications, Coresuite/VFS documentation, blog posts, support cases. A typical pipeline: (1) Source documents are converted into Portions disassembled, (2) mapped into a 768-dimensional vector space using an embedding model (e.g. gemini-embedding-001), (3) stored in a vector database (Supabase with pgvector, Pinecone, Weaviate). At runtime, the user's question is also converted into a vector, and the most similar chunks are retrieved. Cosine similarity retrieved and incorporated as context into the LLM prompt. Advanced RAG variants combine vector search with full-text search (hybrid search), use rerankers, or employ a multi-step approach.Agentic RAGIn products like B1-Helpster, RAG is combined with direct service layer connectivity, enabling the agent to answer conceptual questions as well as query live data.

Demarcation

RAG is not fine-tuning: it doesn't change the model but feeds it contextually. Compared to pure prompt engineering, RAG is dynamic and scales with the size of the knowledge base. Compared to classic search, it provides not just links but a synthesised answer – but carries the risk of the model misinterpreting the sources. Clean citations, traceable source references, and a clear „I don't know" when retrieval is empty are therefore mandatory components of any ERP RAG implementation.


Humans and AI

SAP KI Vision: The Autonomous Enterprise

Hardly a week goes by without the announcement of more intelligent language models, new co-pilots or more powerful AI agents. Nevertheless, SAP CEO Christian Klein states in...
Crystal Reports for AI

Crystal Reports on AI

Anyone developing their own reports in SAP Business One quickly encounters the same problem: The B1 database schema is extensive, Crystal Reports has...
AI in the company

Why companies are hesitant about AI in ERP

Artificial intelligence in the ERP context raises high expectations, as significant productivity gains, far-reaching automation and more informed decisions are on the cards. Nevertheless ...
Predictive maintenance

Predictive maintenance: how to turn SMEs into smart factories

In today's intelligent world, the ability to solve problems before they even arise is no longer a futuristic scenario, but ...
RPA

RPA in the ERP environment: increasing efficiency through digital process assistants

Many ERP systems run processes on a daily basis that are necessary but do not add value. Employees spend valuable time processing orders ...
Generative AI in ERP

Generative AI in ERP: How LLMs are changing the role of ERP systems

With the advent of generative AI and large language models (LLMs), the role of ERP systems is changing fundamentally. Instead of ...
Wird geladen …