2.1 KiB
Vector Search Comparison Project
This repository demonstrates a simple integration with Qdrant and provides a markdown table comparing three popular search and vector store services: Tavily, Qdrant, and Pinecone.
Features
-
Qdrant Integration
A lightweight wrapper (src/qdrantIntegration.js) that allows you to:- Create and delete collections
- Upsert points (vectors + payload)
- Perform similarity search
-
Markdown Comparison
Thecomparison.mdfile contains a side‑by‑side table highlighting key differences and use cases for each service.
Getting Started
-
Clone the repository
git clone https://git.brojs.ru/kuzakhmetovartur/povtornyy-ekzamen-2-sravnitelnyy-obzor-3.git cd povtornyy-ekzamen-2-sravnitelnyy-obzor-3 -
Install dependencies
npm install -
Set up environment variables
Create a
.envfile or export the following variables in your shell:export QDRANT_URL="https://your-qdrant-instance.com" export QDRANT_API_KEY="your_api_key" # optional if your instance is public -
Use the Qdrant client
const QdrantClient = require('./src/qdrantIntegration'); const client = new QdrantClient({ url: process.env.QDRANT_URL, apiKey: process.env.QDRANT_API_KEY, }); async function demo() { await client.createCollection('demo', { size: 1536, distance: 'Cosine' }); await client.upsertPoints('demo', [ { id: 1, vector: Array(1536).fill(0.1), payload: { title: 'Example' } }, ]); const results = await client.searchPoints('demo', Array(1536).fill(0.1)); console.log(results); } demo().catch(console.error);
Documentation
-
Qdrant Integration –
src/qdrantIntegration.js
Contains theQdrantClientclass with methods for CRUD operations and search. -
Comparison Table –
comparison.md
Provides a concise comparison of Tavily, Qdrant, and Pinecone.
License
MIT © Your Name
Feel free to extend the client or add more detailed tests. Happy coding!