# C1M3 ungraded lab mixed\_chunking() docstring is a little bit misleading :)

**URL:** <https://community.deeplearning.ai/t/c1m3-ungraded-lab-mixed-chunking-docstring-is-a-little-bit-misleading/890680>\
**Category:** Retrieval Augmented Generation\
**Tags:** week-module-3, coursera-platform\
**Created:** [March 22, 2026, 11:04am UTC](https://community.deeplearning.ai/t/c1m3-ungraded-lab-mixed-chunking-docstring-is-a-little-bit-misleading/890680 "2026-03-22T11:04:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ulyaaliyeva206](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/ulyaaliyeva206/32/134264_2.png) [@ulyaaliyeva206](https://community.deeplearning.ai/u/ulyaaliyeva206)\
**Post date:** [March 22, 2026, 11:04am UTC](https://community.deeplearning.ai/t/c1m3-ungraded-lab-mixed-chunking-docstring-is-a-little-bit-misleading/890680/1 "2026-03-22T11:04:41Z")

</div>

Hey all! 👋

Loving the course! Quick note on `mixed_chunking` 📝

The docstring says:

> “larger chunks can be further split at the middle or specific markers”

But the code only handles small chunks (merging them). Large chunks just get appended as-is 🤔:

```python
if len(new_buffer_words) < min_length:
    chunk_buffer = new_buffer # small → merge ✅
else:
    new_chunks.append(new_buffer) # big → no split ❌

```

This can be a bit misleading when reading the docstring — I initially thought the function would also split large chunks, and spent some time looking for that logic in the code 😅

Maybe the docstring could be updated to reflect the current behavior? Or was the split logic planned for later? 😊

 ![image](https://global.discourse-cdn.com/dlai/original/3X/a/3/a3e623d4f7f6a56a6b9d9382be87e85831953140.png)

---

<div class="post-metadata">

**Author:** ![Deepti\_Prasad](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/deepti_prasad/32/165831_2.png) [@Deepti\_Prasad](https://community.deeplearning.ai/u/Deepti_Prasad)\
**Post date:** [March 22, 2026, 3:23pm UTC](https://community.deeplearning.ai/t/c1m3-ungraded-lab-mixed-chunking-docstring-is-a-little-bit-misleading/890680/2 "2026-03-22T15:23:30Z")

</div>

hi @ulyaaliyeva206

GLAD YOU ARE ENJOYING THE COURSE.

did you check the metadata? they probably only provided the instruction but didn’t implement in the function.

Probably because of min\_length, chunk\_size, number of tokens the lab is working upon?

Regards

Dr. Deepti

---

<div class="post-metadata">

**Author:** ![ulyaaliyeva206](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/ulyaaliyeva206/32/134264_2.png) [@ulyaaliyeva206](https://community.deeplearning.ai/u/ulyaaliyeva206)\
**Post date:** [March 22, 2026, 3:33pm UTC](https://community.deeplearning.ai/t/c1m3-ungraded-lab-mixed-chunking-docstring-is-a-little-bit-misleading/890680/3 "2026-03-22T15:33:37Z")

</div>

Hi @Deepti_Prasad, thanks for the reply!

Yes, that’s exactly my point — the docstring describes behavior that isn’t actually implemented in the code. The function only merges small chunks (\< min\_length), but doesn’t split large ones.

You’re right that with the current lab data and parameters, it probably doesn’t cause issues. But it can be confusing for learners (like me 😅) who read the docstring first and then try to find the splitting logic in the code.

A small update to the docstring to match the actual behavior would help avoid that confusion.

Thanks! 🙏

---

<div class="post-metadata">

**Author:** ![Deepti\_Prasad](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/deepti_prasad/32/165831_2.png) [@Deepti\_Prasad](https://community.deeplearning.ai/u/Deepti_Prasad)\
**Post date:** [March 22, 2026, 3:37pm UTC](https://community.deeplearning.ai/t/c1m3-ungraded-lab-mixed-chunking-docstring-is-a-little-bit-misleading/890680/4 "2026-03-22T15:37:01Z")

</div>

I will convey to learning technologist of the course about your feedback.

regards

Dr. Deepti
