Skip to content

Commit

Permalink
Add additional tutorials to OpenAI flavor docs (#10700)
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
  • Loading branch information
BenWilson2 committed Dec 20, 2023
1 parent 5da6006 commit 53690df
Show file tree
Hide file tree
Showing 6 changed files with 1,521 additions and 13 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 3 additions & 9 deletions docs/source/llms/index.rst
Expand Up @@ -244,13 +244,13 @@ Select the integration below to read the documentation on how to leverage MLflow
<section>
<div class="logo-grid">

<a href="../models.html#transformers-transformers-experimental">
<a href="transformers/index.html">
<div class="logo-card">
<img src="../_static/images/logos/huggingface-logo.svg" alt="HuggingFace Logo"/>
</div>
</a>

<a href="sentence-transformers/guide/index.html">
<a href="sentence-transformers/index.html">
<div class="logo-card">
<img src="../_static/images/logos/sentence-transformers-logo.png" alt="Sentence Transformers Logo"/>
</div>
Expand All @@ -262,7 +262,7 @@ Select the integration below to read the documentation on how to leverage MLflow
</div>
</a>

<a href="../models.html#openai-openai-experimental">
<a href="openai/index.html">
<div class="logo-card">
<img src="../_static/images/logos/openai-logo.png" alt="OpenAI Logo"/>
</div>
Expand Down Expand Up @@ -336,12 +336,6 @@ directly to our up-to-date examples on GitHub below:

:sup:`1` Demonstrates the use of Retrieval Augmented Generation (RAG) using a Vector Store

* **openai**

* `Performing Embeddings Generation <https://github.com/mlflow/mlflow/blob/master/examples/openai/embeddings.py>`_
* `Using OpenAI on a Spark DataFrame for Batch Processing <https://github.com/mlflow/mlflow/blob/master/examples/openai/spark_udf.py>`_
* `Using Azure OpenAI <https://github.com/mlflow/mlflow/blob/master/examples/openai/azure_openai.py>`_


`LLM Tracking in MLflow <llm-tracking/index.html>`_
---------------------------------------------------
Expand Down
39 changes: 36 additions & 3 deletions docs/source/llms/openai/index.rst
Expand Up @@ -110,6 +110,15 @@ Getting Started with the MLflow OpenAI Flavor - Tutorials and Guides
Below, you will find a number of guides that focus on different ways that you can leverage the power of the `openai` library, leveraging MLflow's
APIs for tracking and inference capabilities.

The diagram below shows the basic scope of the level of complexity that the tutorials cover.

.. figure:: ../../_static/images/tutorials/llms/openai-tutorials-explanation.png
:alt: MLflow OpenAI tutorials
:width: 80%
:align: center

The range of content within the tutorials for the OpenAI flavor

Introductory Tutorial
^^^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -139,9 +148,10 @@ Introductory Tutorial
Advanced Tutorials
^^^^^^^^^^^^^^^^^^

In these tutorials, the topics aren't any more advanced than the introductory tutorial, but the teaching text is much less. More code; less chatter.
In these tutorials, the topics cover applied interactions with OpenAI models, leveraging custom Python Models to enhance the functionality beyond what is
possible with the basic prompt-based interaction from the introductory tutorial.
If you're new to this flavor, please start with the Introductory Tutorial above, as it has information about environment configurations that you'll need
to understand in order to get these notebooks to work.
to understand in order to get the notebooks in this section to work.

.. raw:: html

Expand All @@ -157,6 +167,26 @@ to understand in order to get these notebooks to work.
</p>
</a>
</div>
<div class="simple-card">
<a href="notebooks/openai-code-helper.html">
<div class="header">
OpenAI Custom Python Model - Code Helper
</div>
<p>
Learn how to leverage Custom Python Models with a useful Code Helper application that leverages OpenAI Models and MLflow.
</p>
</a>
</div>
<div class="simple-card">
<a href="notebooks/openai-embeddings-generation.html">
<div class="header">
OpenAI Embeddings - Document Comparison
</div>
<p>
Explore the application of embeddings with document comparison using an OpenAI model with MLflow.
</p>
</a>
</div>
</article>
</section>

Expand All @@ -169,14 +199,17 @@ To download the advanced OpenAI tutorial notebooks to run in your environment, c
.. raw:: html

<a href="https://raw.githubusercontent.com/mlflow/mlflow/master/docs/source/llms/openai/notebooks/openai-chat-completions.ipynb" class="notebook-download-btn">Download the ChatCompletions Notebook</a><br>

<a href="https://raw.githubusercontent.com/mlflow/mlflow/master/docs/source/llms/openai/notebooks/openai-code-helper.ipynb" class="notebook-download-btn">Download the Code Helper Notebook</a><br>
<a href="https://raw.githubusercontent.com/mlflow/mlflow/master/docs/source/llms/openai/notebooks/openai-embeddings-generation.ipynb" class="notebook-download-btn">Download the Embeddings Notebook</a><br>

.. toctree::
:maxdepth: 2
:hidden:

notebooks/openai-quickstart.ipynb
notebooks/openai-chat-completions.ipynb
notebooks/openai-code-helper.ipynb
notebooks/openai-embeddings-generation.ipynb

`Detailed Documentation <guide/index.html>`_
--------------------------------------------
Expand Down
Expand Up @@ -303,7 +303,7 @@
"\n",
"Thank you for joining us in exploring the cutting-edge of conversational AI and model management. Your journey into developing AI-enhanced communication tools is just beginning, and we are excited to see where your creativity and skills will lead you next!\n",
"\n",
"Tp continue your learning journey, see the additional [advanced tutorials for MLflow's OpenAI flavor](https://www.mlflow.org/docs/latest/llms/openai/index.html#advanced-tutorials)."
"To continue your learning journey, see the additional [advanced tutorials for MLflow's OpenAI flavor](https://www.mlflow.org/docs/latest/llms/openai/index.html#advanced-tutorials)."
]
}
],
Expand Down

0 comments on commit 53690df

Please sign in to comment.