1. Home
  2. Insights
  3. Self-hosted LLMs
Self-hosted LLMs

RAG for company knowledge: how a language model answers from your own documents

By the Timeus Lab team · · 2 min read

Two technicians mount a GPU server in a rack in a new server room

A language model knows a lot about the world and nothing about your company. It has never seen your contracts, procedures, product specs or past decisions. Retrieval-augmented generation, or RAG, connects the model to those documents so it can answer from them and show where the answer came from.

At Timeus Lab we build company knowledge assistants, often on self-hosted models. This guide explains how RAG works and what makes it reliable.

What is RAG?

RAG (retrieval-augmented generation) is a method where a system first searches company documents for passages relevant to a question, then gives those passages to a language model, which writes an answer based on them. The model does not need to be retrained when documents change, and each answer can cite its sources.

How does a RAG system work?

  1. Collect. Connectors read documents from file shares, wikis, email, document systems and databases.
  2. Prepare. Documents are converted to text, split into passages and labelled with title, date, owner and access rights.
  3. Index. Each passage is stored for keyword search and as a vector for search by meaning.
  4. Retrieve. For each question, the system finds the best passages using both methods and ranks them.
  5. Answer. The model writes the answer from the passages and lists the sources.

Keyword search finds exact terms such as part numbers, names and codes. Meaning-based search finds passages that say the same thing in other words. Combining them, called hybrid search, gives better results than either alone, especially in technical companies full of codes and abbreviations.

How are access rights respected?

Access rights are respected by filtering passages before they reach the model, using the same permissions as the source systems. A person who cannot open a contract in the document system must not get its content from the assistant. This is designed in from the start, not added later.

How do you know the answers are good?

Answer quality is measured with a set of real questions and expected answers prepared with the people who will use the system. Each change to search or model is tested against this set. In daily use, people can rate answers and report wrong sources. The most common cause of bad answers is bad retrieval, not the model.

RAG or fine-tuning?

RAG is better for knowledge that changes and must be traceable. Fine-tuning is better for teaching a model a style, a format or a narrow task. Many systems use RAG alone; some add light fine-tuning on top.

Questions

Which documents work best?

Text documents with clear structure work best. Scans need good text recognition first, and tables and drawings need special handling.

Can it answer from databases too?

Yes. The assistant can query business systems through defined functions, for example to check stock or order status.

Does it remember past conversations and decisions?

It can, with a shared memory layer. Our product Recadia keeps decisions and agreements that people and AI agents can rely on.