gusye1234 / nano-graphrag

A simple, easy-to-hack GraphRAG implementation
MIT License
1.7k stars 164 forks source link

feature: allow custom chunking method #40

Closed rangehow closed 2 months ago

rangehow commented 2 months ago

In mature RAG frameworks, providing custom chunking methods is a very common choice. Fixed-length splitting brings many disadvantages, such as causing incomplete grammatical inputs, which challenges small models to produce normal outputs. Therefore, we have added an optional feature, allowing users to customize the chunking method, just like they can provide custom LLMs and embedding functions. At the same time, we have provided a separator-based splitting method that can ensure each chunk is grammatically complete.

gusye1234 commented 2 months ago

LGTM