Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve chunking to always include parent header #63

Open
bsquizz opened this issue Oct 11, 2024 · 0 comments
Open

Improve chunking to always include parent header #63

bsquizz opened this issue Oct 11, 2024 · 0 comments

Comments

@bsquizz
Copy link
Collaborator

bsquizz commented Oct 11, 2024

When splitting chunks, include the header information in each chunk -- even if the content beneath the header had to be split.

@hemslo has an implementation example at https://github.com/hemslo/chat-search/blob/90794a6c1e288942893ab7f222c375fbf7612380/app/dependencies/document_transformer.py#L51

# What is Clowder?
## Clowder is a
aaa
## Clowder is b
bbb
...
ccc

The final chunks should be:

# What is Clowder?
## Clowder is a
aaa

and

# What is Clowder?
## Clowder is b
bbb

and

# What is Clowder?
## Clowder is b
ccc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant