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

Add metadata support for documents #859

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

aellispierce
Copy link

Add metadata column to pgvector storage to allow associating additional information with stored documents. This enables tracking metadata like source documents, page numbers, or any other document-specific information.

  • Add JSONB metadata column to schema
  • Update add_texts to support metadata parameter
  • Update update_texts to support metadata parameter
  • Add metadata support to similarity search results
  • Add tests for metadata functionality

BREAKING CHANGE: Schema update requires existing tables to be recreated or manually altered to add metadata column

Addresses: #318

Add metadata column to pgvector storage to allow associating additional
information with stored documents. This enables tracking metadata like
source documents, page numbers, or any other document-specific information.

- Add JSONB metadata column to schema
- Update add_texts to support metadata parameter
- Update update_texts to support metadata parameter
- Add metadata support to similarity search results
- Add tests for metadata functionality

BREAKING CHANGE: Schema update requires existing tables to be recreated
or manually altered to add metadata column
@aellispierce aellispierce force-pushed the feature/pgvector-metadata branch from 26e3fb0 to a0d6595 Compare October 28, 2024 14:34
@andreibondarev
Copy link
Collaborator

Sorry for the late reply!

@aellispierce Wow! This is amazing! Would you mind adding an entry to the CHANGELOG?

@andreibondarev
Copy link
Collaborator

I'm wondering what kind of changes would be needed here: https://github.com/patterns-ai-core/langchainrb_rails

@aellispierce
Copy link
Author

@andreibondarev I've updated the changelog ☺️

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

Successfully merging this pull request may close these issues.

2 participants