langchain-ai / langchain-google

MIT License
76 stars 79 forks source link

Add optional id_field to VertexRank #217

Closed shenghann closed 1 month ago

shenghann commented 1 month ago

There are valid use cases to retain the id field in the original retrieved documents in the documents that are reranked by VertexRank. This is especially important for use cases where traceability of documents throughout the chain is important.

Current assigned id based on an enumerated incrementing index works for cases where ids do not need to be tracked but isn't universally applicable.

gmogr commented 1 month ago

/gcbrun

lkuligin commented 1 month ago

@shenghann linter is red

lkuligin commented 1 month ago

@shenghann you can run linter locally with make format and make lint commands https://github.com/langchain-ai/langchain-google/blob/main/libs/community/Makefile