DEV Community

Cover image for Is Chunking Finally Solved? How Blockify Has My Attention
Kunal
Kunal

Posted on

Is Chunking Finally Solved? How Blockify Has My Attention

I have already written two blogs where I covered RAG in detail and discussed some of the problems we still face while building RAG pipelines.

Before starting this one I would recommend going through those two blogs first so you have some context about what I am going to discuss here

Previous blogs

  1. Beyond RAG: The Evolution of AI Knowledge & Memory

  2. Where RAG Fails: Understanding Its Limitations

Recently I came across Blockify by Iternal Technologies and found its approach quite interesting. It tries to solve some of the common problems we face with traditional chunking in RAG pipelines.

So I thought of exploring it and understanding what they are doing differently and whether this approach can improve the way we build RAG systems.

What we are going to cover

  1. What is RAG
  2. What are chunks vectors and embeddings
  3. Problems with traditional RAG
    • Upstream problems
    • Downstream problems
  4. How traditional chunking creates problems
  5. What is Blockify
  6. What are IdeaBlocks
  7. How IdeaBlocks approach knowledge representation

Blockify GitHub Repository: https://github.com/iternal-technologies-partners/blockify-agentic-data-optimization


So what is RAG?

Think of RAG like an open-book exam. You are a student and you are allowed to use a book during the exam. What would you do? You would probably check the index first, find the relevant topic, go through that part and then write your answer. This saves time and helps you find the relevant information.

RAG works in a similar way. Instead of asking an LLM to answer everything from its existing knowledge, we give it access to our own documents.

It basically has two parts

1. Indexing

First we upload our documents like PDFs websites or text files. The system breaks them into smaller parts called chunks. Then it converts these chunks into vectors which are basically numerical representations of the text. These vectors are stored in a vector database.

2. Retrieval and Generation

Now when a user asks a question about the uploaded document the system searches the vector database using semantic search. This means it tries to find information based on the meaning of the question rather than just matching exact words.

Once it finds the relevant chunks it passes them along with the user's original question to the LLM.

The LLM uses that context to generate an answer and that's how we get our response.

rag


Problems with traditional RAG

Let's understand this with a real-world example.

Imagine you are working on a company project where HR has uploaded the company's leave policy documents. Employees can ask questions and get answers directly from those documents.

Now imagine HR accidentally uploads two documents. One is the old leave policy and the other is the new one.

An intern asks how many leaves employees are allowed. The system retrieves information from the old document and gives the wrong answer.

Now the question is who is responsible here? Is the AI wrong? Probably not. The actual problem might be how we process and store the documents.

Let's understand some of these problems.

1. No standard way of chunking

Chunking means breaking a large document into smaller parts. But how do we decide where to split it? There is no universal approach that works for every document.

For example, imagine a paragraph says:

problem rag

"Employees are allowed 18 leaves in a year. Employees who are still in their probation period are allowed only 6 leaves."

Now imagine the splitter breaks this paragraph into two chunks. The first chunk contains the 18 leaves information, while the second contains the probation details.

When someone asks about leaves during probation, the retrieved chunk might not contain the complete information.

And this is one of the common problems with traditional RAG.

2. Document Versioning

Now imagine a big company where HR keeps updating its leave policies. There are multiple versions of almost the same document, such as old versions, new versions and drafts.

If we upload all these documents into a traditional RAG pipeline, the retrieval system will search for the top K relevant chunks. It might retrieve information from both current and outdated documents.

Now the LLM gets mixed information from different versions and might generate an incorrect answer.

Document Versioning

3. Access Control

Another problem is access control.

Think about a company where interns are not allowed to access confidential HR documents, but managers can access them.

Traditional RAG does not automatically understand these permissions just because we upload the documents. We have to manage role-based access and document permissions separately through the application or orchestration layer.

This makes things harder to maintain because the content and its access rules are managed separately.

Access Control

4. Upstream vs Downstream Problems

Think of it like a river. Upstream is where the river starts, and downstream is everything that comes after it.

Now imagine the water is already polluted at the starting point. No matter how much filtration you do downstream, you cannot completely fix the problem if the source itself is bad.

RAG works in a similar way.

In RAG, document processing and chunking happen upstream, while retrieval, re-ranking and prompt tuning happen downstream.

So if our documents are not properly processed or the chunks are poorly created, no amount of re-ranking or prompt tuning can completely fix the problem.

Upstream vs Downstream Problems

The idea is simple: if the problem starts upstream, fixing things downstream will not solve it completely.


So how does Blockify solve these problems?

The idea behind Blockify is simple. Instead of breaking documents into chunks and storing them as vectors, it stores small, verified pieces of knowledge called IdeaBlocks.

