These are examples for my Practical GenAI with Go talk, which uses Parakeet to access Ollama both via its native and OpenAI-compatible endpoints.
Note: Many examples here are the same as those in the Parakeet repository.
All the demos use Ollama, so start that before running any.
ollama serve
Then, in another tab, pull the models. We use a medium size chat model to reduce hallucinations:
ollama pull qwen2.5:14b
ollama pull mxbai-embed-large
agent writes a new file READMUAH.md for you.
go run agent/main.go
chat completes a chat, then a follow-up message.
go run chat/main.go
markdown-context adds markdown into the system context. This allows the LLM to consider new information when generating a response.
go run markdown-context/main.go
markdown-rag uses a VectorDB, Elasticsearch to store markdown fragments. Later, those similar to the user's prompt are retrieved into the system context. This allows the LLM to consider new information when generating a response.
First you need to have Elasticsearch running. You can use docker to start it: docker compose up -d
. When done, stop it via docker compose down
.
create-embeddings loads go1.24.md and stores the embeddings in Elasticsearch.
go run markdown-rag/create-embeddings/main.go
use-embeddings does a similarity search in Elasticsearch based on the user's prompt to get relevant text fragments. Then, it places those in context to complete the prompt.
go run markdown-rag/use-embeddings/main.go