From 0b8ad0166ffe7beb89a7f9fb3ad40951a5b16ecf Mon Sep 17 00:00:00 2001 From: Jalal Date: Sun, 21 Jul 2024 02:14:15 +0200 Subject: [PATCH] fix typos + update scripts with the new command line --- README.md | 4 ++-- scripts/ask | 2 +- scripts/learn | 2 +- test_content/train.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b59b957..3f8992f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## How to query information? Simply use the `query` parameter to retrieve relevant informations. You can use the `--limit` parameter to indicate how many of most relevant entries you want to retrieve. ``` -./kdb query "What is life meaning?" --limit 1 +./kdb query "What is the meaning of life?" --limit 1 ``` as you can see it doesn't return anything, because it doesn't have any knowledge yet. @@ -12,7 +12,7 @@ as you can see it doesn't return anything, because it doesn't have any knowledge ## How to add knowledge? You can use the `embed` paramter to pass a piece of knowledge to the database. ``` -./kdb embed "Here is a sample piece of information that will be remembed forever!" +./kdb embed "Here is a sample piece of information to be remembered!" ``` There is a script in the `test_content` directory which you can use to add some sample knowledge. ``` diff --git a/scripts/ask b/scripts/ask index a9fb280..1eb21a5 100755 --- a/scripts/ask +++ b/scripts/ask @@ -19,7 +19,7 @@ TOP_ANSWERS=3 PROMPT="Use the given context to answer the question. Don't do yapping. Also don't mention that you answer using the given context. If you don't know the answer according to the context, just say you don't know the answer. Do not make up answers. Context:\n" # Get the context from the kdb command-line app -CONTEXT=$(kdb --query "$QUESTION" --top $TOP_ANSWERS) +CONTEXT=$(kdb query "$QUESTION" --limit $TOP_ANSWERS) # Combine the prompt, context, and the question combined_input="${PROMPT}${CONTEXT}\n\nQuestion: ${QUESTION}" diff --git a/scripts/learn b/scripts/learn index 11c1c4b..2eac5b9 100755 --- a/scripts/learn +++ b/scripts/learn @@ -5,6 +5,6 @@ if [ $# -eq 0 ]; then exit 1 fi -kdb --embed "$1" +kdb embed "$1" echo "Embedding was successful!" \ No newline at end of file diff --git a/test_content/train.sh b/test_content/train.sh index 9e3b7ee..8623f15 100755 --- a/test_content/train.sh +++ b/test_content/train.sh @@ -1,5 +1,5 @@ #/bin/bash while IFS= read -r line; do - kdb --embed "$line" + kdb embed "$line" done < ./gk_training_data.txt \ No newline at end of file