Skip to content

Commit

Permalink
Merge pull request #149 from aitomatic/fix/vector-query-top-k
Browse files Browse the repository at this point in the history
update vector-query similarity top-k parameter
  • Loading branch information
TheVinhLuong102 authored Apr 2, 2024
2 parents ae47a32 + 8ef3dbe commit 7ab3f4e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion openssa/core/ooda_rag/query_rewritting_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(
self,
index: VectorStoreIndex = None, # type: ignore
chunk_size: int = 1024,
vector_similarity_top_k: int = 5,
vector_similarity_top_k: int = 10,
fusion_similarity_top_k: int = 10,
service_context: ServiceContext = None,
**kwargs: Any,
Expand Down
2 changes: 1 addition & 1 deletion openssa/core/ooda_rag/resources/dense_x/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(
query_llm: Optional[LLM] = None,
embed_model: Optional[BaseEmbedding] = None,
text_splitter: TextSplitter = SentenceSplitter(),
similarity_top_k: int = 4,
similarity_top_k: int = 10,
) -> None:
"""Init params."""
self._proposition_llm = proposition_llm or OpenAI(
Expand Down
2 changes: 1 addition & 1 deletion openssa/integrations/llama_index/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Backend(AbstractRAGBackend):
def __init__(
self,
relevance_threshold: float = 0.5,
similarity_top_k: int = 4,
similarity_top_k: int = 10,
service_context: ServiceContext = None,
):
"""
Expand Down

0 comments on commit 7ab3f4e

Please sign in to comment.