From 2c3d625b35613a38bb3e58aba359af917afa163a Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Fri, 9 Jan 2026 20:11:47 +0200 Subject: [PATCH] fix: increase top_k from 5 to 10 to match knowledge base --- .../app/agents/new_chat/tools/search_surfsense_docs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/surfsense_backend/app/agents/new_chat/tools/search_surfsense_docs.py b/surfsense_backend/app/agents/new_chat/tools/search_surfsense_docs.py index 21f3942ab..a34e16ff2 100644 --- a/surfsense_backend/app/agents/new_chat/tools/search_surfsense_docs.py +++ b/surfsense_backend/app/agents/new_chat/tools/search_surfsense_docs.py @@ -82,7 +82,7 @@ def format_surfsense_docs_results(results: list[tuple]) -> str: async def search_surfsense_docs_async( query: str, db_session: AsyncSession, - top_k: int = 5, + top_k: int = 10, ) -> str: """ Search Surfsense documentation using vector similarity. @@ -127,7 +127,7 @@ def create_search_surfsense_docs_tool(db_session: AsyncSession): """ @tool - async def search_surfsense_docs(query: str, top_k: int = 5) -> str: + async def search_surfsense_docs(query: str, top_k: int = 10) -> str: """ Search Surfsense documentation for help with using the application. @@ -145,7 +145,7 @@ def create_search_surfsense_docs_tool(db_session: AsyncSession): Args: query: The search query about Surfsense usage or features - top_k: Number of documentation chunks to retrieve (default: 5) + top_k: Number of documentation chunks to retrieve (default: 10) Returns: Relevant documentation content formatted with chunk IDs for citations