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

Return the relevance/score for other retrieval strategies #201

Open
tomlynchRNA opened this issue May 7, 2024 · 0 comments
Open

Return the relevance/score for other retrieval strategies #201

tomlynchRNA opened this issue May 7, 2024 · 0 comments
Assignees

Comments

@tomlynchRNA
Copy link
Collaborator

e.g. in time weighted, we do:


    def format_results(self, results):
        self.logger.debug(f"{self.__class__.__name__} results: {results}")
        return "\n".join(
            map(lambda x: x if type(x) is str else str({
                'data': x[0].page_content,
                'metadata': x[0].metadata,
                'time_weight_score': x[1]
            }), results))

because each result is a tuple with [1] containing the relevance. Add the relevance to other retrieval strategies and return it in a similar format (but call it "score" instead of "time_weight_score")

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