Ai Sovereignty
6 articles
Go for ML Inference: When It Makes Sense
Go is not ideal for ML inference due to a lack of native tensor libraries and hardware acceleration support, though it can wrap C++ engines.
How to Implement Embeddings and Similarity Search in Go
Implement embeddings and similarity search in Go by initializing an embedding model, connecting to a vector database, and using the store's SimilaritySearch method to retrieve relevant documents.
How to Implement RAG (Retrieval Augmented Generation) in Go
Implement RAG in Go by retrieving context from a vector store and passing it to an LLM for generation.
How to Use LangChain Alternatives in Go (LangChainGo)
Initialize LangChainGo in Go by importing the package, creating a Google AI client, and connecting to a Weaviate vector store for RAG applications.
How to Use Ollama API from Go for Local LLMs
Send a JSON POST request to localhost:11434/api/generate using Go's net/http package to query a local Ollama model.
How to Use TensorFlow or ONNX Runtime from Go
You cannot use TensorFlow directly from Go because it lacks an official Go API, but you can easily use ONNX Runtime via its official Go bindings to execute pre-trained models.