Info Services

Preparing your experience

Tap anywhere to continue

AWS

Agents Need a Map, Not Just a Memory

Raghavan Madabusi·Nov 16, 2026

Why a governed semantic graph, not a bigger context window, is the next step toward AI agents you can trust, and how to build one

ontology

The day the agent was confidently wrong

Here is a scenario I have seen in some form at almost every company that deploys support agents. It is illustrative, not a reported incident.

A customer writes to a telecom provider: "My internet has been down since Tuesday. I want a credit." The support agent reads the email, pulls the three most similar passages from its knowledge base, and offers a $10 goodwill credit. The right answer was a full-month credit under the customer's business-fiber SLA.

story


Nothing malfunctioned. Retrieval found text that looked like the question. It could not follow a path from the customer to an account, a service address, a network node, a confirmed outage and a credit policy. Two accounts in the customer's name sat in the CRM, and the agent picked the consumer plan. The model was a frontier model with plenty of context. It just had no map.

Memory recalls. A map lets the agent act correctly.

Five layers, five questions

Each layer is a vendor-neutral standard, and each answers one question the agent cannot answer alone. Skip one and the gap it covers reopens.

stack


  • Connect (RDF + SPARQL): every fact stored as a triple with a global identifier, queryable in one language.
  • Mean (OWL + SKOS): classes, axioms and vocabularies, so "outage", "down" and "no service" mean one thing.
  • Assure (SHACL): shapes that check data before it is loaded or acted on.
  • Retrieve (GraphRAG): vector search to find text, graph traversal to follow the links.
  • Act (agents + MCP): planning and tool use that consult the same shared map.

Similarity finds text. Structure finds paths

The answer to that credit email is scattered across six feeds that were never designed to talk to each other, and most of them are unstructured: customer emails and chats, call-center transcripts, field-technician notes, network-ops alerts and status pages, plan and contract PDFs, and policy handbooks.

path


Vector search returns the passages that sound right. The graph returns the chain that is right. Four failure modes show the difference:

failures


Meaning versus quality: OWL and SHACL

RDF stores every fact as a subject, predicate, object triple. Global identifiers (IRIs) give entities a shared identity, so data from separate systems merges without schema migration. The ontology defines the classes and properties (the T-Box: Customer, Incident, Plan) while instances live in the A-Box (Customer 4471, Outage N7). OWL adds axioms a reasoner can use: a business-fiber plan is an SLA-covered service, and two identifiers can denote the same customer.

OWL assumes an open world: a missing fact is unknown, not false, so a reasoner infers new knowledge but never complains that data is absent. SHACL validates under a closed-world view: a shape states what a record must contain, and a missing incident link is a violation.

owl-shacl

Use OWL to derive meaning and SHACL to protect quality. OWL tells the agent what follows. SHACL tells it what is missing. You need both.

From messy feeds to trusted facts

Unstructured feeds become graph facts in four steps, and the gate in the middle is the one most teams skip.

gate


Constrain the extractor. Schema-free extraction turns one customer into "J. Rivera", "Jon Rivera" and "Rivera, Jonathan". Give the LLM the ontology's classes and canonical IDs and the output becomes something SHACL can check.

Three shapes I would ship first:

  1. Cited credit. A credit proposal links to at least one confirmed incident and one policy.
  2. Traceable fact. Every fact has a source and a timestamp, and confidence lies between 0 and 1.
  3. Within authority. The credit amount stays within the approving role's limit.

Teams that start with a large ontology often spend a quarter modeling before any agent benefits. Teams that start with shapes ship a gate in weeks and grow the ontology from the violations it catches.

GraphRAG: vectors find the text, graphs follow the links

Hybrid retrieval keeps vector search as the entry point and lets relationships do the rest.

hybrid

There are three common patterns:

  • Lexical graph (schema-free): an LLM extracts chunks, entities and relations from text. Fast start, but expect duplicates, free-text labels and noise.
  • Semantic graph (curated): a curated ontology plus governed data. Precise, auditable and reusable, at the cost of modeling effort.
  • Hybrid (recommended): vector search, then traversal, then ontology-limited expansion. Best coverage and precision, with more moving parts.

The evidence, stated once

evidence


  • Fluree (vendor-run): 5,000 questions across healthcare, finance and supply chain with GPT-4o. Hybrid beat either approach alone.
  • FalkorDB GraphRAG-Bench (vendor-run): 71.48 versus 55.39 overall, with the gains concentrated in multi-document, relational tasks. The vendor measured its own SDK against a public baseline.
  • Han et al. (academic): each approach has distinct strengths and there is no universal winner. This is the most neutral source, and it supports hybrid over graph-only.

The graph as the agent's shared brain

The graph is not a database next to the agent. It is shared infrastructure that every part of the loop consults. The planner (what to do), tool selection (which capability), memory (what is known) and guardrails (what is allowed) all need the same understanding of the world. Giving each its own vocabulary, usually inside a prompt, is how agents drift apart from the systems they act on. The graph plays six roles:

roled
MCP standardizes how an agent calls a tool. It does not standardize what the tool's words mean.

Building it on AWS

One implementation, in one sentence: DataZone names it, Neptune means it, OpenSearch finds it, Athena fetches it, AgentCore serves it.

aws


Map layer AWS service Design note
Connect Neptune Database; Athena federated query Authoritative SPARQL 1.1 store (RDF 1.1); relational data read in place
Mean Neptune + external reasoner No built-in OWL reasoner: use HermiT, ELK or RDFox, then materialize
Assure Lambda gate, SQS quarantine SHACL engine is your choice, for example pySHACL; AWS guidance names none
Retrieve OpenSearch Serverless; Neptune Analytics Vectors keyed to node IDs; Neptune Analytics is openCypher only, no SPARQL
Act Bedrock AgentCore, Guardrails Serve and MCP runtimes; guardrails on input and output

How the unstructured feeds get in

  • Emails, chats, social posts: land in S3 (batch) or Kinesis or MSK (live), then Bedrock extracts candidate triples.
  • Call recordings: Amazon Transcribe turns audio into text for extraction.
  • Plan, contract and policy PDFs: Textract or Bedrock Data Automation pulls out text, tables and clauses.
  • Network alerts and status feeds: EventBridge rules trigger Lambda to link incidents to nodes.
  • CRM and billing tables: stay in place, cataloged in DataZone and read through Athena.

Build path

build


Know the gaps

  • Neptune stores OWL ontologies, SKOS taxonomies and SHACL shapes, but inference runs externally or inferred triples are materialized before load (AWS Prescriptive Guidance, RDFox with Neptune).
  • Ontop-style virtual knowledge graph engines suit ECS on Fargate rather than Lambda.
  • AgentCore Gateway converts existing Lambda functions and APIs into MCP tools, while Runtime suits custom MCP server logic such as a graph-query service (MCP on AgentCore).

No single model should do every job

Use the cheapest model that clears the quality bar. These are candidates on Bedrock as of November 2026; confirm availability in your Region (Bedrock models).

Stage Class Bedrock options
Entity and event tagging Fast, low cost Claude Haiku 5.5; other providers' small models
Relations, entity resolution Balanced Claude Sonnet 5.5; other providers' mid-tier models
Ontology induction, hard queries Frontier Claude Opus 5.5; other providers' frontier models
Bulk extraction Open weight gpt-oss-120b; Qwen3 235B A22B 2507
Embeddings Embedding Cohere Embed v4 or Nova Multimodal Embeddings; test recall

Mix providers deliberately. A cross-model verifier, where one family extracts and another checks, reduces correlated errors and avoids lock-in. OpenAI models on Bedrock support several API styles including Converse, so one agent code path can call both providers (API compatibility).

Serve runtime on AgentCore: tiered model routing

router


Which path should you take?

Situation Recommendation
Documents in S3, simple Q&A, want managed Bedrock Knowledge Bases GraphRAG: S3 only, 1,000 files per source by default, raisable to 10,000 (docs)
Several sources, rules, audit, SPARQL and SHACL needed Curated ontology on Neptune Database with the custom path
Existing relational estate, avoid ETL Virtual knowledge graph with R2RML mappings
Single-document lookup, no relationships Do not use a graph; vector RAG or plain search is enough
Pure optimization with stable constraints Keep the solver; add the graph only for context and explanation

References

  1. AWS Database Blog: Build a semantic ontology to power AI assistants on AWS, Part 1
  2. W3C OWL 2 Overview
  3. W3C OWL 2 Profiles
  4. W3C SHACL
  5. W3C R2RML
  6. Fluree LLM accuracy benchmark (vendor-run)
  7. FalkorDB GraphRAG accuracy benchmark (vendor-run)
  8. Han et al., RAG vs GraphRAG (arXiv 2502.11371)
  9. Amazon Bedrock model cards
  10. Bedrock Knowledge Bases GraphRAG
  11. Bedrock API compatibility
  12. RDFox with Amazon Neptune
  13. AgentCore Runtime MCP
  14. MCP deployment on AgentCore
GET IN TOUCH

Start a Conversation that Drive Impact

Ready to accelerate your digital transformation? Our experts are here to help you navigate the future

Global Hubs

New Jersey
Austin
San Jose
Hyderabad