Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Jalalx committed Jul 21, 2024
1 parent 155730a commit f35f09e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
## 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?" --top 1
./kdb query "What is life meaning?" --limit 1
```
as you can see it doesn't return anything, because it doesn't have any knowledge yet.


## 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 that will be remembed forever!"
```
There is a script in the `test_content` directory which you can use to add some sample knowledge.
```
Expand All @@ -23,7 +23,7 @@ chmod +x ./train.sh

This will add a bunch of sample knowledge. You can now ask questions about it:
```
./kdb --query "how many times Alpha is smaller than Gamma?" --top 3
./kdb query "how many times Alpha is smaller than Gamma?" --top 3
```
and it returns the revelant piece of informations.

Expand All @@ -39,19 +39,19 @@ one-sixth of Gamma. Therefore, Alpha is six times smaller than Gamma.
```
Or you can make your own prompt for it:
```
echo "Answer to the question by following the given context. IF you don't know the answer simply say you don't know. Do not do yapping. The Context: $(./kdb --query "What is the meaning of life?" --top 3)" | ollama run llama3
echo "Answer to the question by following the given context. IF you don't know the answer simply say you don't know. Do not do yapping. The Context: $(./kdb query "What is the meaning of life?" --limit 3)" | ollama run llama3
```

## How to list all entries?
You can do this by using `list` parameter and entering the max number of entries to be listed.
You can do this by using `list` parameter and pass the max number of entries to be listed as `--limit`.
```
./kdb --list 100
./kdb --list --limit 100
```

## How to delete an entry?
You can simply use the `delete` option:
```
./kdb --delete "b1827d5a-16d2-4f74-acfa-29864434859a"
./kdb delete "b1827d5a-16d2-4f74-acfa-29864434859a"
```

## Need the list of parameters?
Expand Down

0 comments on commit f35f09e

Please sign in to comment.