Blog

Knowledge Engine: How to Give AI Access to Company Knowledge

1. Why AI Needs Corporate Knowledge

A language model can analyze information and answer questions, but it does not inherently know a company’s internal policies, up-to-date instructions, or corporate documents.
RAG (Retrieval-Augmented Generation) enables AI to use this knowledge when responding to queries. In this article, we explain how RAG works, what Gorgona’s Knowledge Engine is designed to do, and what to consider when building a corporate knowledge base—from document ingestion and access control to evaluating search and answer quality.
Language models can work with text, analyze information, and answer questions. However, every model has a limitation: it does not know what is happening inside a particular company right now, which decisions management has made, where the latest documentation is stored, or which rules apply to internal processes.
You can ask AI to prepare an answer to a customer’s question, find an instruction for an employee, or explain an internal policy. But if the required information is not included in the model’s context, it cannot reliably answer based on the company’s documents.
In theory, a model can be fine-tuned on corporate data, or a large collection of documents can be passed to it in full. In practice, both approaches have limitations: fine-tuning requires additional resources and is not always suitable for information that changes frequently, while including the entire document collection in a prompt can be costly and inefficient.
That is why a different approach is used to work with internal knowledge: RAG (Retrieval-Augmented Generation). In Gorgona, the Knowledge Engine module is designed to work with corporate knowledge and manage access to it.
Knowledge Engine helps organize AI access to corporate documents: it finds information by meaning, passes relevant excerpts to the model, and takes into account the permissions of the user asking the question.
The module can be used in a range of scenarios:
  • Customer support. Support agents and chatbots get answers based on policies covering returns, delivery, warranties, and other processes.
  • Internal helpdesk. Employees can find answers in HR, information security, and IT policies.
  • Legal and regulatory documents. Search helps users work with contracts, internal policies, and regulatory materials.
  • A knowledge base for an external agent. Knowledge Engine provides access to corporate knowledge for a customer’s existing AI agent.

2. What RAG Is and How It Works

RAG is an approach in which, before generating an answer, a system finds information in a knowledge base that is relevant to the user’s query and passes it to the language model as additional context.
Imagine an employee asks, “How do I process a product return?”
The company’s documents may describe the relevant process differently—for example, as “Procedure for Handling Product Return Requests.” A conventional exact-word search may fail to find the right excerpt. Semantic search can match the query with a document based on meaning.
For this to work, documents are processed in advance.
  1. Document preparation. Text is extracted from uploaded files or connected sources.
  2. Chunking. A large document is divided into smaller sections called chunks. This makes it possible to search for individual meaningful passages instead of passing the entire document to the model.
  3. Indexing. The system prepares the chunks for retrieval and stores the data needed for search.
  4. Query retrieval. When a user asks a question, the system searches for the most relevant chunks.
  5. Answer generation. The retrieved chunks are passed to the language model along with the original question. The model uses this context to prepare an answer.
For example, instead of having to recall the return policy on its own, AI receives relevant excerpts from an internal instruction and builds its answer on that information.
Knowledge Engine offers three search modes: semantic, keyword-based, and hybrid. Hybrid search is used by default, combining semantic matching with keyword search. Reranking can also be enabled to improve the selection of relevant chunks, although this may make answer generation slightly slower.
RAG does not guarantee that every answer will be correct. The result depends on the quality of the source documents, retrieval, processing settings, and the model itself. That is why it is important not only to populate the knowledge base, but also to review it regularly.

3. What Knowledge Engine Does

RAG is an approach to retrieving and using information. Knowledge Engine is a Gorgona module that helps organize this process in a corporate environment.
It does more than search documents. Businesses need to understand where data comes from, who can use it, how well the system retrieves relevant information, and how to keep the knowledge base up to date.
Knowledge Engine includes tools for managing knowledge bases, processing documents, searching their contents, and controlling access. More broadly, working with corporate knowledge also involves quality control, query tracking, and processes for maintaining the knowledge base.
Knowledge Engine can be used alongside other Gorgona modules or connected to a specific workflow, depending on the customer’s needs. For example, a company may already have its own AI agent but need to give it access to corporate information.
An external agent can be connected in two ways: through LLM Box, using an OpenAI-compatible API and an access key, or through the Agent API, which allows the customer to call a Gorgona agent. In both cases, knowledge-base retrieval and permission checks are handled by the platform, so the external agent does not need to implement these mechanisms itself.

4. How Documents Get into the Knowledge Base

