visualizing text splitting & chunking strategies
@GregKamradt51.122 Follower
116.242 Aufrufe
24 Kommentare
Kommentare aus dem Originalbeitrag auf X (Twitter)

@GregKamradt
Head over to to try it out This is part of a post I'm doing on chunking philosophies. I'll publish on Code:
15 Likes

@GregKamradt
I have beef though, returned chunks are .trim()'d, so they aren't exactly what the user passes in! It made reconstructing the viz hard 😉
5 Likes

@robert_heimir
@hwchase17 @langchain Great tool for quick visualization. That recursive paragraph example - makes me think an algorithm that minimizes "orphan" chunks when trying to grab whole paragraphs would be an awesome tool. Otherwise optimal settings hard to gauge.
2 Likes

@GregKamradt
@hwchase17 @langchain Big time, definitely hard to gauge. That would be cool to have a chunk analyzer that told you how many orphan or random chunks you had

@robert_heimir
@hwchase17 @langchain You could show quick calculation on text upload - def max_len(txt): ps = txt.split("\n\n") m = 0 for p in ps: m = max(m, len(p)) return m

@robert_heimir
@hwchase17 @langchain Then show how many "mid splits" occur based on current settings... def mid_split(txt, ml): c, sc = [txt[i:i+ml] for i in range(0, len(txt), ml)], 0 sc = sum(1 for i in c[:-1] if not i.endswith(('\n\n', '\n'))) return sc

@thoDdnn
@langchain Great tool! 🔥
1 Like

@murilocurti
@langchain Very cool and useful! Thank you!
1 Like

@RubenEdwardRose
@hwchase17 @langchain Very good, very useful!
1 Like

@btp4z7
@langchain 🔥
1 Like

@CapiAIFounder
@langchain Thanks Greg! Super helpful!
1 Like

@HDRobots
@langchain Super useful tool. Bookmarked!
1 Like

@ChrisHYeoh
@langchain Thanks dude! Very handy tool.
1 Like

@GregKamradt
@langchain Nice thanks! What features should be added?

@ChrisHYeoh
@langchain What about a spell-checker/auto-correcter with use control.. Context is key
1 Like

@DmitryLandberg
@langchain This is great!
1 Like

@ryanlisse
@langchain @memdotai mem it

@thadguidry
@langchain There's some tools in the You can ask a few experts on their mailing list

@sabaoui_amine
@langchain Hey, please help with verctorizing the arabic language. Thanks for the content!

@Steve_Fowler_
@langchain Thanks Greg
