Ask a question Share knowledge Edit the page
Semantic chunking and ontology-based RAG (GraphRAG)
|
This is the cutting edge of generative AI research (R&D). There are no ready-made, simple standards here: the industry is only moving from classical vector bases to hybrid systems that combine vector search with knowledge graphs. Approaches like Microsoft GraphRAG or ontology engines are just beginning to standardize. |
When companies launch classic vector RAG, they quickly stumble into a technological dead end. The model is great at spotting facts (“What is the daily allowance for a business trip to Paris?”), but fails entirely on questions requiring multiple document comparisons or an understanding of the complex structure of the company (“What services would suffer if we turned off the database of billing, and who is responsible for them?”).
The reason for this failure lies in the fundamental limitation of flat vector representation and naive text slicing.
Why flat vector search breaks down on complex data
-
Mechanical slicing (Naive Chunking): Most systems cut documents into fixed-sized bunks (e.g., 500 characters with a swipe), and as a result, an important parameter table is torn in the middle, the logical condition is separated from its context, and the file name or partition name is lost, the AI gets a piece of text "…this parameter is 5," but does not know which product or version it refers to.
-
Semantic blindness of vectors: Vector embeddings measure the “similarities” of words in meaning, but they don’t understand the exact logical relationships. For the vector, the phrases “Service A depends on Service B” and “Service B depends on Service A” will be almost identical in proximity, although the system logic in them is strictly opposite.
-
Multi-hop reasoning (Multi-hop reasoning): To answer a difficult question, you need to link facts from different sources: a document.
XreferencingY`document `Zdescribes the vulnerability in `Y`A flat search will find or only `X`or only `Z`And AI can’t build a logical chain.
Evolutionary Solution #1: Content-Aware Chunking
Instead of stupidly slicing the number of characters, leading companies are moving to semantic partitioning with the preservation of the hierarchy:
-
Syntax Breakdown (Structural Parsing): Parsers analyze headers (H1, H2, H3), lists, paragraphs, tables and code blocks (AST trees). Chunk never cuts in the middle of a sentence or logical block.
-
Context Injection (Context Injection): At the beginning of each extracted chank, the AI automatically adds a meta context.
[Document: API Specification] → [Section: Authorization] → [Version: 2.1] → Chunk text…This ensures that when searching for AI, it always knows the provenance and applicability of each fragment.
Evolutionary Solution #2: Ontological RAG and GraphRAG
The most powerful response to vector constraints was to combine language models with the The Graphs of Knowledge (Knowledge Graphs)This approach is called GraphRAG or Ontology-Based RAG.
Instead of storing documents as a disparate set of text membranes, the system builds a structured graph where:
-
Nodes (Nodes) These are specific entities of the company (Projects, Services, People, Solutions, API Versions, Documents).
-
Ribs (Edges) These are strictly typed, verified links between them.
depends_on,owned_by,implements,outdated_because_of,documents). -
Ontology (Ontology) A strict subset of rules and classes (vocabulary) describing the structure of a business (for example, how it is done in a business). ThinkWork or AXKH from TecAce).
How does hybrid search work in GraphRAG?
-
The user asks the question: “Which kernel modules will the update of the authorization library affect?”
-
Planner addresses the graph and finds a node
Authorization Library. -
Through Graph Traversal, the system instantly and with 100% accuracy retrieves all the associated nodes: the services that use it, the commands that own them, and the documentation for these services.
-
The LLM model receives input not just similar texts, but semantic map It synthesizes a perfectly accurate, verifiable answer with precise tracing.
Useful materials and references
-
Building AXKH on Ontology-Based RAG TecAce’s case study of turning 12,000 disparate corporate documents into a living knowledge graph based on on ontological RAG to answer complex logical questions.
-
ThinkWork: Memory Graph Concepts ThinkWork’s technical concept of a two-tier knowledge graph: a basic page graph and managed business ontology for the precise operation of AI agents.
-
Knowledge Graphs Meet LLMs: Structured RAG Architectures Elaine Zimmermann’s detailed analysis of the synergy of the structural rigor of knowledge graphs and the synthesizing ability of LLM to combat hallucinations.
-
KGRAG (Knowledge Graph RAG) on GitHub Open source orchestrator of structural knowledge graphs, designed to ground AI in rigorous facts instead of inaccurate vector search.
-
Knowledge Representation for RAG Systems: Data Prep Guide NextPage’s guide to data preparation, combining semantic search with taxonomies, ontologies, and access role tags.
-
HyGRAG: A Unified Framework for Relation-Aware Graph RAG - a scientific article on arXiv (2026), describing a hierarchical hybrid graph framework for two-level knowledge extraction (at the level of textual chunks and logical entities).
-
Finding What Matters: Anchoring Context Knowledge with Evolving Indices - study of the KAIR algorithm (2026), dynamically building an evolving index of connections in the context of AI to improve the accuracy of reasoning in RAG.