Skip to content

Conversation

Copy link

Copilot AI commented May 27, 2025

This PR replaces PostgreSQL (with pgvector extension) with Qdrant as the vector database for storing and searching embeddings. Qdrant is a specialized vector database optimized for similarity search operations.

Key changes:

  1. Added Qdrant client as a dependency
  2. Created a new qdrantClient.ts file that handles:
    • Collection initialization
    • Embedding insertion
    • Vector similarity search
  3. Updated Docker configuration to use Qdrant container
  4. Modified insertion and search operations to use Qdrant's API
  5. Updated documentation with new setup instructions

Benefits:

  • Simplified setup (no database migrations required)
  • Better performance for vector similarity search
  • More specialized functionality for vector operations
  • Cleaner API for vector operations

Example usage:

// Search for similar content
const embedding = await createEmbedding("Rock artist");
searchEmbedding(embedding);

// Results use cosine similarity (higher scores = more similar)
Search Results: [
  {
    resource_link: 'https://en.wikipedia.org/wiki/Dark_Horse_%E2%80%93_A_Live_Collection',
    caption: 'Dark Horse – A Live Collection',
    cosine_distance: 0.8029609909628218
  },
  // ...more results
]

Fixes #1.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: trygvea <99969+trygvea@users.noreply.github.com>
Copilot AI changed the title [WIP] Use Qdrant in stead of Postgres as embeddings database Replace PostgreSQL with Qdrant as embeddings database May 27, 2025
Copilot AI requested a review from trygvea May 27, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Qdrant in stead of Postgres as embeddings database

2 participants