Skip to content

Blog

I'm in the process of re-uploading my old blog posts one by one.Apologies for any disruptions along the way.

Side quests in life with an audience of one

sidequests
From my visit to Spadefoot Nursery back in my plant lady era.

Summer 2025 has, so far, been a season of deep personal growth, self-reflection, and realignment. In one self reflection exercise, I realized that one marker of success I want for myself, as I grow older, is to have lived a life rich in side quests. Not just the main storyline of career goals, family milestones, or community contributions, but the enriching detours along the way.

I started to think of what I could do to make this happen. What are the experiences I want to pursue purely for myself that are not tied to work, education, community service, or family roles? What are experiences that are targeted at an audience of one, just me? Not goals that are measured by SMART objectives or OKRs, or even by the value they bring to my community (though that would be a lovely bonus), but goals that exist simply because they bring me joy.

I’ve always seen myself as a multi-passionate person. But for a few years after undergrad graduation, I was in a phase where I believed anything that didn’t directly align with my ultimate career ambitions, need to be trimmed out. I lost many of my hobbies in this time. And with the few I kept, I often felt guilty for enjoying them.

"I could be practicing for interviews", I’d think.

"There are experiments I still need to define and run", I’d remind myself.

But I also realized that even when my career is my biggest priority, I am a better computer scientist when I also make time to tend to my plants. I come up with better ideas when I also make time to listen to some jazz. I’m a better friend when I also make time to escape into a book. I show up more present in my social circles when I’ve also made time to write a short story or a blog post. I am a better person in important domains of my life, when I am recharged by my side quests.

So, no matter what the big goal is, I’m learning that these small, joy-filled pursuits in life matter. They make me more creative, more grounded, more me. Without doubt, I show up best in life when I show up most as myself.

If side quests aren’t part of your life at the moment, I invite you to imagine what they might look like. I think a life rich in side quests would look good on you too.

Love,

Enfa

Chunking in LLMs

If you're reading this, you already know what LLMs are. You’ve likely worked with them, noticed chunking in a pipeline, looked it up, and landed here. So, we’ll skip the usual introductions and dive straight into chunking.

What Problem Does Chunking Solve?

One of the limitations when working with LLMs is that the maximum number of tokens it can process in a single input - also known as context window size , is limited. For example, GPT-4 has a context window size of 8192 tokens, but GPT-4o's context window size is significantly larger at 128k tokens.

Context window size matters because it determines how much information a model can retain and process at once. The larger the window, the more context the model has access to, leading to better responses and improved performance on long-form tasks.

If context window size is limited, how do we work with applications that need longer context sizes? We employ a simple and effective strategy called Chunking.

What is Chunking?

Chunking is the process of breaking large bodies of text into smaller, more manageable pieces called chunks. These chunks serve as fundamental units of information that an LLM can process more efficiently. Instead of feeding the model an overwhelming amount of text, chunking ensures that each piece remains digestible, relevant, and easy to retrieve when needed.

Why is Chunking Useful?

Chunking isn’t just a workaround for token limits, it actually improves how LLMs process, retrieve, and generate information. Here’s why it matters:

  • Works Around Context Window Limits – If your input is too long for an LLM to handle at once, chunking ensures the text is broken down into pieces that fit within the model’s constraints.

  • More Accurate Responses – In Retrieval-Augmented Generation (RAG) systems, semantically meaningful chunks make it easier for retrieval models to pinpoint the most relevant information. Instead of sifting through an entire document, the model focuses on smaller, more precise sections—leading to sharper, more context-aware responses.

  • Faster Processing & Retrieval – Smaller, well-structured chunks allow both LLMs and search systems to process and retrieve information faster. Instead of dealing with bloated, unwieldy inputs, models work with concise, optimized text segments, reducing processing time and improving efficiency.

Why do you need strategies for Chunking?

Chunking is only effective if done correctly. Poor chunking can reduce retrieval accuracy and degrade application performance.

For example, if you chunk text using a fixed size without considering context, you might end up splitting sentences or breaking apart related information. This leads to fragmented understanding, making it harder for retrieval systems to return meaningful results. Instead of getting complete, relevant answers, you’ll end up with incomplete or disjointed chunks, which defeats the purpose.

For maximizing the performance,efficiency, and reliability of LLMs, particularly in applications involving large datasets and complex information retrieval tasks, effective chunking strategies are needed.

Common Strategies for Chunking

I share below some of the many common strategies for chunking.

1. Fixed-Size Chunking

Fixed-size chunking, the one we spoke about in our example, involves partitioning text into evenly-sized chunks of a predetermined length, which is typically defined by a fixed number of characters, words, or, most commonly in the context of LLMs, tokens .

Advantages:

  • Easy to implement : Requires no complex linguistic analysis.
  • Uniform chunk sizes : Simplifies storage and retrieval.

Disadvantages:

  • Can split sentences or semantic units : This can lead to loss of meaning and make retrieval less effective.
  • Ignores text structure : Since it doesn’t adapt to natural breaks (like sentences or paragraphs), it can disrupt coherence.