Corporate information is rarely stored in one place. Documents may be kept in network folders, knowledge management systems, and other internal services. One practical question when deploying Knowledge Engine is how to bring in data from the sources a company already uses.
There are two ways to add documents to a knowledge base:
  • Upload files or text manually through the interface.
  • Connect corporate systems using connectors. Ready-made connectors for Confluence and Jira are currently available. Support for other sources is planned.
Knowledge Engine supports PDF, DOCX, HTML, and Markdown files, as well as text pasted manually by the user. The maximum upload size is 50 MB per file.
Data from corporate systems is updated through connector synchronization. If a document was uploaded manually, it must be uploaded again to update it.
The knowledge-base structure follows the hierarchy “knowledge base → folders.” Documents can be organized into folders according to the company’s needs—for example, by department, document type, or workflow. Folders are also used to configure access permissions.
After upload, documents are processed: the system extracts the text, splits it into chunks, and prepares it for retrieval. Built-in OCR allows scanned documents to be uploaded directly: during processing, the system recognizes text, tables, and formulas. Physical scanning of paper documents remains the customer’s responsibility.

5. How AI Finds the Right Information

Once documents have been prepared, a user can ask a question in a chat or contact an agent that uses Knowledge Engine.
The model receives the original query and information about the tools available to it. If it needs additional information and the configured integration supports tool calls, the model queries the knowledge base.
Knowledge Engine performs the search and returns several of the most relevant chunks along with information about their source documents. The number of chunks is set in the knowledge-base settings. If the context is insufficient, the model can make several queries to the knowledge base within the configured limits.
The model uses the retrieved information to prepare its answer. It does not receive the entire corporate document collection; instead, it retrieves the passages the system considers relevant to the specific query.
This scenario depends on the capabilities of the model and the configured integration: not all models support tool calling in the same way.

6. Access Control: Which Information Can a Specific Employee Use?

For corporate use, simply giving AI access to every document is not enough. Employees have different permissions, and the system must take these into account when retrieving information.
Imagine a company with a CEO, an accounting department, and a technical support team. The CEO may need broad access to corporate information, while a support specialist needs only instructions and documents related to their work.
If all documents are available without access restrictions, an employee may receive information they are not authorized to see.
In Knowledge Engine, access to knowledge-base items is controlled by teams. Permissions are configured at the folder level, making it possible to organize access according to the teams for which the documents are intended.
It is important that restrictions are applied during retrieval. The system should search only the knowledge areas the user is authorized to access, rather than retrieving arbitrary chunks first and attempting to hide unauthorized results afterward.
This prevents information an employee is not allowed to access from being included in the context passed to the language model.
Knowledge Engine therefore helps organize controlled access to corporate data by taking team permissions into account.

7. More Than Search: Maintaining and Managing Corporate Knowledge

A knowledge base is not finished once documents have been uploaded. Information changes, new instructions appear, old documents become outdated, and search results may be irrelevant. It is therefore important to decide who will monitor the knowledge base and keep it working properly.
We recommend that customers assign a Data Steward role. This person is responsible for keeping the knowledge base up to date, updating documents, monitoring access permissions, and checking search quality. This is an organizational role on the customer’s side, not a separate role that must be assigned in the Knowledge Engine interface.
The product itself provides document-management tools, including:
  • Processing statuses for each document.
  • The ability to replace and delete documents.
  • Reindexing when processing settings change. Search continues to work during reindexing.
These tools help maintain the knowledge base as documents and search requirements change.

8. How to Evaluate Search and Answer Quality

Even when documents have been uploaded correctly, the system will not necessarily find the right passages every time.
Quality is affected by several factors: how documents are split into chunks, how well the source text is structured, and whether the selected search method is suitable for the type of information.
For example, long legal documents may contain complex cross-references and dependencies between sections. If such a document is split into small, independent chunks, some context may be lost. Different chunking methods and sizes can be selected for different document types; changing these settings does not stop search.
One approach to quality evaluation is the Golden Dataset methodology, which we use during implementation. A set of test questions and reference answers is prepared together with the customer.
The process can look like this:
  1. Together with the customer, compile a list of questions that matter to their actual workflows.
  2. Prepare a reference answer or evaluation criteria for each question.
  3. Run tests using the current knowledge-base configuration.
  4. Compare the system’s answers with the reference answers using an evaluation model.
  5. Analyze the results and adjust document-processing settings, search settings, or other parameters.
  6. Repeat the evaluation to see whether quality has improved.
