PitchHut logo
A high-performance vector database for agentic applications.
Pitch

Piramid is a Rust-based vector database designed specifically for low-latency agentic workloads. It features state-of-the-art GPU indexing strategies, a comprehensive REST API, and supports various search engines. With efficient data management and robust performance metrics, Piramid aims to streamline the development of agentic applications.

Description

Piramid is a powerful Rust-based vector database specifically designed for agentic applications that demand low-latency performance. This innovative proof of concept explores advanced GPU-based indexing strategies, enhancing efficiency in data handling.

Key Features

  • Single Binary: Offers both a CLI and server in a single executable, simplifying deployment and usage.
  • Robust Search Capabilities: Supports various search engines, including HNSW, IVF, and flat, alongside filtering and metadata functionalities.
  • Data Management: Incorporates Write-Ahead Logging (WAL) and checkpoints, utilizing memory-mapped storage to optimize cache performance.
  • Comprehensive Embedding Support: Facilitates embedding from OpenAI or local HTTP sources and employs caching and retry mechanisms for reliability.
  • Stability and Monitoring: Implements limits and guardrails for disk and memory usage, ensuring system health through tracing and metrics endpoints.

Quick Start

A straightforward init process enables users to begin their work with minimal setup:

cargo install piramid
piramid init                # writes piramid.yaml
piramid serve --data-dir ./data

The server will default to http://0.0.0.0:6333, with data storage available under ~/.piramid by default.

Usage

Piramid's REST API enables seamless integration and operation:

# Create collection
curl -X POST http://localhost:6333/api/collections \  
  -H "Content-Type: application/json" \  
  -d '{"name": "docs"}'

# Store vector
curl -X POST http://localhost:6333/api/collections/docs/vectors \  
  -H "Content-Type: application/json" \  
  -d '{"vector": [0.1, 0.2, 0.3, 0.4], "text": "Hello world", "metadata": {"category": "greeting"}}'

# Embed text and store
curl -X POST http://localhost:6333/api/collections/docs/embed \  
  -H "Content-Type: application/json" \  
  -d '{"text": ["hello", "bonjour"], "metadata": [{"lang": "en"}, {"lang": "fr"}]}'

# Search
curl -X POST http://localhost:6333/api/collections/docs/search \  
  -H "Content-Type: application/json" \  
  -d '{"vector": [0.1, 0.2, 0.3, 0.4], "k": 5}'

Health and metrics can be accessed at /healthz, /readyz, and /api/metrics endpoints.

Configuration

Usage is further customizable through configuration files and environment variables, enabling tailored setups:

piramid init --path piramid.yaml   # generate defaults
piramid serve --config piramid.yaml

A sample configuration in YAML format allows users to set index types, search parameters, and memory management options easily.

Development

For contributors, the project is structured for straightforward building and testing:

cargo build
cargo test
cargo run -- serve --data-dir ./data

Piramid shows great promise for developers seeking a high-performance vector database for sophisticated applications, with ample room for collaboration and enhancement in its ongoing development.

0 comments

No comments yet.

Sign in to be the first to comment.