Building a Secure Enterprise AI Assistant with RAG and Custom Infrastructure

hexagon · Tech · 2025 · source Agentic: no · promotional bias: high · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Enterprise asset-management AI assistant

Hexagon wanted an AI-powered digital worker for enterprise asset-management products that could answer product questions, support internal workflows, and operate in high-security customer environments without losing domain relevance, tenant isolation, or lifecycle control.

Constraints:

Architecture

Hexagon built HxGN Alix as a digital worker for asset lifecycle intelligence using AWS generative AI services and custom infrastructure. The stack runs open-source Mistral NeMo on Amazon EKS with G6e GPU instances, uses Bedrock Knowledge Bases and S3 for RAG over product documentation, applies Bedrock Guardrails and prompt management, preserves data privacy by not storing user interactions, and uses Amazon Bedrock as a multi-region fallback path for regional failures.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  hxgn-alix[HxGN Alix] --> mistral-nemo[Mistral NeMo]
  hxgn-alix[HxGN Alix] --> bedrock-knowledge-bases[Bedrock Knowledge Bases]
  hxgn-alix[HxGN Alix] --> bedrock-guardrails[Bedrock Guardrails]
  hxgn-alix[HxGN Alix] --> amazon-bedrock[Amazon Bedrock]
  amazon-eks[Amazon EKS] --> mistral-nemo[Mistral NeMo]
  amazon-eks[Amazon EKS] --> g6e-gpu-instances[G6e GPU Instances]
  bedrock-knowledge-bases[Bedrock Knowledge Bases] --> amazon-s3[Amazon S3]
  amazon-bedrock[Amazon Bedrock] --> prompt-management[Prompt Management]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
HxGN Alix AI-powered digital worker for EAM product support and internal workflows. Mistral NeMo, Bedrock Knowledge Bases, Bedrock Guardrails
Amazon EKS Compute and deployment substrate for Alix models and services. Mistral NeMo, G6e GPU Instances
G6e GPU Instances NVIDIA L40S GPU infrastructure for serving generative models under 12B parameters. Amazon EKS
Mistral NeMo Primary open-source 12B multilingual and function-calling-capable LLM. HxGN Alix, Amazon EKS
Amazon S3 Secure storage for product documentation and user data. Bedrock Knowledge Bases
Bedrock Knowledge Bases Managed RAG layer with parsing, hierarchical chunking, embeddings, and retrieval. HxGN Alix, Amazon S3
Bedrock Guardrails Grounding, filtering, and safety checks for generated answers. HxGN Alix
Amazon Bedrock Fallback model service and prompt-management platform. HxGN Alix
Prompt Management Versioning, evaluation, and sharing layer for prompts. Amazon Bedrock

Data flow

A user asks HxGN Alix a product or workflow question. The assistant uses product documentation stored in S3 and retrieved through Bedrock Knowledge Bases, with parsing, hierarchical chunking, FAQs, and special instructions to preserve context. The application routes generation to Mistral NeMo running on EKS/G6e infrastructure, uses Bedrock Guardrails for grounding and safety checks, and can fall back to Bedrock multi-region endpoints if the primary region fails.

4 supporting quotes
“Amazon S3 provides secure storage for managing product documentation and user data, adhering to industry security standards.”article, stated
“Amazon Bedrock Knowledge Bases enhances Alix’s ability to retrieve relevant information from stored documents, improving response accuracy.”article, stated
“Mistral NeMo, a 12-billion parameter open source LLM built in collaboration with NVIDIA and released under the Apache 2.0 license.”article, stated
“In the event of zonal or outages, the system can fall back to the Mistral 7B model using Amazon Bedrock multi- Region endpoints”article, stated

Why this architecture

Hexagon chose an enterprise-specific digital worker architecture because consumer GenAI lacked the domain control, security, and integration needed for EAM products. Open-source LLM hosting gave lifecycle and cost control, Bedrock Knowledge Bases supplied managed RAG features for product documentation, Guardrails addressed safety and grounding, and Bedrock fallback reduced regional availability risk.

3 supporting quotes
“enterprise generative AI is tailored to address specific business challenges, including scalability, security, and seamless integration with existing workflows.”article, stated
“By using open source LLMs, we’re able to control the lifecycle of model customizations based on business needs.”article, stated
“We had to choose between pretraining the model with internal documentation or implementing RAG. RAG became the obvious choice for the following reasons:”article, stated

Models used: Mistral NeMo · Mistral 7B · Amazon Bedrock foundation models

Scale

Alternatives considered (roads not taken)

Use consumer generative AI patterns

Rejected because: Enterprise use required scalability, security, integration, proprietary data, and control over intellectual property.

“Consumer generative AI tools are designed for broad accessibility, enabling users to perform everyday tasks such as drafting content, generating images, or answering general inquiries.”article, stated
“enterprise generative AI is tailored to address specific business challenges, including scalability, security, and seamless integration with existing workflows.”article, stated

Pretrain the model on internal documentation

Rejected because: The team was early in development and lacked enough data, while RAG could ground answers in retrieved context.

“* We were in the early stages of development and didn’t have enough data to pre-train our models * RAG helps ground the model’s responses in accurate context by retrieving relevant information, reducing hallucinations”article, stated
“RAG helps ground the model’s responses in accurate context by retrieving relevant information, reducing hallucinations”article, stated

Use chat history as the only follow-up retrieval strategy