Each IdeaBlock contains three things:

  1. Question: What information are we trying to store?
  2. Verified Answer: The actual answer to that question.
  3. Labels: Who can access it, which version it belongs to and where it came from.

There are three simple rules:

  • One block should contain only one fact.
  • The answer should be short, ideally two or three sentences.
  • Every block should have proper labels.

Let's understand this with our HR leave policy example.

Imagine HR uploads a leave policy that contains information about paid leaves, probation leaves and carry-forward leaves. Instead of storing the entire paragraph as chunks, Blockify represents each piece of information separately.

Question Verified Answer Source Version Clearance
How many paid leaves does a confirmed employee get? 18 paid leaves per year Leave Policy Current Internal
How many leaves does an employee get during probation? 6 leaves Leave Policy Current Internal
How many unused leaves can be carried forward? Up to 10 days with manager approval Leave Policy Current Internal
How many leaves did employees get during probation under the old policy? 15 leaves Leave Policy Deprecated Internal

Now when an intern asks how many leaves they get during probation, the system matches the question with the relevant IdeaBlock and checks its labels.

Since the old policy is marked as deprecated, the system uses the current version and returns the correct answer: 6 leaves.

The main difference is that instead of retrieving a large paragraph containing multiple facts, we retrieve a small, verified piece of information that represents one specific claim.

IdeaBlock

What happens when we upload multiple documents?

You might be thinking, what if I upload 60–70 PDF files containing thousands of facts? Won't creating an IdeaBlock for every fact consume too much storage?

Not necessarily. The main idea is not to convert every line into an IdeaBlock. Blockify focuses on extracting meaningful facts and removing duplicate information.

Let's understand this with our leave policy example.

Imagine four documents contain the same information: probation employees get 6 leaves. Traditional RAG might retrieve all four copies in its top-K results. It might also retrieve an outdated policy mentioning 15 leaves. Now the LLM has conflicting information.

solution

Blockify uses its deduplication process to identify similar IdeaBlocks and merge duplicate information. So instead of retrieving the same fact multiple times, it can retrieve distinct information such as:

  • Probation employees get 6 leaves.
  • Confirmed employees get 18 leaves.
  • Maximum 10 leaves can be carried forward.
  • Manager approval is required.

This way, the top-K results contain more useful information instead of repeated copies.

Also, not every document necessarily produces IdeaBlocks. If the content does not contain useful information that can be extracted as a knowledge block, it may not produce one.

However, this does not mean Blockify solves every RAG problem. Embedding quality, retrieval accuracy and handling content that does not contain clear facts are still important challenges to consider.


How does Blockify work?

Blockify follows a seven-stage process to convert documents into structured knowledge.

  1. Scoping: First, we define the hierarchy, such as organization, business unit, product and persona. This helps identify which information belongs where and who will use it.

  2. Ingestion: Upload the documents we want to process.

  3. Chunking: The system processes the documents and generates question-answer pairs called IdeaBlocks.

  4. Deduplication: It identifies similar IdeaBlocks and merges duplicate information to avoid storing the same facts multiple times.

  5. Auto-tagging: AI adds labels to each block, such as its source, category and other relevant metadata.

  6. Validation: A human expert reviews the generated IdeaBlocks to check whether the information is correct.

  7. Export to Vector DB: Once validated, the IdeaBlocks are exported to the vector database and become ready for retrieval.

How does Blockify work

In simple words: We upload documents, Blockify understands their content, creates question-answer blocks, removes duplicates, adds labels, gets them validated and finally stores them in the vector database for querying.


Benefits at the Application Layer

There are a few interesting benefits of using IdeaBlocks at the application layer.

1. Simpler Queries

Since both the user's query and the stored IdeaBlocks are in a question-answer format, semantic search becomes more straightforward. We don't have to spend as much time tuning how questions match large document chunks.

2. Access Control Inside the Data

Access permissions are attached to the IdeaBlocks themselves. For example, a sales engineer and a legal reviewer can search the same knowledge base but access different information based on their permissions.

This reduces the need to manage every access rule separately through an additional orchestration layer.

My Take

I think Blockify is an interesting approach, especially when it comes to improving traditional chunking and retrieval.

However, I still have some questions:

  • What happens when a document doesn't contain clear facts? How does Blockify handle opinions, explanations and long-form content?
  • How reliable are the generated question-answer pairs?
  • How does it handle conflicting information across different document versions?

These are some things I would like to explore further before deciding how effective this approach is in real-world RAG applications.


Thanks for reading ! if enjoyed this blog , you can read more on this 👇

Top comments (0)