Skip to contentSkip to main content
← Back to all posts

How to Build an AI Knowledge Graph From Markdown Without Losing Source Context

Build a practical Markdown knowledge graph for AI with stable entity identities, typed relationships, source evidence, and a 30-minute validation exercise.

Share by email

Search can find a note about a supplier. A knowledge graph can help you discover that the supplier supports a dependency, that the dependency is governed by a decision, and that the decision rests on an agreement due for renewal. Those connections are useful when they lead you to evidence you would otherwise overlook.

But a graph with thousands of automatically generated edges is not necessarily a better knowledge base. If an AI assistant interprets a similarity link as proof of a contractual dependency, the graph can make a wrong answer look more authoritative.

An AI knowledge graph built from Markdown should keep the underlying notes readable and portable, distinguish different kinds of relationships, and let a reader inspect the evidence behind important connections. Start with a small operational question rather than trying to model everything you know.

Start with a question, not a visualization

Imagine a fictional software team evaluating whether it can retire an external reporting integration. Its knowledge is scattered across six notes: an integration overview, a customer commitment, a supplier agreement, an architecture decision, a migration plan, and a test report.

A keyword search for the integration might find the overview and migration plan. A useful graph should also lead to the customer commitment even if that note uses a different product name. More importantly, it should distinguish a customer obligation from a suggested implementation alternative.

Write the questions the graph needs to support before choosing its structure:

  • Which commitments would be affected if the integration disappeared?
  • What accepted decision governs the replacement?
  • Which source establishes each dependency, and is that source current?
  • What related material should the team examine before making a new decision?

These questions define a manageable first graph. They also provide a way to test whether connecting the notes produces practical value.

Separate six kinds of relationships

A relationship is not simply a line between two nodes. Its meaning determines what an AI assistant may safely conclude.

RelationshipExampleAppropriate interpretation
ExplicitAn author links a migration plan to a decisionThe author intentionally connected the notes
SemanticTwo documents discuss similar export formatsPotentially relevant context to inspect
EvidenceA contract clause supports a commitmentInspect the source before relying on the claim
DecisionAn accepted decision supersedes anotherFollow the recorded decision history
TemporalA policy revision follows an earlier versionCompare dates and applicability
DerivedAn analysis suggests two entities are relatedA candidate connection that may need review

The exact relationship names and storage conventions depend on your tools. The important distinction is between a human-authored link, a retrieved similarity, and an assertion backed by evidence.

A semantic match can be valuable for discovery even when it is not strong enough to support a decision. Keeping those categories separate lets you retain useful suggestions without elevating every suggestion into durable fact.

Give important entities a stable identity

Two files named “Migration Plan” might refer to different services. A vendor might change its display name while its agreement remains the same. If the graph treats titles as identities, both situations can create misleading connections.

Use stable identifiers for important entities and record the relevant scope. A lightweight Markdown convention is enough for the first experiment.

Here is an illustrative note format, not a required Phasoric import schema:

---
id: integration-reporting
kind: integration
project: customer-reporting
status: active
owner: platform-team
---

# Reporting integration

## Confirmed dependencies
- Customer commitment C-014: monthly export
- Supplier agreement A-007: reporting API access

## Governing decision
- ADR-021: retain until replacement passes validation

## Evidence
- agreements/A-007.md, section 4
- commitments/C-014.md, acceptance criteria

## Open question
Does the replacement satisfy the export requirement?

## Related
- [[migration-plan]]
- [[replacement-test-report]]

A separate note for each agreement, commitment, and decision makes it possible to update one without rewriting the entire integration description. Use filenames or IDs that remain unambiguous within the selected workspace. Avoid putting credentials, private tokens, or unnecessary personal data into graph metadata.

You can start with ordinary Markdown links if your tools do not understand WikiLinks. The records should remain useful even when a graph viewer is unavailable.

Distinguish evidence from discovery in Phasoric

Phasoric's knowledge workspace uses portable Markdown as the canonical knowledge layer. Its typed relationship projection distinguishes explicit, semantic, evidence, decision, temporal, and derived connections. Graph views can filter relationship classes, while relationship explanations can surface contributing evidence and similarity factors.

That makes it possible to investigate why two notes are related without assuming their relationship establishes an accepted fact. For example, two migration documents can be semantically similar because they describe the same technical pattern. They might still apply to separate customer environments.

