rig-vector-store

Guide Rig vector store crate implementations with VectorStoreIndex trait requirements.

8.2k|927|Updated Jun 5, 2024
One-click install
npx skills add https://github.com/0xPlaygrounds/rig --skill rig-vector-store
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rig-vector-store
Source: https://github.com/0xPlaygrounds/rig/tree/main/.claude/skills/rig-vector-store
Command: npx skills add https://github.com/0xPlaygrounds/rig --skill rig-vector-store

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a standardized framework and set of requirements for implementing new vector store integrations within the Rig ecosystem, ensuring consistency and quality.

Core Features & Use Cases

  • Standardized Implementation: Guides developers on implementing the VectorStoreIndex trait, defining Filter types, and adhering to WASM compatibility requirements.
  • Error Handling: Enforces the use of specific VectorStoreError variants for robust error management.
  • Use Case: A developer needs to add a new vector database backend (like Pinecone or Weaviate) to Rig. They would use this Skill to understand the exact traits, bounds, and error handling patterns required for a successful integration.

Quick Start

Use the rig-vector-store skill to implement a new vector store backend for Rig.

Frequently Asked Questions about rig-vector-store

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a new vector store backend in Rust?

To implement a Rig vector store backend, you must implement the `VectorStoreIndex` trait, including `top_n` and `top_n_ids` methods, and define an appropriate `Filter` type for querying the vector database.

What traits do I need to implement for a Rig vector database integration?

You need to implement the `VectorStoreIndex` trait and ensure your integration adheres to `WasmCompatSend` and `WasmCompatSync` bounds for WebAssembly compatibility.

How should I handle errors when building a vector store companion crate?

When building a vector store companion crate, you must return specific `VectorStoreError` variants to ensure robust error management and successful integration within the Rig ecosystem.

Can I use Rust to add a new vector database like Pinecone or Weaviate to Rig?

Yes, you can use this framework to integrate new vector databases like Pinecone or Weaviate by following the standardized implementation patterns for the `VectorStoreIndex` trait in Rust.

Why does my Rig vector store integration require WASM compatibility bounds?

WASM compatibility bounds, specifically `WasmCompatSend` and `WasmCompatSync`, are required to ensure your vector store companion crate functions correctly within WebAssembly environments.