Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Disclaimer: Examples contributed by the community and partners do not represent
| [Panel Integration - Chat with PDF](third_party/panel/README.md) | UI chat, demo, RAG | Panel |
| [phospho integration](third_party/phospho/cookbook_phospho_mistral_integration.ipynb) | Evaluation, Analytics | phospho |
| [pinecone_rag.ipynb](third_party/Pinecone/pinecone_rag.ipynb) | RAG | Pinecone |
| [qdrant_ocr_search.ipynb](third_party/Qdrant/qdrant_ocr_search.ipynb) | OCR, vector search | Qdrant |
| [RAG.ipynb](third_party/LlamaIndex/RAG.ipynb) | RAG | LLamaIndex |
| [RouterQueryEngine.ipynb](third_party/LlamaIndex/RouterQueryEngine.ipynb) | agent | LLamaIndex |
| [self_rag_mistral.ipynb](third_party/langchain/self_rag_mistral.ipynb) | RAG | Langchain |
Expand Down
5,880 changes: 5,880 additions & 0 deletions third_party/Qdrant/qdrant_ocr_search.ipynb

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions third_party/Qdrant/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# OCR Search with Mistral and Qdrant

This notebook demonstrates how to use **Mistral OCR** to extract text from documents, embed with **FastEmbed**, and store it in **Qdrant** for semantic search.

---

## What It Does
- Extracts text from scanned documents (PDFs, images) using Mistral OCR
- Creates embeddings of the recognized text
- Stores embeddings in Qdrant for scalable semantic search
- Lets you query with natural language and retrieve the most relevant passages

---

## Credentials

You’ll need credentials for both **Mistral** and **Qdrant**.

### Qdrant Cloud
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add details about setting up Qdrant Cloud and obtaining a Mistral API key at the beginning of the cookbook? That way, readers will have everything ready, and the flow will be smoother as they start working through it.

1. Create a cluster at [Qdrant Cloud](https://cloud.qdrant.io)
2. Generate an API key in the cluster’s **API Keys** section
3. Export both the URL and the key:
```bash
export QDRANT_URL="https://YOUR-CLUSTER-UUID.region.cloud.qdrant.io:6333"
export QDRANT_API_KEY="your_qdrant_key"
```

### Mistral
1. Sign up at [Mistral](https://mistral.ai)
2. Create an API key in the console
3. Set it as an environment variable:
```bash
export MISTRAL_API_KEY=your_mistral_key
```
---

## Setup
Install dependencies:
```bash
pip install mistralai qdrant-client python-dotenv
```

Optionally, create a `.env` file:
```bash
MISTRAL_API_KEY=your_mistral_key
QDRANT_URL=your_qdrant_url
QDRANT_API_KEY=your_qdrant_key # optional for local
```

Run the notebook in this directory to see the full workflow.

---
## Coming Soon
**Multimodal Search with Qdrant and Mistral**