openai-cookbook icon indicating copy to clipboard operation
openai-cookbook copied to clipboard

Vector Databse Milvus Tutorial Migrated to Higher-Level MilvusClient SDK

Open jinhonglin-ryan opened this issue 1 year ago • 3 comments
trafficstars

Summary

Migrate Milvus database interaction from a low-level ORM SDK to the higher-level MilvusClient SDK. The goal is to streamline operations, improve code readability, and simplify maintenance by utilizing MilvusClient's higher-level abstractions.

Motivation

The changes in this PR make our codebase more efficient and reduce complexity by switching to MilvusClient. This transition enables us to streamline the embedding and querying process for datasets such as movie descriptions (with metadata filtering) and book descriptions (simple retrieval), aligning our codebase with current best practices and making it easier for developers to extend and maintain.

Getting Started with Milvus and OpenAI: Introduces the use of Milvus for embedding-based search on book descriptions, embedding the descriptions with OpenAI and storing them for retrieval in Milvus.

Filtered Search with Milvus and OpenAI: Demonstrates how to use Milvus for vector similarity search on movie descriptions, utilizing OpenAI embeddings and Milvus's filtering capabilities.


For new content

When contributing new content, read through our contribution guidelines, and mark the following action items as completed:

  • [ ✅ ] I have added a new entry in registry.yaml (and, optionally, in authors.yaml) so that my content renders on the cookbook website.
  • [ ✅ ] I have conducted a self-review of my content based on the contribution guidelines:
    • [ ✅ ] Relevance: This content is related to building with OpenAI technologies and is useful to others.
    • [ ✅ ] Uniqueness: I have searched for related examples in the OpenAI Cookbook, and verified that my content offers new insights or unique information compared to existing documentation.
    • [ ✅ ] Spelling and Grammar: I have checked for spelling or grammatical mistakes.
    • [ ✅ ] Clarity: I have done a final read-through and verified that my submission is well-organized and easy to understand.
    • [ ✅ ] Correctness: The information I include is correct and all of my code executes successfully.
    • [ ✅ ] Completeness: I have explained everything fully, including all necessary references and citations.

We will rate each of these areas on a scale from 1 to 4, and will only accept contributions that score 3 or higher on all areas. Refer to our contribution guidelines for more details.

jinhonglin-ryan avatar Nov 01 '24 14:11 jinhonglin-ryan

Yes. Milvus currently recommends using the MilvusClient SDK , e.g.https://milvus.io/docs/build-rag-with-milvus.md#Load-data-into-Milvus . So it's a good update.

zc277584121 avatar Nov 02 '24 01:11 zc277584121

Hi @ericning-o, @pap-openai, @shyamal-anadkat,

I wanted to check in on this pull request to see if there’s any additional context or adjustments I could provide to streamline the review process. Please let me know if I’ve missed anything or if you have any feedback—I’d be happy to make any necessary updates promptly.

Thank you for your time and consideration!

jinhonglin-ryan avatar Nov 06 '24 03:11 jinhonglin-ryan

hello, @joecasson-openai, @msingh-openai, can you please take a review?

zc277584121 avatar Nov 12 '24 02:11 zc277584121

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar Jan 12 '25 02:01 github-actions[bot]

This PR was closed because it has been stalled for 10 days with no activity.

github-actions[bot] avatar Jan 23 '25 02:01 github-actions[bot]