This evaluation helps compare configurations and identify problem areas. However, the resulting metric is not a universal measure of AI accuracy: its meaning depends on the selected questions, reference answers, and comparison method.
Search quality can also be checked manually in Search playground, a test-search interface. It shows which chunks the system retrieves and which documents they come from. This helps explain why a query returns particular results and assess how well search works with the relevant materials.
Automated tests and manual checks do not replace testing with users in real-world workflows.

9. Observability: Understanding Where an Answer Came From

When AI uses corporate knowledge, it is important to understand not only the final answer, but also how the system arrived at it.
In Gorgona platform traces, an administrator can see the user’s question, how the model queried the knowledge base, and which chunks it received. This helps investigate unexpected answers and determine which information the system used to prepare them.
Users can also see the sources of an answer in the chat: the knowledge base and the document from which the information was taken are displayed beneath the answer.
Traces are part of the Gorgona platform’s general functionality. Observability will be covered in more detail in a separate article.

10. How to Implement Knowledge Engine

Implementing a corporate knowledge base starts not with uploading every file, but with understanding what information AI needs and who should be allowed to access it.
Step 1. Define the tasks and data sources. Determine which questions AI should answer, where the relevant information is stored, and how often it changes.
Step 2. Organize the knowledge structure. Documents are arranged into knowledge bases and folders—for example, by department, document type, or workflow. This helps separate information sets and configure access.
Step 3. Configure data ingestion. Choose whether to upload documents manually or use connectors to corporate systems. For sources without an available ready-made connector, implementation may need to wait until support is developed or require a separately agreed integration approach.
Step 4. Prepare documents for retrieval. Choose text-processing parameters, the method and size of chunking, and the search mode. Settings may differ for different document types.
Step 5. Configure access. Determine which teams can access specific knowledge bases and folders.
Step 6. Evaluate quality. Create a set of test questions, test search and answers, analyze errors, and adjust the configuration. Search playground can be used for manual checks.
Step 7. Test with users. Make sure the system solves real work tasks, handles typical queries correctly, and does not disclose unnecessary information.
Step 8. Organize ongoing maintenance. Decide who is responsible for updating documents, managing permissions, and checking search quality. We recommend assigning a Data Steward. If information changes in source systems, connector synchronization must also be organized; manually uploaded documents need to be uploaded again.
For paper archives, the customer must scan the documents first. The scans can then be uploaded directly to Knowledge Engine, where built-in OCR recognizes text, tables, and formulas during processing.

11. Where RAG Ends and Knowledge Engine Begins

These concepts should not be confused.
RAG is an approach that retrieves relevant information and passes it to a language model to help generate an answer.
Knowledge Engine is a Gorgona module that organizes work with corporate knowledge and adds access management and knowledge-base maintenance capabilities to the retrieval process.
Gorgona is a platform that provides different tools for working with AI. Knowledge Engine can be used with other modules or connected to a specific workflow, depending on the customer’s needs.
Within the overall product architecture, other modules handle their respective parts of the process. LLM Box is designed to manage access to and use of language models, while Guardrails applies rules to model requests and responses. Knowledge Engine works with corporate information and determines which knowledge can be accessed in a given scenario.
These functions are connected, but they are not interchangeable. For example, an employee’s permission to retrieve data from an internal knowledge base and the checks applied to data sent to an external model are two different issues that require different control mechanisms.

12. What the Business Gains

For a company, Knowledge Engine is a way to organize AI’s use of internal information that is not part of a language model’s general knowledge.
Instead of manually searching for instructions across different repositories or building the entire retrieval infrastructure from scratch, a company can establish a process in which AI receives relevant excerpts from corporate documents.
The benefits are not limited to faster access to information; the process also becomes more manageable:
  • Employees can access the data their teams are authorized to use.
  • AI can use internal documents when preparing answers.
  • Search quality can be evaluated using test questions and manual checks in the test-search interface.
  • The knowledge base can be maintained and improved over time.
  • Administrators can analyze the model’s interactions with the knowledge base using platform traces, while users can see the sources of answers in the chat.
Knowledge Engine does not remove the need to keep documents up to date, review results, and configure access permissions correctly. It provides the infrastructure for working with corporate knowledge, but the quality of the outcome still depends on the data, settings, and specific use case.
The core idea behind Knowledge Engine is to give AI controlled access to company knowledge so it can answer work-related questions using internal information, rather than relying only on the data on which the language model was trained.

Related articles

2026-10-28 12:11 Articles