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

feat(unstructured): add element index as metadata #382

Conversation

lambda-science
Copy link
Contributor

@lambda-science lambda-science commented Feb 8, 2024

Adding element index in the metadata when partition mode is by element
Close feature request: #378

Is your feature request related to a problem? Please describe.
With unstructured we can do partition: one doc per file, one doc per page or one doc per elem.
When doing one doc per elem there is no way to track orders of element coming from a same doucment.
This informations can be usefull for example for a ContextExpander component.
Let's say you retrieve an element, you can retrieve also the previous and next element to expand the current context .

Describe the solution you'd like
Just automatically add index metadata.
I will do a PR.

@lambda-science lambda-science requested a review from a team as a code owner February 8, 2024 15:24
@lambda-science lambda-science requested review from silvanocerza and removed request for a team February 8, 2024 15:24
Copy link
Contributor

@silvanocerza silvanocerza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks! 🚀

@silvanocerza silvanocerza merged commit f8a1019 into deepset-ai:main Feb 9, 2024
8 checks passed
@lambda-science
Copy link
Contributor Author

Cool, thanks! 🚀

Happy about the merge ! :)
Is it possible to do a small bump of the version to release the feature ? :)

@anakin87
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants