PluginBench
Skill
Fail
Audit score 45

qdrant

giuseppe-trisciuoglio/developer-kit

Qdrant vector database integration for Java with LangChain4j—semantic search and RAG pipelines.

What is qdrant?

Provides patterns for integrating Qdrant vector database with Java applications, focusing on Spring Boot and LangChain4j. Use this when building semantic search, RAG systems, or recommendation engines that require high-performance similarity retrieval.

  • Deploy and configure Qdrant with Docker for local or production environments
  • Initialize QdrantClient with gRPC or REST API connections, including API key authentication
  • Create collections with configurable vector dimensions and distance metrics (Cosine, Euclidean)
  • Upsert vectors with metadata payloads and perform batch operations efficiently
  • Execute similarity searches with optional filtering on vector payloads
  • Integrate with LangChain4j EmbeddingStore for RAG pipelines and Spring Boot beans

How to install qdrant

npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill qdrant
Prerequisites
  • Docker installed to run Qdrant container
  • Java 11+ with Maven or Gradle for dependency management
  • Spring Boot project (optional, for Spring integration patterns)
  • Embedding model (e.g., AllMiniLmL6V2EmbeddingModel) to generate vectors from text
Claude Code
Cursor
Windsurf
Cline

How to use qdrant

  1. 1.Deploy Qdrant locally with Docker using the provided docker run command or docker-compose
  2. 2.Add io.qdrant:client dependency (version 1.15.0+) to your Maven or Gradle build
  3. 3.Initialize QdrantClient in your application, either standalone or via Spring @Bean configuration
  4. 4.Create a collection with VectorParams specifying dimension size and distance metric
  5. 5.Upsert vectors as PointStruct objects with embeddings and metadata payloads
  6. 6.Execute search queries using queryAsync() or searchAsync() with optional filters, then process ScoredPoint results

Use cases

Good for
  • Build semantic search endpoints that embed queries and find similar documents in Qdrant
  • Implement RAG pipelines where LangChain4j retrieves relevant text segments from vector storage
  • Create multi-tenant vector databases by partitioning collections per tenant ID
  • Add recommendation engines that score similarity between user embeddings and item vectors
  • Develop filtered search with metadata constraints (e.g., category-based document filtering)
Who it's for
  • Java developers building AI/ML applications with Spring Boot
  • Backend engineers implementing RAG systems or semantic search
  • Teams deploying vector databases for production recommendation or search systems
  • Developers integrating LangChain4j with persistent vector storage

qdrant FAQ

What distance metric should I use?

Use Cosine for normalized text embeddings (standard for LLM embeddings), Euclidean for non-normalized vectors. Cosine is recommended for most semantic search use cases.

How do I handle large-scale ingestion?

Use batch upsert operations instead of individual point insertions. Wrap async operations in try/catch to handle ExecutionException and InterruptedException.

Should I use REST or gRPC API?

Use gRPC (port 6334) for production workloads; it offers better performance and connection pooling. REST API (port 6333) is suitable for debugging and development only.

How do I prevent prompt injection attacks?

Sanitize all document content before ingestion and apply content filtering on retrieved documents before passing them to the LLM.

What happens if vector dimensions don't match?

Upsert operations will fail with an error. Ensure your embedding model output dimension exactly matches the collection's vector size parameter.

Full instructions (SKILL.md)

Source of truth, from giuseppe-trisciuoglio/developer-kit.


name: qdrant description: Provides Qdrant vector database integration patterns with LangChain4j. Handles embedding storage, similarity search, and vector management for Java applications. Use when implementing vector-based retrieval for RAG systems, semantic search, or recommendation engines. allowed-tools: Read, Write, Edit, Bash, Glob, Grep

Qdrant Vector Database Integration

Overview

Qdrant is an AI-native vector database for semantic search and similarity retrieval. This skill provides patterns for integrating Qdrant with Java applications, focusing on Spring Boot and LangChain4j integration.

When to Use

  • Semantic search or recommendation systems in Spring Boot applications
  • RAG pipelines with Java and LangChain4j
  • Vector database integration for AI/ML applications
  • High-performance similarity search with filtered queries

Instructions

1. Deploy Qdrant with Docker

docker run -p 6333:6333 -p 6334:6334 \
    -v "$(pwd)/qdrant_storage:/qdrant/storage:z" \
    qdrant/qdrant

Access: REST API at http://localhost:6333, gRPC at http://localhost:6334.

2. Add Dependencies

Maven:

<dependency>
    <groupId>io.qdrant</groupId>
    <artifactId>client</artifactId>
    <version>1.15.0</version>
</dependency>

Gradle:

implementation 'io.qdrant:client:1.15.0'

3. Initialize Client

QdrantClient client = new QdrantClient(
    QdrantGrpcClient.newBuilder("localhost").build());

For production with API key:

QdrantClient client = new QdrantClient(
    QdrantGrpcClient.newBuilder("localhost", 6334, false)
        .withApiKey("YOUR_API_KEY")
        .build());

4. Create Collection

client.createCollectionAsync("search-collection",
    VectorParams.newBuilder()
        .setDistance(Distance.Cosine)
        .setSize(384)
        .build()
).get();

Validation: Verify the collection was created by checking client.getCollectionAsync("search-collection").get().

5. Upsert Vectors

List<PointStruct> points = List.of(
    PointStruct.newBuilder()
        .setId(id(1))
        .setVectors(vectors(0.05f, 0.61f, 0.76f, 0.74f))
        .putAllPayload(Map.of("title", value("Spring Boot Documentation")))
        .build()
);
client.upsertAsync("search-collection", points).get();

Validation: Check that client.upsertAsync(...).get() completes without throwing.

6. Search Vectors

