Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
LAE
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
文靖昊
LAE
Commits
582deb2e
Commit
582deb2e
authored
a year ago
by
tinywell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: Update GetSimilarity class to use compressed documents for reranking
parent
d5d48338
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
get_similarity.py
src/server/get_similarity.py
+1
-1
No files found.
src/server/get_similarity.py
View file @
582deb2e
...
...
@@ -9,7 +9,7 @@ class GetSimilarity:
self
.
similarity_doc_txt
=
self
.
faiss_db
.
join_document
(
self
.
similarity_docs
)
def
get_rerank
(
self
,
reranker
:
BgeRerank
,
top_k
=
5
):
rerank_docs
=
reranker
.
bge_rerank
(
self
.
question
,
self
.
similarity_docs
)
rerank_docs
=
reranker
.
compress_documents
(
self
.
similarity_docs
,
self
.
question
)
self
.
rerank_docs
=
rerank_docs
return
self
.
faiss_db
.
join_document
([
d
[
1
]
for
d
in
rerank_docs
[:
top_k
]])
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment