Developing an AI agent for the GrafTech corporate knowledge base
IT
Video Analytics / Computer Vision
LLM
Automation
UX/UI
[ Описание ]
BPA developed an AI agent for the GrafTech corporate knowledge base. The solution is built on a RAG architecture: the system indexes documentation, policies, and repositories, performs semantic and full-text searches, generates answers based on the retrieved materials, and always cites the original source. The agent can also explain source code while accounting for the company's internal practices, with interaction implemented via an API for seamless integration with corporate interfaces.
[ Ключевая ценность ]
The AI agent has transformed GrafTech's fragmented technical knowledge into a unified intellectual framework: developers can now find information on architecture and code faster, receive verifiable answers with links to sources, and leverage the company's accumulated expertise without manually searching through multiple systems.
ИИ-агент для работы с корпоративной базой знаний и технической документацией
[
Graphic Technologies LLC (GrafTech)
]
A Russian IT company based in Saint Petersburg, specializing in software development and information technology.
[
Задача
]
GrafTech needed an internal AI assistant to consolidate knowledge from documentation, policies, wikis, and repositories, allowing developers to quickly obtain reliable answers regarding project architecture and source code, complete with links to corporate sources. The solution was intended to reduce the time spent searching for technical information and simplify the onboarding of employees into the company's internal standards.
[ Решение ]

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.

‍

Корпоративный ИИ-агент для работы с внутренней базой знаний

‍

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.

Вызовы и решения
[ Вызов ]
Architectural solutions and internal standards were distributed across documentation, wikis, regulations, and source code repositories.
[ Решение ]
A unified RAG pipeline was designed: data is extracted from connected sources, broken down into semantic fragments, supplemented with metadata, and indexed in a centralized search system.
[ Вызов ]
Accuracy of technical information is critical for developers: a plausible but incorrect answer can lead to a flawed architectural decision.
[ Решение ]
Generation is tied to the retrieved context. Answers regarding architecture are accompanied by references to the internal primary source—a document, file, or repository section.
[ Вызов ]
Documentation and the codebase are updated regularly, so a static index quickly becomes outdated.
[ Решение ]
A mechanism for uploading, updating, and incrementally re-indexing materials without stopping the service has been implemented.
[ Технологический стек ]
Python
FastAPI
REST API
Celery
Redis
PostgreSQL
Docker
LangChain
GigaChat
Qdrant
[ Решение ]
For GrafTech, we developed a corporate AI agent that consolidated internal documentation, architectural materials, and the codebase into a single intelligent knowledge access hub. Developers can ask questions in natural language, receive answers based on corporate sources, navigate to supporting materials, and use the agent to explain source code. The solution is implemented as an independent backend with an API and can evolve alongside the company's knowledge base while connecting to various user interfaces.
[ Отзыв клиента ]
Graphic Technologies LLC (GrafTech)
"Thanks to the BPA team for the collaboration on the AI agent for our internal knowledge base. The project turned out to be architecturally sound and truly practical for the development team. We would especially like to highlight the prompt communication, attention to requirements, and the fact that all questions throughout the project were resolved quickly and effectively," — The GrafTech Team.
Смотреть полностью
Другие проекты
/ Все проекты /