Phasoric's Semantic Blueprints provide versioned note structures and portable semantic entity links. You can use structured notes when the same kind of record recurs across projects, while keeping narrative observations in ordinary Markdown. Strata provides a distinct place for confirmed decisions and supporting evidence. A graph relationship does not itself confirm a decision.

For a deeper explanation of evidence quality, read AI Knowledge Provenance: Why Answers Need Evidence. For the decision records behind engineering changes, see How to Preserve Architecture Decisions Across AI Sessions.

Use the graph from an authorized AI assistant

An AI assistant should be able to retrieve related knowledge without treating the entire graph as a universal permission grant.

Phasoric's MCP developer documentation describes relationship discovery and explanation operations. On an appropriately configured hosted mapping and authorized Context Scope, the assistant can use the available intelligence capabilities, request related resources with find_related, and inspect a returned relationship with get_relationship_explanation. Use identifiers actually returned by the tools and follow the current tool schemas.

A hosted assistant can only access the intelligence available through its authorized scope and persisted projections. Local-only relationships are not automatically uploaded or exposed. An empty or partial response therefore needs to be interpreted in light of the available coverage.

Try this instruction with a compatible assistant after establishing access:

Find relationships relevant to retiring our reporting
integration within the authorized project scope.

Group the results into explicit links, evidence-backed
relationships, recorded decisions and discovery candidates.

For each proposed impact, identify the supporting source
and explain what it actually establishes. Mark missing
evidence and ambiguous entity identities as open questions.

Do not change notes or confirm decisions.

The result should be a research path, not an authorization to retire the integration.

Build and test your first graph in 30 minutes

Spend the first ten minutes selecting a real, bounded question and collecting five to ten related notes. Include at least one accepted decision, a primary evidence document, and an unresolved question. Create meaningful explicit links where the connection is known.

Use the next ten minutes to inspect suggested relationships and compare them against source material. Retain potentially useful discovery candidates, but record uncertainty. If a candidate is inaccurate, dismiss or correct it using the available review controls rather than rewriting unrelated notes to make a similarity score improve.

Use the final ten minutes to run four checks:

  1. Identity: Introduce two notes with similar titles in the test collection. Verify that the answer distinguishes their paths or stable identities.
  2. Meaning: Ask whether a semantic neighbor establishes a dependency. The answer should require separate evidence.
  3. Freshness: Change a test note and inspect whether the affected relationship is reconsidered after the relevant index updates.
  4. Authority: Ask an assistant scoped to a different test collection for restricted evidence. It should not return that material. A missing relationship is not grounds for broadening its access automatically.

Keep a record of failed checks. Add more sources only once the small graph answers the original operational question reliably.

Frequently asked questions

Do I need a separate graph database?

Not for a small Markdown-based knowledge workspace. A relationship index can be a reconstructable projection of notes, links, and supporting records. A dedicated graph database may make sense for larger workloads or specialized traversal requirements, but it is not a prerequisite for useful connected knowledge.

Are embeddings enough to construct a trustworthy knowledge graph?

Embeddings help identify related material. They do not establish that one entity depends on another, that a contract remains in force, or that a person approved a decision. Those claims need appropriate source evidence and review.

Can my external AI assistant access every relationship in my local vault?

Only if an applicable integration actually exposes that relationship under the current authorization. Phasoric distinguishes local intelligence from authorized hosted projections. Check the available capabilities and scope rather than assuming that connecting an assistant exposes everything.

Make the graph earn its place

Start by connecting knowledge around one consequential question. Keep the original notes, make relationship meaning visible, preserve the sources, and use similarity for exploration rather than proof.

Then repeat the process for another question. Over time, your Markdown collection becomes more useful not because it contains more edges, but because the connections help people and AI assistants find the right evidence and make better-informed decisions.

Frequently asked questions

Do I need a separate graph database?

Not for a small Markdown workspace. A relationship index can be reconstructed from notes and supporting records. Specialized graph databases may suit larger workloads.

Are embeddings enough to construct a trustworthy knowledge graph?

Embeddings help discover related material. Dependencies, obligations and decisions require appropriate source evidence and review.

Can my external AI assistant access every relationship in my local vault?

Only relationships exposed by the applicable integration within its current authorization. Local-only Phasoric intelligence is not automatically exposed through hosted MCP.