Analyzing the Corporate Knowledge Base
Work began by analyzing where and in what format the GrafTech team's knowledge was stored. Architectural decisions, coding requirements, and internal practices were scattered across technical documentation, wikis, policies, and source code repositories.
For each type of source, it was necessary to define the connection method, processing rules, and its role in future searches. Documentation might describe the general system architecture, while a repository contains its actual implementation; therefore, simply merging such materials into a single unstructured pool would not have been sufficient.
.jpg)
At this stage, the list of connected sources was finalized, and a general model for the corporate knowledge base was designed, ensuring that every piece of information maintains a link to its original document, file, or repository section. For an AI project of this nature, it was crucial not just to connect a language model, but to build a controlled corporate knowledge ecosystem.
Designing the RAG Architecture
The solution is based on a RAG (Retrieval-Augmented Generation) approach, where the language model generates answers not only based on its own training data but by retrieving relevant context from GrafTech's internal database.
The architecture is built as a sequential pipeline for processing corporate knowledge. First, the system retrieves materials from connected sources, then breaks them down into semantic chunks and saves the necessary metadata. After that, the data is indexed and becomes searchable. When a user asks a question, the system finds the most relevant materials, provides them to the language model as context, and generates a final answer with a link to the original source.
This approach allows the AI assistant to be used as a tool for leveraging corporate expertise, rather than as a generic chatbot that answers without regard for the company's internal standards.
Extracting Information from Various Sources
To connect the knowledge base, a data ingestion layer was implemented for the agreed-upon sources. Its task is to normalize disparate materials into a common model that the search system can then process.
Documents, wiki pages, and source code files all have different structures. Therefore, the data retrieval stage is separated from subsequent processing: this allows for the connection of new sources without rebuilding the agent's entire server logic, enabling the solution to evolve as the corporate information environment grows.
Furthermore, the intelligent logic is not tied to a single source and can expand alongside the company's internal systems.
Chunking materials and preserving context
Once uploaded, materials are broken down into semantic chunks suitable for searching and subsequent transmission to the language model.
This is especially important for technical documentation. If files are indexed in their entirety, the search results may be too large and contain irrelevant sections. If the data is broken down into pieces that are too small, the architectural or software context is lost.
Therefore, metadata is saved along with the content of each chunk: the source, file path, section, version or date, and other information necessary to identify the original source. This data is then used to generate links in the agent's responses.
Vector indexing of corporate knowledge
For semantic search, text chunks are converted into numerical representations, which allow the system to compare them not just by word matching, but by content.
A developer might phrase a question differently than how a rule is written in the internal regulations, but the system is still able to find the appropriate chunk based on meaning. The resulting representations are stored in a specialized database and used by the agent's search engine.
Hybrid search for documentation and code
Semantic search alone is not enough for a technical knowledge base. Repositories contain entities for which exact matches are critical: class and method names, service names, module identifiers, and file paths and names.
Therefore, the search layer provides full-text and/or hybrid search, which combines semantic matching with keyword matching. This approach allows for equally effective work with both natural language questions and precise technical queries.
Responses with mandatory source citations
One of GrafTech's key requirements was the verifiability of responses. For corporate development, it is not enough to receive a convincing-sounding text: a specialist must understand which internal document, file, or repository section it is based on.
After the search, relevant chunks are passed to the LLM as context. The agent generates a response based on them and provides the user with a link to the original source. If the relevant information is not in the database, the server logic must handle this situation correctly rather than providing a response not supported by internal materials.
This mechanism makes AI agent development suitable for working with technical knowledge, where the cost of a plausible but incorrect answer is very high.
Consulting on project architecture
The agent's first primary scenario is answering questions about the architecture of internal projects. A developer can ask the system in natural language to clarify which architectural approach is used in a specific project, where component interaction is described, what constraints are in place for a module, or which internal policy applies in a given situation.
The agent searches the knowledge base, selects relevant materials, and generates a consolidated response. The user starts directly with the task they want to solve, rather than searching for the right file.
Explaining source code with consideration for internal standards
The second primary scenario involves source code. A user can provide the agent with a snippet and request an explanation.

Unlike a general-purpose public model, the agent operates within the context of GrafTech's internal materials and can take the company's adopted standards and practices into account. Its task is not only to explain what the code does technically, but also to relate it to the specific development environment.
This is especially useful when onboarding specialists to existing projects: along with an explanation of the implementation, the employee gains access to the internal context upon which that implementation is based.
Updating the knowledge base without service downtime
A corporate knowledge base is never static. Documentation changes, new regulations emerge, repositories are updated, and new architectural solutions are created.
Therefore, the server-side logic supports uploading new materials, updating existing data, and re-indexing. An incremental approach is supported, allowing modified sources to be re-indexed without a full service shutdown.
This allows the agent's knowledge to evolve alongside the company's internal information environment and reduces the risk of working with outdated materials.
API as an independent integration layer
The project resulted in an independent server-side service rather than a chat tool tightly coupled to a single user interface. We developed an API for interacting with the agent, through which the client application can submit questions, receive answers and links to sources, and send code for explanation.
This solution allows for future integration of the agent with corporate web applications, messengers, internal portals, or IDE plugins. From a business software development perspective, this reduces component coupling: the intelligent backend can be developed independently of the client interface.
A separate API also simplifies the future development of integrations with the Client's internal services without changing the logic of the RAG pipeline itself.
The server-side solution includes basic request and response logging. This is necessary for technical maintenance and further improving the agent's quality.
Secure environment for corporate data
Since the agent works with internal documentation, source code, and company project architecture, the solution was designed with privacy and scalability in mind. Data processing is performed within an agreed-upon secure environment, without transmitting corporate materials to third-party services outside the approved infrastructure. Furthermore, the architecture allows for connecting new sources, increasing the knowledge base volume, and adding users without a complete system overhaul.





