latent

command module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

README

latent

Go Version Go Reference Version Build Release Go Report Card License

Peer into latent space.

demo

Terminal UI for visualizing high-dimensional text embeddings via dimensionality reduction. Embeds text using Ollama's nomic-embed-text model (768D vectors), persists to Qdrant vector database over gRPC, and projects to 2D using PCA (SVD-based) or UMAP for nonlinear manifold approximation. Clustering via HDBSCAN reveals semantic structure without specifying k. Built with Bubble Tea and Lipgloss.

Prerequisites

  • Ollama serving nomic-embed-text on localhost:11434
  • Qdrant running on localhost:6334 (gRPC)

Install

curl -sSL https://raw.githubusercontent.com/alDuncanson/latent/main/install.sh | bash

or

go install github.com/alDuncanson/latent@latest

Usage

latent                    # Start TUI
latent dataset.csv        # Import from CSV (requires `text` column)
latent dataset.json       # Import from JSON (array of strings or {text: ...} objects)
latent --preload          # Seed with demo word list
Hugging Face Datasets
latent --hf-dataset stanfordnlp/imdb --hf-split test --hf-max-rows 50
latent --hf-dataset rajpurkar/squad --hf-column question --hf-max-rows 200

Flags: --hf-dataset, --hf-split (default: train), --hf-column (default: text), --hf-max-rows (default: 100)

Documentation

Overview

Package main provides the entry point for latent, a terminal UI application for visualizing text embeddings. It connects to Ollama for generating embeddings and Qdrant for vector storage, then projects high-dimensional vectors to 2D using PCA for interactive visualization.

Directories

Path Synopsis
Package huggingface provides a client for the Hugging Face Dataset Viewer API.
Package huggingface provides a client for the Hugging Face Dataset Viewer API.
Package ollama provides an HTTP client for interacting with the Ollama API.
Package ollama provides an HTTP client for interacting with the Ollama API.
Package projection provides dimensionality reduction and clustering for high-dimensional embedding vectors.
Package projection provides dimensionality reduction and clustering for high-dimensional embedding vectors.
Package qdrant provides a gRPC client for interacting with a Qdrant vector database.
Package qdrant provides a gRPC client for interacting with a Qdrant vector database.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL