Navigation überspringen
visualizing text splitting & chunking strategies
0:00 / 4:06

visualizing text splitting & chunking strategies

Greg Kamradt

@GregKamradt51.122 Follower

Auf X besuchen

116.242 Aufrufe

visualizing text splitting & chunking strategies ChunkViz .com I thought I remembered a tool to visualize text chunking, but I couldn't find it, so I built one I didn't realize it would be so visually pleasing to tinker with 4 different splitters featured

24 Kommentare

Kommentare aus dem Originalbeitrag auf X (Twitter)

  • Profilbild von Greg Kamradt

    @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

  • Profilbild von Greg Kamradt

    @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

  • Profilbild von Robert

    @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

  • Profilbild von Greg Kamradt

    @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

  • Profilbild von Robert

    @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

  • Profilbild von Robert

    @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

  • Profilbild von thoddnn

    @thoDdnn

    @langchain Great tool! 🔥

    1 Like

  • Profilbild von Murilo Maciel Curti

    @murilocurti

    @langchain Very cool and useful! Thank you!

    1 Like

  • Profilbild von Ruben Rose 🌈RIP Melzinha Sempre te Amarei

    @RubenEdwardRose

    @hwchase17 @langchain Very good, very useful!

    1 Like

  • Profilbild von bryan pratte

    @btp4z7

    @langchain 🔥

    1 Like

  • Profilbild von Jammin

    @CapiAIFounder

    @langchain Thanks Greg! Super helpful!

    1 Like

  • Profilbild von Kris Lukanov

    @HDRobots

    @langchain Super useful tool. Bookmarked!

    1 Like

  • Profilbild von Chris Yeoh

    @ChrisHYeoh

    @langchain Thanks dude! Very handy tool.

    1 Like

  • Profilbild von Greg Kamradt

    @GregKamradt

    @langchain Nice thanks! What features should be added?

  • Profilbild von Chris Yeoh

    @ChrisHYeoh

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

    1 Like

  • Profilbild von Dmitry Landberg

    @DmitryLandberg

    @langchain This is great!

    1 Like

  • Profilbild von Ryan Lisse

    @ryanlisse

    @langchain @memdotai mem it

  • Profilbild von Thad Guidry

    @thadguidry

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

  • Profilbild von Mohamed Amine

    @sabaoui_amine

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

  • Profilbild von Steve Fowler

    @Steve_Fowler_

    @langchain Thanks Greg