lukawskikacper/qdrant-landing-page-2024-06-21 huggingface dataset:
qdrant-landing/content/documentation/frameworks/cheshire-cat.md

---
title: Cheshire Cat
weight: 600
aliases: [ ../integrations/cheshire-cat/ ]
---

# Cheshire Cat

[Cheshire Cat](https://cheshirecat.ai/) is an open-source framework that allows you to develop intelligent agents on top of many Large Language Models (LLM). You can develop your custom AI architecture to assist you in a wide range of tasks.

![Cheshire cat](/documentation/frameworks/cheshire-cat/cat.jpg)

## Cheshire Cat and Qdrant

Cheshire Cat uses Qdrant as the default [Vector Memory](https://cheshire-cat-ai.github.io/docs/conceptual/memory/vector_memory/) for ingesting and retrieving documents.

```
# Decide host and port for your Cat. Default will be localhost:1865
CORE_HOST=localhost
CORE_PORT=1865

# Qdrant server
# QDRANT_HOST=localhost
# QDRANT_PORT=6333
```

Cheshire Cat takes great advantage of the following features of Qdrant:
* [Collection Aliases](../../concepts/collections/#collection-aliases) to manage the change from one embedder to another.
* [Quantization](../../guides/quantization/) to obtain a good balance between speed, memory usage and quality of the results.
* [Snapshots](../../concepts/snapshots/) to not miss any information.
* [Community](https://discord.com/invite/tdtYvXjC4h)

![RAG Pipeline](/documentation/frameworks/cheshire-cat/stregatto.jpg)

## How to use the Cheshire Cat

### Requirements
To run the Cheshire Cat, you need to have [Docker](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/) already installed on your system.

```shell
docker run --rm -it -p 1865:80 ghcr.io/cheshire-cat-ai/core:latest
``` 

* Chat with the Cheshire Cat on [localhost:1865/admin](http://localhost:1865/admin).
* You can also interact via REST API and try out the endpoints on [localhost:1865/docs](http://localhost:1865/docs)

Check the [instructions on github](https://github.com/cheshire-cat-ai/core/blob/main/README.md) for a more comprehensive quick start.

### First configuration of the LLM

* Open the Admin Portal in your browser at [localhost:1865/admin](http://localhost:1865/admin).
* Configure the LLM in the `Settings` tab.
* If you don't explicitly choose it using `Settings` tab, the Embedder follows the LLM.

## Next steps

For more information, refer to the Cheshire Cat [documentation](https://cheshire-cat-ai.github.io/docs/) and [blog](https://cheshirecat.ai/blog/).

* [Getting started](https://cheshirecat.ai/hello-world/)
* [How the Cat works](https://cheshirecat.ai/how-the-cat-works/)
* [Write Your First Plugin](https://cheshirecat.ai/write-your-first-plugin/)
* [Cheshire Cat's use of Qdrant - Vector Space](https://cheshirecat.ai/dont-get-lost-in-vector-space/)
* [Cheshire Cat's use of Qdrant - Aliases](https://cheshirecat.ai/the-drunken-cat-effect/)
* [Discord Community](https://discord.com/invite/bHX5sNFCYU)
qdrant-landing/content/documentation/frameworks/docarray.md

---
title: DocArray
weight: 300
aliases: [ ../integrations/docarray/ ]
---

# DocArray
You can use Qdrant natively in DocArray, where Qdrant serves as a high-performance document store to enable scalable vector search.

DocArray is a library from Jina AI for nested, unstructured data in transit, including text, image, audio, video, 3D mesh, etc.
It allows deep-learning engineers to efficiently process, embed, search, recommend, store, and transfer the data with a Pythonic API.


To install DocArray with Qdrant support, please do

```bash
pip install "docarray[qdrant]"
```

## Further Reading

- [DocArray documentations](https://docarray.jina.ai/advanced/document-store/qdrant/).
- [Source Code](https://github.com/docarray/docarray/blob/main/docarray/index/backends/qdrant.py)
qdrant-landing/content/documentation/frameworks/docsgpt.md

---
title: DocsGPT
weight: 2600
---

# DocsGPT

[DocsGPT](https://docsgpt.arc53.com/) is an open-source documentation assistant that enables you to build conversational user experiences on top of your data.

Qdrant is supported as a vectorstore in DocsGPT to ingest and semantically retrieve documents.

## Configuration

Learn how to setup DocsGPT in their [Quickstart guide](https://docs.docsgpt.co.uk/Deploying/Quickstart).

You can configure DocsGPT with environment variables in a `.env` file.

To configure DocsGPT to use Qdrant as the vector store, set `VECTOR_STORE` to `"qdrant"`.

```bash
echo "VECTOR_STORE=qdrant" >> .env
```

DocsGPT includes a list of the Qdrant configuration options that you can set as environment variables [here](https://github.com/arc53/DocsGPT/blob/00dfb07b15602319bddb95089e3dab05fac56240/application/core/settings.py#L46-L59).

## Further reading

- [DocsGPT Reference](https://github.com/arc53/DocsGPT)
qdrant-landing/content/documentation/frameworks/dspy.md

---
title: Stanford DSPy
weight: 1500
aliases: [ ../integrations/dspy/ ]
---

# Stanford DSPy

[DSPy](https://github.com/stanfordnlp/dspy) is the framework for solving advanced tasks with language models (LMs) and retrieval models (RMs). It unifies techniques for prompting and fine-tuning LMs — and approaches for reasoning, self-improvement, and augmentation with retrieval and tools.

- Provides composable and declarative modules for instructing LMs in a familiar Pythonic syntax.

- Introduces an automatic compiler that teaches LMs how to conduct the declarative steps in your program.

Qdrant can be used as a retrieval mechanism in the DSPy flow.

## Installation

For the Qdrant retrieval integration, include `dspy-ai` with the `qdrant` extra:
```bash
pip install dspy-ai[qdrant]
```

## Usage

We can configure `DSPy` settings to use the Qdrant retriever model like so:
```python
import dspy
from dspy.retrieve.qdrant_rm import QdrantRM

from qdrant_client import QdrantClient

turbo = dspy.OpenAI(model="gpt-3.5-turbo")
qdrant_client = QdrantClient()  # Defaults to a local instance at http://localhost:6333/
qdrant_retriever_model = QdrantRM("collection-name", qdrant_client, k=3)

dspy.settings.configure(lm=turbo, rm=qdrant_retriever_model)
```
Using the retriever is pretty simple. The `dspy.Retrieve(k)` module will search for the top-k passages that match a given query.

```python
retrieve = dspy.Retrieve(k=3)
question = "Some question about my data"
topK_passages = retrieve(question).passages

print(f"Top {retrieve.k} passages for question: {question} \n", "\n")

for idx, passage in enumerate(topK_passages):
    print(f"{idx+1}]", passage, "\n")
```

With Qdrant configured as the retriever for contexts, you can set up a DSPy module like so:
```python
class RAG(dspy.Module):
    def __init__(self, num_passages=3):
        super().__init__()

        self.retrieve = dspy.Retrieve(k=num_passages)
        ...

    def forward(self, question):
        context = self.retrieve(question).passages
        ...

```

With the generic RAG blueprint now in place, you can add the many interactions offered by DSPy with context retrieval powered by Qdrant.

## Next steps

- Find DSPy usage docs and examples [here](https://github.com/stanfordnlp/dspy#4-documentation--tutorials).

- [Source Code](https://github.com/stanfordnlp/dspy/blob/main/dspy/retrieve/qdrant_rm.py)
qdrant-landing/content/documentation/frameworks/fifty-one.md

---
title: FiftyOne
weight: 600
aliases: [ ../integrations/fifty-one ]
---

# FiftyOne

[FiftyOne](https://voxel51.com/) is an open-source toolkit designed to enhance computer vision workflows by optimizing dataset quality 
and providing valuable insights about your models. FiftyOne 0.20, which includes a native integration with Qdrant, supporting workflows 
like [image similarity search](https://docs.voxel51.com/user_guide/brain.html#image-similarity) and 
[text search](https://docs.voxel51.com/user_guide/brain.html#text-similarity). 

Qdrant helps FiftyOne to find the most similar images in the dataset using vector embeddings.

FiftyOne is available as a Python package that might be installed in the following way:

```bash
pip install fiftyone
```

Please check out the documentation of FiftyOne on [Qdrant integration](https://docs.voxel51.com/integrations/qdrant.html).
qdrant-landing/content/documentation/frameworks/fondant.md

---
title: Fondant
weight: 1700
aliases: [ ../integrations/fondant/ ]
---

# Fondant

[Fondant](https://fondant.ai/en/stable/) is an open-source framework that aims to simplify and speed
up large-scale data processing by making containerized components reusable across pipelines and
execution environments. Benefit from built-in features such as autoscaling, data lineage, and
pipeline caching, and deploy to (managed) platforms such as Vertex AI, Sagemaker, and Kubeflow
Pipelines.

Fondant comes with a library of reusable components that you can leverage to compose your own
pipeline, including a Qdrant component for writing embeddings to Qdrant.

## Usage

<aside role="status">
A Qdrant collection has to be <a href="/documentation/concepts/collections/">created in advance</a>
</aside>

**A data load pipeline for RAG using Qdrant**.

A simple ingestion pipeline could look like the following:

```python
import pyarrow as pa
from fondant.pipeline import Pipeline

indexing_pipeline = Pipeline(
    name="ingestion-pipeline",
    description="Pipeline to prepare and process data for building a RAG solution",
    base_path="./fondant-artifacts",
)

# An custom implemenation of a read component. 
text = indexing_pipeline.read(
    "path/to/data-source-component",
    arguments={
        # your custom arguments 
    }
)

chunks = text.apply(
    "chunk_text",
    arguments={
        "chunk_size": 512,
        "chunk_overlap": 32,
    },
)

embeddings = chunks.apply(
    "embed_text",
    arguments={
        "model_provider": "huggingface",
        "model": "all-MiniLM-L6-v2",
    },
)

embeddings.write(
    "index_qdrant",
    arguments={
        "url": "http:localhost:6333",
        "collection_name": "some-collection-name",
    },
    cache=False,
)
```

Once you have a pipeline, you can easily run it using the built-in CLI. Fondant allows
you to run the pipeline in production across different clouds.

The first component is a custom read module that needs to be implemented and cannot be used off the
shelf. A detailed tutorial on how to rebuild this
pipeline [is provided on GitHub](https://github.com/ml6team/fondant-usecase-RAG/tree/main).

## Next steps

More information about creating your own pipelines and components can be found in the [Fondant
documentation](https://fondant.ai/en/stable/).
qdrant-landing/content/documentation/frameworks/genkit.md

---
title: Firebase Genkit
weight: 3400
---

# Firebase Genkit

[Genkit](https://firebase.google.com/products/genkit) is a framework to build, deploy, and monitor production-ready AI-powered apps.

You can build apps that generate custom content, use semantic search, handle unstructured inputs, answer questions with your business data, autonomously make decisions, orchestrate tool calls, and more.

You can use Qdrant for indexing/semantic retrieval of data in your Genkit applications via the [Qdrant-Genkit plugin](https://github.com/qdrant/qdrant-genkit).

Genkit currently supports server-side development in JavaScript/TypeScript (Node.js) with Go support in active development.

## Installation

```bash
npm i genkitx-qdrant
```

## Configuration

To use this plugin, specify it when you call `configureGenkit()`:

```js
import { qdrant } from 'genkitx-qdrant';
import { textEmbeddingGecko } from '@genkit-ai/vertexai';

export default configureGenkit({
  plugins: [
    qdrant([
      {
        clientParams: {
          host: 'localhost',
          port: 6333,
        },
        collectionName: 'some-collection',
        embedder: textEmbeddingGecko,
      },
    ]),
  ],
  // ...
});
```

You'll need to specify a collection name, the embedding model you want to use and the Qdrant client parameters. In
addition, there are a few optional parameters:

- `embedderOptions`: Additional options to pass options to the embedder:

  ```js
  embedderOptions: { taskType: 'RETRIEVAL_DOCUMENT' },
  ```

- `contentPayloadKey`: Name of the payload filed with the document content. Defaults to "content".

  ```js
  contentPayloadKey: 'content';
  ```

- `metadataPayloadKey`: Name of the payload filed with the document metadata. Defaults to "metadata".

  ```js
  metadataPayloadKey: 'metadata';
  ```

- `collectionCreateOptions`: [Additional options](<(https://qdrant.tech/documentation/concepts/collections/#create-a-collection)>) when creating the Qdrant collection.

## Usage

Import retriever and indexer references like so:

```js
import { qdrantIndexerRef, qdrantRetrieverRef } from 'genkitx-qdrant';
import { Document, index, retrieve } from '@genkit-ai/ai/retriever';
```

Then, pass the references to `retrieve()` and `index()`:

```js
// To specify an indexer:
export const qdrantIndexer = qdrantIndexerRef({
  collectionName: 'some-collection',
  displayName: 'Some Collection indexer',
});

await index({ indexer: qdrantIndexer, documents });
```

```js
// To specify a retriever:
export const qdrantRetriever = qdrantRetrieverRef({
  collectionName: 'some-collection',
  displayName: 'Some Collection Retriever',
});

let docs = await retrieve({ retriever: qdrantRetriever, query });
```

You can refer to [Retrieval-augmented generation](https://firebase.google.com/docs/genkit/rag) for a general
discussion on indexers and retrievers.

## Further Reading

- [Introduction to Genkit](https://firebase.google.com/docs/genkit)
- [Genkit Documentation](https://firebase.google.com/docs/genkit/get-started)
- [Source Code](https://github.com/qdrant/qdrant-genkit)
qdrant-landing/content/documentation/frameworks/haystack.md

---
title: Haystack
weight: 400
aliases:
  - ../integrations/haystack/
  - /documentation/overview/integrations/haystack/
---

# Haystack

[Haystack](https://haystack.deepset.ai/) serves as a comprehensive NLP framework, offering a modular methodology for constructing 
cutting-edge generative AI, QA, and semantic knowledge base search systems. A critical element in contemporary NLP systems is an 
efficient database for storing and retrieving extensive text data. Vector databases excel in this role, as they house vector 
representations of text and implement effective methods for swift retrieval. Thus, we are happy to announce the integration 
with Haystack - `QdrantDocumentStore`. This document store is unique, as it is maintained externally by the Qdrant team.

The new document store comes as a separate package and can be updated independently of Haystack:

```bash
pip install qdrant-haystack
```

`QdrantDocumentStore` supports [all the configuration properties](/documentation/collections/#create-collection) available in 
the Qdrant Python client. If you want to customize the default configuration of the collection used under the hood, you can
provide that settings when you create an instance of the `QdrantDocumentStore`. For example, if you'd like to enable the
Scalar Quantization, you'd make that in the following way:

```python
from qdrant_haystack.document_stores import QdrantDocumentStore
from qdrant_client import models

document_store = QdrantDocumentStore(
    ":memory:",
    index="Document",
    embedding_dim=512,
    recreate_index=True,
    quantization_config=models.ScalarQuantization(
        scalar=models.ScalarQuantizationConfig(
            type=models.ScalarType.INT8,
            quantile=0.99,
            always_ram=True,
        ),
    ),
)
```

## Further Reading

- [Haystack Documentation](https://haystack.deepset.ai/integrations/qdrant-document-store)
- [Source Code](https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/qdrant)
qdrant-landing/content/documentation/frameworks/langchain-go.md

---
title: Langchain Go
weight: 2120
---

# Langchain Go

[Langchain Go](https://tmc.github.io/langchaingo/docs/) is a framework for developing data-aware applications powered by language models in Go.

You can use Qdrant as a vector store in Langchain Go.

## Setup

Install the `langchain-go` project dependency

```bash
go get -u github.com/tmc/langchaingo
```

## Usage

Before you use the following code sample, customize the following values for your configuration:

- `YOUR_QDRANT_REST_URL`: If you've set up Qdrant using the [Quick Start](/documentation/quick-start/) guide,
  set this value to `http://localhost:6333`.
- `YOUR_COLLECTION_NAME`: Use our [Collections](/documentation/concepts/collections/) guide to create or
  list collections.

```go
import (
        "fmt"
        "log"

        "github.com/tmc/langchaingo/embeddings"
        "github.com/tmc/langchaingo/llms/openai"
        "github.com/tmc/langchaingo/vectorstores"
        "github.com/tmc/langchaingo/vectorstores/qdrant"
)

 llm, err := openai.New()
 if err != nil {
  log.Fatal(err)
 }

 e, err := embeddings.NewEmbedder(llm)
 if err != nil {
  log.Fatal(err)
 }

 url, err := url.Parse("YOUR_QDRANT_REST_URL")
 if err != nil {
  log.Fatal(err)
 }

 store, err := qdrant.New(
  qdrant.WithURL(*url),
  qdrant.WithCollectionName("YOUR_COLLECTION_NAME"),
  qdrant.WithEmbedder(e),
 )
 if err != nil {
  log.Fatal(err)
 }
```

## Further Reading

- You can find usage examples of Langchain Go [here](https://github.com/tmc/langchaingo/tree/main/examples).

- [Source Code](https://github.com/tmc/langchaingo/tree/main/vectorstores/qdrant)
qdrant-landing/content/documentation/frameworks/langchain4j.md

---
title: Langchain4J
weight: 2110
---

# LangChain for Java

LangChain for Java, also known as [Langchain4J](https://github.com/langchain4j/langchain4j), is a community port of [Langchain](https://www.langchain.com/) for building context-aware AI applications in Java

You can use Qdrant as a vector store in Langchain4J through the [`langchain4j-qdrant`](https://central.sonatype.com/artifact/dev.langchain4j/langchain4j-qdrant) module.

## Setup

Add the `langchain4j-qdrant` to your project dependencies.

```xml
<dependency>
    <groupId>dev.langchain4j</groupId>
    <artifactId>langchain4j-qdrant</artifactId>
    <version>VERSION</version>
</dependency>
```

## Usage

Before you use the following code sample, customize the following values for your configuration:

- `YOUR_COLLECTION_NAME`: Use our [Collections](/documentation/concepts/collections/) guide to create or
  list collections.
- `YOUR_HOST_URL`: Use the GRPC URL for your system. If you used the [Quick Start](/documentation/quick-start/) guide,
  it may be http://localhost:6334. If you've deployed in the [Qdrant Cloud](/documentation/cloud/), you may have a
  longer URL such as `https://example.location.cloud.qdrant.io:6334`.
- `YOUR_API_KEY`: Substitute the API key associated with your configuration.
```java
import dev.langchain4j.store.embedding.EmbeddingStore;
import dev.langchain4j.store.embedding.qdrant.QdrantEmbeddingStore;

EmbeddingStore<TextSegment> embeddingStore =
    QdrantEmbeddingStore.builder()
        // Ensure the collection is configured with the appropriate dimensions
        // of the embedding model.
        // Reference https://qdrant.tech/documentation/concepts/collections/
        .collectionName("YOUR_COLLECTION_NAME")
        .host("YOUR_HOST_URL")
        // GRPC port of the Qdrant server
        .port(6334)
        .apiKey("YOUR_API_KEY")
        .build();
```

`QdrantEmbeddingStore` supports all the semantic features of Langchain4J. 

## Further Reading

- You can refer to the [Langchain4J examples](https://github.com/langchain4j/langchain4j-examples/) to get started.
- [Source Code](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-qdrant)
qdrant-landing/content/documentation/frameworks/llama-index.md

---
title: LlamaIndex
weight: 200
aliases:
  - ../integrations/llama-index/
  - /documentation/overview/integrations/llama-index/
---

# LlamaIndex

Llama Index acts as an interface between your external data and Large Language Models. So you can bring your 
private data and augment LLMs with it. LlamaIndex simplifies data ingestion and indexing, integrating Qdrant as a vector index.

Installing Llama Index is straightforward if we use pip as a package manager. Qdrant is not installed by default, so we need to 
install it separately. The integration of both tools also comes as another package.

```bash
pip install llama-index llama-index-vector-stores-qdrant
```

Llama Index requires providing an instance of `QdrantClient`, so it can interact with Qdrant server.

```python
from llama_index.core.indices.vector_store.base import VectorStoreIndex
from llama_index.vector_stores.qdrant import QdrantVectorStore

import qdrant_client

client = qdrant_client.QdrantClient(
    "<qdrant-url>",
    api_key="<qdrant-api-key>", # For Qdrant Cloud, None for local instance
)

vector_store = QdrantVectorStore(client=client, collection_name="documents")
index = VectorStoreIndex.from_vector_store(vector_store=vector_store)

```

## Further Reading

- [LlamaIndex Documentation](https://docs.llamaindex.ai/en/stable/examples/vector_stores/QdrantIndexDemo/)
- [Example Notebook](https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/vector_stores/QdrantIndexDemo.ipynb)
- [Source Code](https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/vector_stores/llama-index-vector-stores-qdrant)
qdrant-landing/content/documentation/frameworks/make.md

---
title: Make.com
weight: 1800
---

# Make.com

[Make](https://www.make.com/) is a platform for anyone to design, build, and automate anything—from tasks and workflows to apps and systems without code.

Find the comprehensive list of available Make apps [here](https://www.make.com/en/integrations).

Qdrant is available as an [app](https://www.make.com/en/integrations/qdrant) within Make to add to your scenarios.

![Qdrant Make hero](/documentation/frameworks/make/hero-page.png)

## Prerequisites

Before you start, make sure you have the following:

1. A Qdrant instance to connect to. You can get free cloud instance [cloud.qdrant.io](https://cloud.qdrant.io/). 
2. An account at Make.com. You can register yourself [here](https://www.make.com/en/register).

## Setting up a connection

Navigate to your scenario on the Make dashboard and select a Qdrant app module to start a connection.
![Qdrant Make connection](/documentation/frameworks/make/connection.png)

You can now establish a connection to Qdrant using your [instance credentials](/documentation/cloud/authentication/).

![Qdrant Make form](/documentation/frameworks/make/connection-form.png)

## Modules
 
 Modules represent actions that Make performs with an app. 

The Qdrant Make app enables you to trigger the following app modules.
![Qdrant Make modules](/documentation/frameworks/make/modules.png)

The modules support mapping to connect the data retrieved by one module to another module to perform the desired action. You can read more about the data processing options available for the modules in the [Make reference](https://www.make.com/en/help/modules).

## Next steps

- Find a list of Make workflow templates to connect with Qdrant [here](https://www.make.com/en/templates).

- Make scenario reference docs can be found [here](https://www.make.com/en/help/scenarios).