One way to partially counteract the loss of semantic coherence is by using chunk overlap. This means that a certain number of tokens (or characters) from the end of one chunk are repeated at the beginning of the next. While this doesn’t fully solve the issue, it helps maintain context across chunks.

Since finding the optimal chunk size depends on balancing context preservation with LLM constraints, some experimentation is usually required to get it right.

2. Recursive Chunking

Recursive chunking systematically breaks down text in a hierarchical manner, continuously splitting it into smaller chunks until each piece reaches an optimal size for processing. This method is particularly useful for structured documents, where a logical chunking strategy could involve splitting the text first by headings, then by subsections, then paragraphs, and so on.

Advantages:

  • Structural Integrity: Maintains the natural organization of the document, ensuring a logical flow of information.

  • Scalability: Ideal for processing large, complex documents, as it breaks them down into manageable units without losing context.

Disadvantages:

  • Complex Implementation: Requires an understanding of the document's structural markers, which can vary across different texts.

  • Potential Overhead: Multiple recursive operations may increase computational time and resource usage.

3. Agentic Chunking

As the name suggests, agentic chunking, uses LLMs to perform the chunking. Rather than splitting the text based on a fixed parameter, LLMs are prompted to analyse the content to find semantically meaningful boundaries like topic transitions.

Advantages:

  • Enhanced Semantic Coherence: By identifying and preserving natural topic boundaries as identified by the LLM, agentic chunking ensures that each segment maintains its contextual integrity, leading to more coherent and relevant outputs.

  • Real-Time Adaptability: Agentic chunking can dynamically respond to changing user needs, adjusting the segmentation based on real-time interactions and feedback.

Disadvantages:

  • Resource Intensive: The process may demand significant computational resources, potentially affecting efficiency compared to simpler chunking methods.

  • Additional Training and Tuning: Effective implementation may require further training and fine-tuning of the LLM to accurately identify semantic boundaries, adding to the development effort.

Factors Influencing the Choice of a Chunking Strategy

Choosing a chunking strategy depends on several factors, including:

  • Text Structure – Long documents (books, reports) may need hierarchical chunking, while shorter content (tweets, posts) works with simpler methods.
  • Language Model Constraints– Consider the model’s context window and optimal chunk sizes for best performance.
  • Query Complexity – Simple queries work well with smaller chunks, while complex queries may need larger ones for context retention.
  • RAG Considerations – If using retrieval-augmented generation, how are the retrieved components used?
  • Computational Resources– Semantic chunking and other advanced methods demand significant computational resources, which may impact storage and query latency.
  • Domain Specificity– Legal, medical, or technical texts may need custom chunking to preserve structure and meaning.

References

Using the Google Maps API : Emergency Response

In 2016, as a course requirement for our Bachelor in IT, in our first year, we were assigned a task to do a small micro project. It was to strengthen our foundations in programming from our Introduction to Computing paper. This was the first python project I had done outside my regular lab sessions.

Teaming up with my classmate Neeraj, we wanted to do a project that would mimic a real-world application.

Problem Statement

It was observed that our roads are very accident accident-prone. Hundreds of lives are lost each week on our roads. Due to reasons varying from possible legal issues that often good Samaritans find themselves into lack of time to respond, we find often find an audience just watching a bleeding person on the road instead of getting a hospital service quickly. Sometimes, when accidents happen at odd hours. By the time a human notices it, it would be too late, ie, Response Time to accidents is critical. The goal is to reduce this to the most optimal.

How would that work?

So what we wanted to do was mimic the environment. Not create an actual application.

So when the program receives a trigger, it quickly accepts the location coordinates. Using the google maps API it quickly searches for the nearest hospital and requests them one after another for a response. If positive feedback received.

Taking this to my first Hackathon - Hack2Help

We teamed up with Ashrudin to turn this into an application using a motion sensor to detect sudden movements powered by Raspberry Pi.

The team at Hack 2 Help
The team at Hack 2 Help

But then was the most important question - what kind of motion constitutes an accident. We were asked this question by one of the mentors at IISC, which is when we realized how complicated a question this is. It was in those conversations I first came across the word - big data, classification, machine learning, etc.

Savishkar

With all the lessons and insights from the hackathon, we decided to participate in Savishkar Project Competition at our home college - Rajagiri School Of Engineering and Technology. Alfin joined the team and we converted it to an android application that can on any sudden shake start ringing an alarm for 20 seconds. If the app isn't disabled then, it activates the emergency response as we talked about earlier.

First runner ups of Savishkar 2019 - The Zwyie Team
First runner ups of Savishkar 2019 - The Zwyie Team

We are the proud first runner ups of Savishkar 2019. Thanks to an amazing team - The ZWYIE TECH.

And that was the story of my many firsts - my first project, my first hackathon, first project team, my first project competition & the first time I met Machine Learning.