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

[draft]: propagate score through retriever #20800

Closed
wants to merge 17 commits into from
Closed

Conversation

ccurme
Copy link
Collaborator

@ccurme ccurme commented Apr 23, 2024

No description provided.

Copy link

vercel bot commented Apr 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview May 7, 2024 2:57pm

query: str,
*,
run_manager: CallbackManagerForRetrieverRun,
include_score: bool = False,
) -> List[Document]:
if self.search_type == "similarity":
Copy link
Member

Choose a reason for hiding this comment

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

this case feels like it could lead to some confusion. Should we throw an error if include_score is set to true in this case with a message to switch search type?

Also do we want to use relevance scores for this, or do we want to just return raw scores? My goal was to deprecate the relevance score stuff as-is in #20302

Copy link
Member

Choose a reason for hiding this comment

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

Might also be good to add a typing override such that when include_score is set to true, this returns DocumentSearchHit. Alternative is to just add the score stuff as an optional to Document.

@ccurme ccurme temporarily deployed to Scheduled testing April 26, 2024 19:07 — with GitHub Actions Inactive
@ccurme ccurme temporarily deployed to Scheduled testing April 26, 2024 19:24 — with GitHub Actions Inactive
@ccurme ccurme temporarily deployed to Scheduled testing April 26, 2024 19:41 — with GitHub Actions Inactive
@ccurme ccurme added community Related to langchain-community Ɑ: core Related to langchain-core and removed community Related to langchain-community labels Jun 18, 2024
@ccurme ccurme closed this Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ɑ: core Related to langchain-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants