From 820b4523fd058a7b7fea4ce996f694ca40835239 Mon Sep 17 00:00:00 2001 From: Debanjum Date: Sun, 29 Jun 2025 15:06:08 -0700 Subject: [PATCH] Show raw rather than compiled entry to llm and users Only embedding models see, operate on compiled text. LLMs should see raw entry to improve combining it with other document traversal tools for better regex and line matching. Users see raw entry for better matching with their actual notes. --- src/khoj/routers/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/khoj/routers/helpers.py b/src/khoj/routers/helpers.py index 5f90c2be..9877233e 100644 --- a/src/khoj/routers/helpers.py +++ b/src/khoj/routers/helpers.py @@ -1263,7 +1263,7 @@ async def search_documents( compiled_references = [ { "query": item.additional["query"], - "compiled": item.additional["compiled"], + "compiled": item["entry"], "file": item.additional["file"], } for item in search_results