Rejected because: Context-based retrieval was faster but prompt-based reformulation worked better for large document sets.

“The first method worked better with large document sets by focusing on highly relevant results, whereas the second approach was more effective with a smaller, focused document set.”article, stated

Patterns

rag-retrieval (retrieval)

HxGN Alix uses Bedrock Knowledge Bases to retrieve product documentation and ground answers.

“Amazon Bedrock Knowledge Bases enhances Alix’s ability to retrieve relevant information from stored documents, improving response accuracy.”article, stated

guardrails-io-filtering (safety)

Amazon Bedrock Guardrails applies filtering, grounding checks, and safety policies to AI responses.

“To address this, we use a combination of specialized prompts along with contextual grounding checks from Amazon Bedrock Guardrails.”article, stated

fallback-degradation (resilience)

The system can fall back to Bedrock multi-region endpoints when regional failures occur.

“In the event of zonal or outages, the system can fall back to the Mistral 7B model using Amazon Bedrock multi- Region endpoints”article, stated

prompt-versioning (operations)

Bedrock Prompt Management is used for prompt creation, evaluation, versioning, and sharing.

“This feature of Amazon Bedrock simplifies the creation, evaluation, versioning, and sharing of prompts within the engineering team”article, stated

Tradeoffs

Host an open-source LLM

Chose Mistral NeMo on EKS and G6e GPUs over Using only commercial LLM APIs.

Rationale: Open-source hosting gave Hexagon control over lifecycle, customization, licensing, cost, and data privacy.

“By using open source LLMs, we’re able to control the lifecycle of model customizations based on business needs.”article, stated
“We selected G6e.48xlarge instances powered by NVIDIA L40S GPUs—the most cost-efficient GPU instances for deploying generative AI models under 12 billion parameters.”article, stated

Use RAG rather than pretraining

Chose Bedrock Knowledge Bases over stored product documentation over Pretraining the model with internal documentation.

Rationale: The team lacked enough early training data and wanted answers grounded in accurate retrieved context.

“We were in the early stages of development and didn’t have enough data to pre-train our models”article, stated
“RAG helps ground the model’s responses in accurate context by retrieving relevant information, reducing hallucinations”article, stated

Choose prompt-based search reformulation for large document sets

Chose Additional LLM call to create a more complete retrieval query over Sending the last five chat messages directly to the knowledge base.

Rationale: Prompt reformulation kept prompts concise and yielded highly relevant results for large document sets, while chat-history retrieval was faster for smaller sets.

“Although this requires an additional LLM call, it yields highly relevant results, keeping the final prompt concise.”article, stated
“This approach provided faster response times because it involved only one LLM round trip.”article, stated

Gotchas (what bit them)

Base models hallucinated without product-specific grounding.

Root cause: Generic models had limited knowledge of Hexagon's products.

Resolution: The team implemented RAG over product documentation instead of relying on the base model alone.

“Base models had limited knowledge of our products and often produced hallucinations.”article, stated
“RAG became the obvious choice”article, stated

Chunking complex documentation could destroy context.

Root cause: Tables and complex structures lost relational information when split into vector chunks.

Resolution: Hexagon used hierarchical chunking in Bedrock Knowledge Bases to preserve important relationships.

“applying this method to tables or complex structures risks losing relational data, which can result in critical information not being retrieved”article, stated
“we used the hierarchical chunking capability of Amazon Bedrock Knowledge Bases, which helped us preserve the context in the final chunk.”article, stated

Follow-up questions could fail retrieval when processed alone.

Root cause: Short follow-ups such as 'Can you elaborate?' lacked enough standalone context for RAG search.

Resolution: The team implemented mechanisms to maintain conversational context for follow-ups.

“Users often engage in follow-up questions that are brief or context-dependent, such as “Can you elaborate?” or “Tell me more.””article, stated
“we implemented mechanisms to maintain conversational context, enabling HxGN Alix to interpret and respond appropriately.”article, stated

Traditional testing did not fit generative AI behavior.

Root cause: Prompts return variable outputs and LLM latency varies by query.

Resolution: Hexagon introduced new testing, QA, monitoring, and optimization processes.

“Prompts can return different results each time, making verification more complex.”article, stated
“Continuous monitoring was implemented to track performance metrics and user interactions, allowing for ongoing optimization of the AI system.”article, stated

Evaluation

Hexagon evaluated through a proof of concept, internal-user release, backlog discovery, RAG strategy experiments, and adjusted QA/monitoring methods for LLM variability.

Metrics: small internal proof-of-concept release · latency variability from 1 to 60 seconds · comparison of two retrieval approaches · security, accuracy, and sustainability requirements

3 supporting quotes
“During the proof of concept, we scoped the project to use an off-the-shelf NeMo model deployed on our existing EKS cluster”article, stated
“After releasing the proof of concept to a small set of internal users, we identified a healthy backlog of work items”article, stated
“We tested two approaches:”article, stated

Outcomes

The system uses a 12B-parameter Mistral NeMo model with a 128,000-token context window, G6e.48xlarge GPU instances, and latency observations ranging from 1 to 60 seconds.

3 supporting quotes
“The successful launch of HxGN Alix demonstrates the transformative potential of generative AI in enterprise asset management.”article, stated
“we identified a healthy backlog of work items that needed to go live, including enhancements in security, architectural improvements, network topology adjustments”article, stated
“Mistral NeMo offers a large context window of up to 128,000 tokens and is designed for global, multilingual applications.”article, stated