Skip to content

Conversation

@thierrypdamiba
Copy link

Cookbook Pull Request

Description

This PR adds a new Qdrant OCR search notebook demonstrating how to use Qdrant vector search for OCR-based document search with Mistral AI OCR models. The notebook showcases:

  • OCR text extraction from documents with Mistral
  • Vector embeddings generation using Fastembed
  • Qdrant vector database integration for similarity search
  • Complete workflow from document processing to intelligent search

Dependencies required:

  • qdrant-client
  • mistralai
  • pillow
  • pytesseract
  • numpy
  • pandas

Type of Change

What type of PR is it?

  • New Cookbook
    • Notebook File
      • Does it work on google colab?
    • Markdown File
  • Cookbook Update
    • Code Refactoring
    • Bug Fix
  • README.md Update

  • Other (please describe):

Cookbook Checklist:

  • My code is easy to read and well structured.
  • I've tagged the versions of any dependency required.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings or errors.

  • My changes do not concern the cookbooks.

README.md Checklist

  • I've added my cookbook to the table.

  • My changes do not concern the README file.

Additional Context

This notebook provides a practical example of combining OCR capabilities with vector search for document intelligence. It demonstrates a real-world use case where users can search through scanned documents using natural language queries, making document archives more accessible and searchable.

@ravi03071991
Copy link
Collaborator

Hello @thierrypdamiba,

Thank you for the PR. I’m getting the following error when I try to open the cookbook. It seems something is missing to render the notebook. Could you please check and update the cookbook?

Screenshot 2025-08-29 at 9 19 42 AM

Fix formatting issues
Add readme for info and credentials
@thierrypdamiba
Copy link
Author

Hey Ravi, thanks for catching that. I debugged and found it was related to the widgets. Let me know if you still have any issues.

I also noticed that other folders have a readme so I added one for Qdrant.

If this format works I can submit the 2nd multimodal notebook with the same flow.

Thanks!


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.

@ravi03071991
Copy link
Collaborator

The function classify_document_type is a bit misleading, since it actually calculates similarity scores across different document types. It would be better to either rename it to something like document_type_similarity_scores, or extend the current function to take the argmax of the calculated scores and return the classification type. This change would also require updating the subsequent cells in the cookbook where the classification scores are used toward the end.

@ravi03071991
Copy link
Collaborator

Since we’re not doing any training or testing here, I think it would be better to just use the training dataset and build everything on top of it. What do you think?

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.

2 participants