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

Allow configuring HTML embedding #102

Open
boswelja opened this issue Dec 15, 2024 · 3 comments
Open

Allow configuring HTML embedding #102

boswelja opened this issue Dec 15, 2024 · 3 comments

Comments

@boswelja
Copy link
Contributor

Currently, the HTML embedder splits a webpage into sections for each paragraph, code block, header etc.

This works pretty great for articles and blog posts, where information is divided as such and each paragraph can be used independently. However, this falls apart for most documentation as it loses the relationship between a paragraph explaining code, and the code it's explaining.

It would be cool if this splitting behavior was configurable. I think the default behavior is fine for most cases, but the added ability of either only splitting on certain tokens, or not splitting at all would also be great options to have.

@akshayballal95
Copy link
Collaborator

Yes. It makes sense. But most applications may require splitting as people use it for RAG and the chunky size needs to be moderate. Do you have any ideas in mind for the splitting strategy. One option that I can think of is to convert the webpage to markdown style format and chunk it like any other markdown. Let me know if you have any other alternate option.

@boswelja
Copy link
Contributor Author

Yeah I think the current splitting strategy makes sense and works well for most sites, it's just the few where it doesn't 😅

Something that groups by content under a heading would be ideal for the remaining "some" I think - if we can convert to Markdown to keep the context of Heading, paragraph, code etc then that'd be even better!

@akshayballal95
Copy link
Collaborator

Great, I will add some splitting strategy options that can be passed in the function signature.

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

2 participants