# Build a Knowledge Layer: Turn Your Existing Data into Context

> Source: <https://neo4j.com/blog/graph-database/build-a-knowledge-layer-turn-your-existing-data-into-context/>
> Published: 2026-11-10 14:00:00+00:00

# Build a Knowledge Layer: Turn Your Existing Data into Context

4 min read

**In this series**

[1. Give Your AI Agents the Shared Context to Succeed](https://neo4j.com/blog/agentic-ai/build-a-knowledge-layer-give-your-ai-agents-the-shared-context-to-succeed/)

[2. Map Your Data with an Ontology](https://neo4j.com/blog/graph-database/build-a-knowledge-layer-map-your-data-with-an-ontology/)

**3. Turn Your Existing Data into Context**

[4. Connect Your Data Sources with a Composite Database](https://neo4j.com/blog/graph-database/build-a-knowledge-layer-connect-your-data-sources-with-a-composite-database/)

[5. Ground Decisions in Precedent](https://neo4j.com/blog/graph-database/build-a-knowledge-layer-ground-decisions-in-precedent/)

Code: [knowledge-layer-demo on GitHub](https://github.com/neo4j-product-examples/knowledge-layer-demo)

### How can AI agents make decisions you can trust?

AI agents need to understand your business to make decisions you can trust. A knowledge graph gives them that understanding by mapping how customers, accounts, loans, and documents relate, letting an agent answer hard questions and catch what a table would miss.

When your data is terabytes of tables and hundreds of documents, turning all that information into a working knowledge graph can feel out of reach. First, the data has to be copied, modeled, and extracted through complex pipelines, and then you have to maintain that new infrastructure.

But getting to a working knowledge graph can be simple. Two new products help you get started:

- [Virtual Graph](https://neo4j.com/product/virtual-graph/) : Build graphs from your warehouse data, without copying data or requiring data migration.
- [Document Intelligence](https://neo4j.com/docs/aura/document-intelligence/introduction/) : Turn your existing documents, including plain text files, PDFs and Microsoft Word files, without writing a single line of code.

The [demo below](https://github.com/neo4j-product-examples/knowledge-layer-demo) shows how modeling Rosa’s business plan and the bank’s Databricks records as a graph helps an AI agent make a loan decision.

### How can you turn unstructured text documents into a knowledge graph?

Document Intelligence allows you to turn unstructured text documents into a graph without extracting anything by hand. Without structure, an agent can only search a document by similarity and hope the right passage comes back. As a graph, it can ask exact questions, like who owns the business and how much they’re asking for, and get exact answers.

Rosa’s business plan landed in Document Intelligence as a short markdown document. It names the owners (Rosa Alvarez with 70% and Marcus Alvarez with 30%), gives the EIN and address, and asks for $400,000, with a table of uses and a repayment argument. Document Intelligence reads it and extracts a graph of people, organizations, and the loan request.

Start by uploading the document and writing a prompt to guide extraction:

Additional prompts can be fed to the AI to further refine the graph model, and Document Intelligence creates a preview of the finished graph to explore:

### How can you turn warehouse data into a knowledge graph?

Virtual Graph lets you build knowledge graphs from your warehouse data without copying it or migrating anything. It creates a graph model on top of the tables you already have, and translates your Cypher queries into SQL that runs in the warehouse. The data never leaves the warehouse, so only your query goes in, and only its results come back out.

Nordtell Bank keeps its customer data in 12 Databricks warehouse tables covering customers, accounts, transactions, credit scores, loan facilities, and more. Much of that data is sensitive and cannot move. To make a decision on Rosa’s business loan, our AI agent needs a knowledge graph that shows which accounts belong to a customer, which transactions sit in them, and which loans are still current, so it can reason about her full banking relationship before it recommends an approval.

Creating your first knowledge graph is simple.

First, you need to decide how to model those tables as a graph, and there are three ways to do it:

1. Define the model manually
2. Generate it from the database schema
3. Create it with AI from our table metadata

You can start with AI, then refine the result with the point-and-click editor:

After some quick tweaks, the final data model is as follows:

You get two knowledge graphs of connected context that an AI agent can reason over, rather than rows in isolated tables or whole documents to read end to end. Document Intelligence builds one from Rosa’s business plan with no code, and Virtual Graph builds the other over the bank’s Databricks tables without copying them. The next post connects them so an agent can review her $400,000 loan request.

### Next steps

Want to go deeper on either piece?

- For Document Intelligence, start with the [launch post](https://neo4j.com/blog/genai/introducing-document-intelligence-from-documents-to-a-knowledge-graph-right-inside-aura/) , then see how it[finds beneficial owners in a pile of KYC documents](https://neo4j.com/blog/graph-database/finding-the-ultimate-beneficial-owner-in-a-pile-of-kyc-documents-with-document-intelligence/) .
- For Virtual Graph, read the [launch post](https://neo4j.com/blog/graph-database/introducing-neo4j-virtual-graph-graph-reasoning-on-the-data-you-already-have/) , the docs on the[three ways to build a graph model](https://neo4j.com/docs/virtual-graph/aura/models/) , and the post on[pairing graph with the lakehouse](https://neo4j.com/blog/developer/graph-and-lakehouse-friends-at-last/) .

If you are just joining us

- Start with [Give Your AI Agents the Shared Context to Succeed](https://neo4j.com/blog/agentic-ai/build-a-knowledge-layer-give-your-ai-agents-the-shared-context-to-succeed/) , which explains why agents need a knowledge layer.
- Next, [Connect Your Data Sources with a Composite Database](https://neo4j.com/blog/graph-database/build-a-knowledge-layer-connect-your-data-sources-with-a-composite-database/) shows how we query both through one connection and link Rosa’s Bakery in the bank’s data to Rosa’s Bakery in her business plan.

## Also reported by

- neo4j.com: Build a Knowledge Layer: Connect Your Data Sources with a Composite Database <https://neo4j.com/blog/graph-database/build-a-knowledge-layer-connect-your-data-sources-with-a-composite-database/>
- neo4j.com: Build a Knowledge Layer: Ground Decisions in Precedent <https://neo4j.com/blog/agentic-ai/build-a-knowledge-layer-ground-decisions-in-precedent/>
