kdb
is a knowledgebase command line tool that relies on Ollama for embedding and inference. You can use it as is or integrate it with 3rd party tools to make your own Retrieval Augmented Generation (RAG) system.
- Clone the repository
make build
- Your binaries are at
bin/
directory - Add them to the
PATH
environment variable.
Here is the list of available commands
kdb --help
Knowledgebase in your command line
Usage:
kdb [flags]
kdb [command]
Available Commands:
list Lists the embedded entries.
query Search in the embedded entries.
embed Stores the given text in the vector database.
delete Deletes an entry by given id.
help Help about any command
Flags:
-h, --help help for kdb
-v, --version Show version information
Use "kdb [command] --help" for more information about a command.
kdb embed "here is some text"
kdb query "find something"
The output can be piped to ollama to get the result in a proper format. Take a look at the scripts in the scripts/
directory.
You can use your knowledge base by simply running: ask "some question"
A quick way to embed some content for later retrival is using the learn
script like this: learn "something"