summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-03-08 11:38:56 +0300
committerGrail Finder <wohilas@gmail.com>2026-03-08 11:38:56 +0300
commitb6e802c12e37aeaf19bd449cf2877df5ae04d389 (patch)
treea6b55eafa37099f07a5e55facfddb12c36f4a432
parentc0d5db29a581b6a21f2d009189649d4e98ab55dc (diff)
Enha (rag): bigger default batch
-rw-r--r--config.example.toml4
-rw-r--r--rag/rag.go2
-rw-r--r--tools.go4
3 files changed, 5 insertions, 5 deletions
diff --git a/config.example.toml b/config.example.toml
index 1698189..f74d986 100644
--- a/config.example.toml
+++ b/config.example.toml
@@ -28,8 +28,8 @@ AutoScrollEnabled = true
AutoCleanToolCallsFromCtx = false
# rag settings
RAGBatchSize = 1
-RAGWordLimit = 80
-RAGOverlapWords = 16
+RAGWordLimit = 250
+RAGOverlapWords = 25
RAGDir = "ragimport"
# extra tts
TTS_ENABLED = false
diff --git a/rag/rag.go b/rag/rag.go
index e47e3d6..ef85e7f 100644
--- a/rag/rag.go
+++ b/rag/rag.go
@@ -156,7 +156,7 @@ func createChunks(sentences []string, wordLimit, overlapWords uint32) []string {
func sanitizeFTSQuery(query string) string {
// Remove double quotes and other problematic characters for FTS5
- query = strings.ReplaceAll(query, "\"", " ")
+ // query = strings.ReplaceAll(query, "\"", " ")
query = strings.ReplaceAll(query, "'", " ")
query = strings.ReplaceAll(query, ";", " ")
query = strings.ReplaceAll(query, "\\", " ")
diff --git a/tools.go b/tools.go
index e66533a..41b0b9b 100644
--- a/tools.go
+++ b/tools.go
@@ -360,13 +360,13 @@ func ragsearch(args map[string]string) []byte {
}
limitS, ok := args["limit"]
if !ok || limitS == "" {
- limitS = "3"
+ limitS = "10"
}
limit, err := strconv.Atoi(limitS)
if err != nil || limit == 0 {
logger.Warn("ragsearch limit; passed bad value; setting to default (3)",
"limit_arg", limitS, "error", err)
- limit = 3
+ limit = 10
}
ragInstance := rag.GetInstance()
if ragInstance == nil {