# Private AI Layer for Baan On-Prem: Reference Architecture

> Source: https://netray.co/erp-help/private-ai-layer-baan-legacy-on-prem-architecture
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## Short answer

For legacy Baan, do not touch the application. Copy data to a read-only reporting database on a schedule, index documents locally, expose approved read actions through a tool server, and serve an open-weight model on your own GPUs. Baan's table naming and authorisations must be mapped by hand, and writes should stay in Baan sessions.

## Kind

advanced

## System

infor-ln

## Erp

Baan IV and Baan 5 (legacy)

## Module

AI integration / legacy Baan data access

## Query

how to add AI to Baan IV or Baan 5 without migrating

## Alternate Queries

- Baan ERP AI integration
- chat with Baan data on-prem
- Baan 5 ODBC read-only AI assistant
- Baan legacy modernization with private LLM

## Applies To

Baan IV and Baan 5 / BaanERP on Unix or Windows with Oracle, Informix, SQL Server or the Baan database driver

## Steps

### How to build a private AI layer on Baan

**Items:**

- Confirm the Baan version, operating system, database and whether a supported driver or export path exists.
- Pick the tables and companies that answer your target questions and export them to a read-only reporting database on a schedule.
- Capture Baan data dictionary names and domains so labels and enumerated values read correctly in the index.
- Index reports, drawings and documents from file shares with local embeddings.
- Expose approved read actions through a tool server over the reporting copy only.
- Serve an open-weight model on local GPUs and log every prompt and query.
- Keep write-back inside Baan sessions: the assistant drafts, a user enters or approves in Baan.

## Sections

### Data access paths in Baan

**Body:**

Baan uses package, module and number table names such as tcibd001 for items, tdsls040 for sales orders and tdpur040 for purchase orders in Baan IV, with LN-style names (for example tdsls400) in later Baan 5 and LN lineages. Verify against your own data dictionary because customisations and versions differ. In the database the table name carries the company number.

Access options depend on version and platform: the Baan database driver and ODBC access on Windows, native database access when Baan data sits in Oracle or SQL Server, session-based exports and ASCII dumps, and Baan's own business interfaces where the site has them. Choose the least intrusive one that your Baan version supports, and always read from a copy.

Enumerated values are stored as numbers whose meaning lives in the domain definitions, so export those as lookup tables or the model will return raw codes.

**Code:**

-- Reporting copy, read-only (names are from the Baan data dictionary, verify on your system)
SELECT t_item, t_dsca, t_citg
FROM tcibd001100
WHERE t_citg = 'RAW';

### Reference architecture

**Body:**

Treat Baan as a data source and a system of record you do not alter. A scheduled extract writes to a reporting database; a document pipeline indexes reports and drawings; a tool server exposes a short list of named read actions; a model server on local GPUs answers; an audit store records everything.

Because Baan IV era servers may be unsupported or fragile, keep extracts off peak, and never run vector search or analytics against the production database. Air-gapped sites simply keep the whole stack inside the boundary.

This pattern also supports migration: the same reporting copy and index become the reference for validating a later move to LN or another ERP.

### Permissions and write-back

**Body:**

Baan authorisations are by user, role and session, with company partitioning. They are not exposed through a modern identity API, so the tool server must carry its own role map: for each person, which companies and data classes they may query, maintained alongside Baan's own definitions.

Write-back: keep it in Baan sessions. The assistant can produce a drafted order change or an item review checklist, but a user keys or imports it through standard Baan sessions or an approved import mechanism, never by direct table writes.

### Sizing, limits and honest caveats

**Body:**

Baan estates are often smaller in users (50 to 300 named) but large in history, so the index of documents and extracts matters more than concurrency. One inference GPU usually covers the interactive load; plan a second for redundancy.

Limits: the data is only as fresh as your extract schedule, tooling for Baan IV is thin, and customisations undocumented in the dictionary will confuse retrieval. If the real aim is replacing Baan, the assistant helps analysis but does not replace migration.

## Pitfalls

- Running extracts or queries against production during peak shifts on aging hardware.
- Returning raw numeric domain codes because enumerated values were not exported.
- Forgetting the company suffix and mixing data from multiple companies.
- Assuming Baan IV and Baan 5 share identical table names and fields.
- Writing to Baan tables directly instead of using sessions or supported imports.

## Ai Angle

DataRay and ERPray can sit on a reporting copy of Baan data, show the query behind each answer, and run on your own GPUs. Netray treats Baan as read-only and keeps changes inside Baan sessions.

## Faq

### Can I add AI to Baan without migrating?

**Answer:** Yes. A scheduled read-only copy, a local document index and a tool server in front of an open-weight model give natural-language access without changing Baan or sending data out.

### Is there an API for Baan?

**Answer:** It depends on version and platform: database driver or ODBC access, exports and, in later versions, business interfaces. Choose the least intrusive supported path and read from a copy.

### How do I handle Baan roles?

**Answer:** Baan roles are not available as a modern identity feed, so maintain a role-to-company-and-data map in the tool server and filter every query and retrieval by it.

### Will the AI work on old Unix servers?

**Answer:** The model does not run on them. Extract data to a modern reporting server; AI runs on separate GPU hardware on your network.

## Search terms

Baan AI integration, Baan IV AI, Baan 5 private LLM, Baan ERP chatbot, Baan modernization AI, chat with Baan data, Baan reporting database, Baan on-prem AI

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