List<ScoredPoint> results = client.queryAsync(
    QueryPoints.newBuilder()
        .setCollectionName("search-collection")
        .setLimit(5)
        .setQuery(nearest(0.2f, 0.1f, 0.9f, 0.7f))
        .build()
).get();

Filtered search:

List<ScoredPoint> results = client.searchAsync(
    SearchPoints.newBuilder()
        .setCollectionName("search-collection")
        .addAllVector(List.of(0.62f, 0.12f, 0.53f, 0.12f))
        .setFilter(Filter.newBuilder()
            .addMust(range("category", Range.newBuilder().setEq("docs").build()))
            .build())
        .setLimit(5)
        .build()).get();

LangChain4j Integration

For RAG pipelines, use LangChain4j's high-level abstractions:

EmbeddingStore<TextSegment> embeddingStore = QdrantEmbeddingStore.builder()
    .collectionName("rag-collection")
    .host("localhost")
    .port(6334)
    .apiKey("YOUR_API_KEY")
    .build();

Spring Boot configuration with LangChain4j:

@Bean
public EmbeddingStore<TextSegment> embeddingStore() {
    return QdrantEmbeddingStore.builder()
        .collectionName("rag-collection")
        .host(host)
        .port(port)
        .build();
}

@Bean
public EmbeddingModel embeddingModel() {
    return new AllMiniLmL6V2EmbeddingModel();
}

Spring Boot Integration

Inject the client via configuration:

@Configuration
public class QdrantConfig {
    @Value("${qdrant.host:localhost}")
    private String host;

    @Value("${qdrant.port:6334}")
    private int port;

    @Bean
    public QdrantClient qdrantClient() {
        return new QdrantClient(
            QdrantGrpcClient.newBuilder(host, port, false).build());
    }
}

Examples

REST Search Endpoint

@RestController
@RequestMapping("/api/search")
public class SearchController {
    private final VectorSearchService searchService;

    public SearchController(VectorSearchService searchService) {
        this.searchService = searchService;
    }

    @GetMapping
    public List<ScoredPoint> search(@RequestParam String query) {
        List<Float> queryVector = embeddingModel.embed(query).content().vectorAsList();
        return searchService.search("documents", queryVector);
    }
}

Best Practices

  • Distance metric: Cosine for normalized text embeddings, Euclidean for non-normalized.
  • Batch upserts: Use batch operations over individual point insertions.
  • Connection pooling: Configure connection pooling for high-throughput production workloads.
  • Error handling: Wrap async operations in try/catch for ExecutionException/InterruptedException.
  • API keys: Store in environment variables or Spring config, never hardcode.

Advanced Patterns

Multi-tenant Storage

public void upsertForTenant(String tenantId, List<PointStruct> points) {
    String collectionName = "tenant_" + tenantId + "_documents";
    client.upsertAsync(collectionName, points).get();
}

Docker Compose for Production

services:
  qdrant:
    image: qdrant/qdrant:v1.7.0
    ports:
      - "6333:6333"
      - "6334:6334"
    volumes:
      - qdrant_storage:/qdrant/storage

References

Constraints and Warnings

  • Vector dimensions must match the embedding model exactly; mismatched dimensions cause upsert errors.
  • Input validation: Sanitize all document content before ingestion; untrusted payloads may contain prompt injection attacks.
  • Content filtering: Apply content filtering on retrieved documents before passing them to the LLM.
  • Large collections require proper indexing for acceptable search performance.
  • Use gRPC API (port 6334) for production; REST API (port 6333) for debugging only.
  • Collection recreation deletes all data; implement backup strategies for production environments.

Related skills

More from giuseppe-trisciuoglio/developer-kit and the wider catalog.

QWqwen-coder logo

qwen-coder

giuseppe-trisciuoglio/developer-kit

Provides Qwen Coder CLI delegation workflows for coding tasks using Qwen2.5-Coder and QwQ models, including English prompt formulation, execution flags, and safe result handling. Use when the user explicitly asks to use Qwen for tasks such as code generation, refactoring, debugging, or architectural analysis. Triggers on "use qwen", "use qwen coder", "delegate to qwen", "ask qwen", "second opinion from qwen", "qwen opinion", "continue with qwen", "qwen session".

923 installs
RArag logo

rag

giuseppe-trisciuoglio/developer-kit

Document chunking, embedding generation, and vector storage for Retrieval-Augmented Generation systems.

1.3k installs
RAralph-loop logo

ralph-loop

giuseppe-trisciuoglio/developer-kit

Ralph Wiggum-inspired automation loop for specification-driven development. Orchestrates task implementation, review, cleanup, and synchronization using a Python script. Use when: user runs /loop command, user asks to automate task implementation, user wants to iterate through spec tasks step-by-step, or user wants to run development workflow automation with context window management. One step per invocation. State machine: init → choose_task → implementation → review → fix → cleanup → sync → update_done. Supports --from-task and --to-task for task range filtering. State persisted in fix_plan.json.

936 installsAudited
REreact-code-review logo

react-code-review

giuseppe-trisciuoglio/developer-kit

Provides comprehensive code review capability for React applications, validates component architecture, hooks usage, React 19 patterns, state management, performance optimization, accessibility compliance, and TypeScript integration. Use when reviewing React code changes, before merging pull requests, after implementing new features, or for component architecture validation. Triggers on "review React code", "React code review", "check my React components".

1.2k installsAudited
REreact-patterns logo

react-patterns

giuseppe-trisciuoglio/developer-kit

React 19 patterns for Server Components, Server Actions, optimistic UI, and concurrent rendering with Next.js App Router.

2.3k installsAudited
SHshadcn-ui logo

shadcn-ui

giuseppe-trisciuoglio/developer-kit

Copy-owned, accessible React components built on Radix UI and Tailwind CSS with form validation and theming.

19k installs