Building Hallucination-Safe Conversational AI for Enterprise Construction Data 

a photo of construction workers on site

Services:

Industry:

Construction

Location:

CO, USA

Client since:

2025

Business challenge

The client possessed a substantial volume of enterprise data that remained largely underutilized for decision-making. This included both highly structured operational records (construction work orders) and unstructured data sources. 

A single work order record could contain hundreds of attributes, nested structures, internal system codes, and dependencies. Extracting insights required advanced filters and deep system knowledge, making the platform inaccessible for non-technical users. 

To unlock value from this data, the client initiated the implementation of an AI Search layer to support decision-making over unstructured and structured data. While initially designed for specific tasks, the AI Search architecture needed to evolve into a broader data platform capable of presenting new perspectives on enterprise data. 

Low data accessibility

Non-technical users struggled to retrieve insights without understanding schemas, internal codes, and complex filtering logic.

High time-to-insight

Simple operational questions required multiple manual steps and the rebuilding of repeated queries.

Scalability and trust issues

Large result sets (tens of thousands of records) were difficult to analyze or summarize without introducing AI hallucinations.

icon save costs

Cost and performance risks

Scaling AI to tens of thousands of users required strict control over latency, token usage, and operational costs.

How we worked 

Based on our experience delivering enterprise-grade AI solutions for data-heavy platforms, we applied rigorous AI software engineering practices. 

Our collaboration included regular planning sessions, technical deep dives, validation reviews, and iterative testing cycles to ensure accuracy, performance, and compliance readiness. 

Technical solution

Tech stack: Amazon Bedrock, S3, Intelligent Document Processing (IDP), Lambda, Step Functions, ECS, RDS (PostgreSQL), Python, FastAPI, LangChain, LangGraph, LangFuse, PostgreSQL + PGVector

Context engineering from real user behavior 

Instead of relying on client documentation or assumptions, we applied a context engineering approach grounded in actual user behavior.

  • Analyzed 36,000 historical user query logs
  • Identified semantic patterns in how users formulated requests
  • Normalized and categorized queries by intent and user type
  • Built a few-shot examples directly from real user interactions

This data-driven context discovery became the foundation of the system’s accuracy and relevance.

Multi-agent context architecture

The solution was implemented as a multi-agent framework with a dedicated context manager as a first-class system component.

diagram showing context manager responsibilities and adaptive context formatting

This approach optimized token usage while maintaining answer quality. 

Intelligent query processing

  • Implemented query classification to route requests safely and accurately.
  • Translated natural language into validated queries.
  • Mapped human terms (e.g., “high priority”) to internal system codes.

Scalable result handling

  • Automatically adapted responses based on data volume.
  • Returned summaries, aggregations, or visual insights instead of overwhelming raw datasets.
  • Enabled charts, tables, and statistical views selected by an intelligent agent.

Performance and cost optimization

  • Reduced prompt size by over 80% through token-efficient prompt engineering.
  • Applied model selection strategies to balance speed, accuracy, and cost.
  • Introduced semantic caching for repeated and similar queries.
  • Achieved 2–3× faster response times at scale. 

Observability and compliance

  • Implemented full tracing across AI decision steps.
  • Enabled usage monitoring, audit logs, and explainability.
  • Designed the system to meet enterprise and EU-level compliance requirements, like the AI EU Act.

Get the latest tech insights delivered to your inbox!

Stay ahead in the tech world—hit subscribe now

    Thank you for joining Sombra Insights newsletter!

    Business value

    • Enabled natural language access to complex enterprise data for non-technical users
    • Significantly reduced time required to retrieve operational insights
    • Improved decision-making through instant summaries, analytics, and visualizations
    • Established a scalable, cost-controlled AI foundation for tens of thousands of daily users
    • Delivered a future-proof architecture aligned with modern AI regulatory requirements, including the EU AI Act

    Frequently asked questions

    How does the conversational AI system prevent hallucinations?

    Can non‑technical users access complex construction datasets?

    What types of data does the solution support?

    How does the architecture optimize performance and cost?

    Is the system compliant with the EU AI Act?

    Contact us

      Thank you for getting in touch!