Skip to content

Commit

Permalink
更新 RedisRag 搜索方法,使用相似性搜索并返回相关性评分
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiesun committed Nov 19, 2024
1 parent 57dddbd commit 92f7626
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ async def redis_rag_search(
try:
cachekey = f"rag_{md5hash(query.query)}"
vdb = RedisRag.get_vectordb(query.index)
result = await vdb.amax_marginal_relevance_search(
result = await vdb.asimilarity_search_with_relevance_scores(
query.query, k=query.topk, return_metadata=True
)
if not result:
Expand Down

0 comments on commit 92f7626

Please sign in to comment.