[MLsys2026 Best Paper]: https://arxiv.org/abs/2506.08276. RAG on Everything with LEANN. Enjoy 97% storage savings while running a fast, accurate, and 100% private RAG application on your personal device.
Python aifaissgpt-osslangchainllama-indexllmlocalstorageoffline-firstollamaprivacypythonragretrieval-augmented-generationvector-databasevector-searchvectors
add logs
yichuan52003091032033521d6d00f1
diff --git a/apps/document_rag.py b/apps/document_rag.pyindex 02c954a..1ac15c7 100644--- a/apps/document_rag.py+++ b/apps/document_rag.py@@ -99,7 +99,9 @@ if __name__ == "__main__":print("- 'What are the main techniques LEANN uses?'")print("- 'What is the technique DLPM?'")print("- 'Who does Elizabeth Bennet marry?'")- print("- 'What is the problem of developing pan gu model? (盘古大模型开发中遇到什么问题?)'")+ print(+ "- 'What is the problem of developing pan gu model Huawei meets? (盘古大模型开发中遇到什么问题?)'"+ )print("\nOr run without --query for interactive mode\n")rag = DocumentRAG()diff --git a/packages/leann-backend-diskann/third_party/DiskANN b/packages/leann-backend-diskann/third_party/DiskANNindex 67a2611..af2a264 160000--- a/packages/leann-backend-diskann/third_party/DiskANN+++ b/packages/leann-backend-diskann/third_party/DiskANN@@ -1 +1 @@-Subproject commit 67a2611ad14bc11d84dfdb554c5567cfb78a2656+Subproject commit af2a26481e65232b57b82d96e68833cdee9f7635diff --git a/packages/leann-core/src/leann/api.py b/packages/leann-core/src/leann/api.pyindex 39710df..0ae40af 100644--- a/packages/leann-core/src/leann/api.py+++ b/packages/leann-core/src/leann/api.py@@ -636,7 +636,10 @@ class LeannChat:"Please provide the best answer you can based on this context and your knowledge.")+ ask_time = time.time()ans = self.llm.ask(prompt, **llm_kwargs)+ ask_time = time.time() - ask_time+ logger.info(f" Ask time: {ask_time} seconds")return ansdef start_interactive(self):diff --git a/packages/leann-core/src/leann/chat.py b/packages/leann-core/src/leann/chat.pyindex 621dab2..f386172 100644--- a/packages/leann-core/src/leann/chat.py+++ b/packages/leann-core/src/leann/chat.py@@ -358,7 +358,11 @@ def validate_model_and_suggest(model_name: str, llm_type: str) -> str | None:error_msg += f"\n\nModel '{model_name}' was not found in Ollama's library."if suggestions:- error_msg += "\n\nDid you mean one of these installed models?\n"+ error_msg += (+ "\n\nDid you mean one of these installed models?\n"+ + "\nTry to use ollama pull to install the model you need\n"+ )+for i, suggestion in enumerate(suggestions, 1):error_msg += f" {i}. {suggestion}\n"else: