{"id":12888,"date":"2024-09-04T14:48:17","date_gmt":"2024-09-04T12:48:17","guid":{"rendered":"https:\/\/flaven.fr\/?p=12888"},"modified":"2026-09-16T10:08:45","modified_gmt":"2026-09-16T08:08:45","slug":"enhance-llm-prompt-quality-and-results-with-mlflow-integration","status":"publish","type":"post","link":"https:\/\/flaven.fr\/2024\/09\/enhance-llm-prompt-quality-and-results-with-mlflow-integration\/","title":{"rendered":"Enhance LLM Prompt Quality and Results with MLflow Integration"},"content":{"rendered":"<p>I remain mostly an AI user and moreover without always understanding the subtleties of LMMs. This use does not prevent me from seeking to improve the results of my prompts.<\/p>\n<h2>IA: Moving From POC To Scaling<\/h2>\n<p>The title above summarizes the state I am in! Indeed, the time of discovering AI and POCs is over, but how do we enter this phase of rationalization and industrialization? Once the exploratory phase is over, it remains to structure and rationalize the approach, to measure the quality of the results produced by the prompts.<\/p>\n<p><b>For this post also, you can find all files and prompts, on my GitHub account. See <a href=\"https:\/\/github.com\/bflaven\/ia_usages\/tree\/main\/ia_using_mlflow\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/bflaven\/ia_usages\/tree\/main\/ia_using_mlflow<\/a><\/b><\/p>\n<p>Just for the record, in a corporate manner, I ask ChatGPT to explain to me more precisely the meaning. Here is the explanation:<\/p>\n<blockquote><p>The title &#8220;IA: Moving From POC To Scaling&#8221; describes a phase in AI project development where an AI solution that has successfully passed the Proof of Concept (POC) stage is now being prepared for scaling, meaning it will be expanded and deployed on a larger scale for widespread use. The transition requires careful planning and execution to ensure that the AI system can operate efficiently at a larger scale. This transition from POC to scaling is often seen as a critical milestone in AI development, where a project moves from testing feasibility to real-world implementation and growth.&#8221;<\/p><\/blockquote>\n<p>Concretely, this doesn&#8217;t say much about what should be done&#8230; But I tried to understand how to take advantage of the latest &#8220;using Prompt Engineering&#8221; feature of MLflow.<\/p>\n<p>Why that because, this MLflow&#8217;s feature allows you to track LLM responses across different settings of model temperature, max output tokens and of course prompts. This allows for transparent prompt engineering and parameter tuning&#8230; And above all you can also leverage on self-hosted LLMs on Ollama!<\/p>\n<p>Mostly, I use Ollama to operate open-source LLMs to have extensive control over the confidentiality of the content sent to the LLMs and to reduce drastically the expenses.<\/p>\n<p>I also ended up finding a video and plenty of documentation from Mlflow.<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/djliden\/llmops-examples\/blob\/main\/mlflow-compare-llms.ipynb\" target=\"_blank\" rel=\"noopener\"> A very educational notebook that fully describes the process of &#8220;Comparing LLMs with MLFlow&#8221;.<\/a> Like it is said by the author &#8220;This notebook demonstrates how to use MLFlow to compare different text generation models from Hugging Face and compare different generation configurations for those models.&#8221;<\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=tRv8fmlvZ1w\" target=\"_blank\" rel=\"noopener\">MLflow: serving LLMs and prompt engineering<\/a><\/li>\n<li><a href=\"https:\/\/mlflow.org\/docs\/latest\/llms\/deployments\/guides\/step1-create-deployments.html\" target=\"_blank\" rel=\"noopener\">MLflow\u2019s Support for LLMs<\/a>. Nothing less than &#8220;aims to alleviate these challenges by introducing a suite of features and tools designed with the end-user in mind&#8221;<\/li>\n<\/ul>\n<p>Concretely, to make MLflow work with LLMs, it is necessary to complete the &#8220;Served LLM model&#8221; of MLflow to test indifferently open source or paid LLMs by declaring them within MLflow.<\/p>\n<p><i>The the main obstacle was to add &#8220;item&#8221; in &#8220;Served LLM model&#8221; in MLflow dropdown list.<\/i><\/p>\n<p><b>Screen captures from Daniel Liden djliden that show how to leverage on the MLflow&#8217;s &#8220;using Prompt Engineering&#8221; feature<\/b>. Check <a href=\"https:\/\/github.com\/djliden\/llmops-examples\/tree\/main\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/djliden\/llmops-examples\/tree\/main<\/a><\/p>\n<p><img width=\"600\" height=\"507\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2024\/09\/tuto_mlflow_1.png\" alt=\"Enhance LLM Prompt Quality and Results with MLflow Integration\" decoding=\"async\" fetchpriority=\"high\"><br \/><i>Screen capture from Daniel Liden djliden<\/i><\/p>\n<p><img width=\"600\" height=\"507\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2024\/09\/tuto_mlflow_2.png\" alt=\"Enhance LLM Prompt Quality and Results with MLflow Integration\" decoding=\"async\" fetchpriority=\"high\"><br \/><i>Screen capture from Daniel Liden djliden<\/i><\/p>\n<p><img width=\"600\" height=\"507\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2024\/09\/tuto_mlflow_3.png\" alt=\"Enhance LLM Prompt Quality and Results with MLflow Integration\" decoding=\"async\" fetchpriority=\"high\"><br \/><i>Screen capture from Daniel Liden djliden<\/i><\/p>\n<p><img width=\"600\" height=\"507\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2024\/09\/tuto_mlflow_4.png\" alt=\"Enhance LLM Prompt Quality and Results with MLflow Integration\" decoding=\"async\" fetchpriority=\"high\"><br \/><i>Screen capture from Daniel Liden djliden<\/i><\/p>\n<pre>\r\n# mlflow_prompt_eng_ui_assets\/config.yaml\r\n# https:\/\/github.com\/djliden\/llmops-examples\/blob\/00b42c7ec0f7e5914bf77966e84ddbfe02230e18\/mlflow_prompt_eng_ui_assets\/config.yaml\r\n# https:\/\/mlflow.org\/docs\/latest\/llms\/gateway\/migration.html\r\n# https:\/\/github.com\/minkj1992\/llama3-langchain-mlflow\/blob\/main\/mlflow\/config.yaml\r\n\r\nendpoints:  # Renamed to \"endpoints\"\r\n  - name: chat\r\n    endpoint_type: llm\/v1\/chat  # Renamed to \"endpoint_type\"\r\n    model:\r\n      provider: openai\r\n      name: gpt-3.5-turbo\r\n      config:\r\n        openai_api_key: $OPENAI_API_KEY\r\n  - name: ollama\r\n    endpoint_type: llm\/v1\/chat\r\n    model:\r\n      provider: openai\r\n      name: llama3\r\n      config:\r\n        openai_api_key: \"\"\r\n        # https:\/\/ollama.com\/blog\/openai-compatibility\r\n        openai_api_base: http:\/\/host.docker.internal:11434\/v1\r\n<\/pre>\n<p>At the same time, it was necessary to familiarize oneself with how MLflow works. Indeed, given MLflow&#8217;s ability to create many experiments and runs, it is better to question a priori the tagging and search capacities and therefore the classification of MLflow to take full advantage of the organization induced by MLflow.<\/p>\n<p><b>Searching By Params<\/b><\/p>\n<pre>\r\nparams.batch_size = \"2\"\r\nparams.model LIKE \"GPT%\"\r\nparams.model ILIKE \"gPt%\"\r\nparams.model LIKE \"GPT%\" AND params.batch_size = \"2\"\r\n<\/pre>\n<p><b>Searching By Tags<\/b><\/p>\n<pre>\r\ntags.\"environment\" = \"notebook\"\r\ntags.environment = \"notebook\"\r\ntags.task = \"Classification\"\r\ntags.task ILIKE \"classif%\"\r\n<\/pre>\n<pre>\r\nparams.model_route LIKE \"%mistral-ollama%\"\r\nparams.model_route LIKE \"%gpt4o-azure%\"\r\nparams.model_route LIKE \"%openhermes-ollama%\"\r\ntags.nid like \"%MZ344252%\"\r\n<\/pre>\n<p>Source: <a href=\"https:\/\/mlflow.org\/docs\/latest\/search-runs.html\" target=\"_blank\" rel=\"noopener\">https:\/\/mlflow.org\/docs\/latest\/search-runs.html<\/a><\/p>\n<h2>A good introduction to MLFlow features<\/h2>\n<p>If you are looking for a complete and easy introduction to MLFlow on how it works in general. Here is a practical introduction to MLFlow to understand its essential concepts. Unfortunately, the &#8220;using Prompt Engineering&#8221; feature is not covered by this video series.<\/p>\n<p>This 32 videos&#8217; playlist, made by Manuel Gil, illustrate the main concepts of MLflow <\/p>\n<p><a href=\"https:\/\/www.youtube.com\/playlist?list=PLQqR_3C2fhUUkoXAcomOxcvfPwRn90U-g\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/playlist?list=PLQqR_3C2fhUUkoXAcomOxcvfPwRn90U-g<\/a><\/p>\n<pre>\r\n# A. INSTALL MLFLOW \r\n# 1. create a anaconda env named using_mlflow\r\n\r\n# Conda Environment\r\nconda create --name using_mlflow python=3.9.13\r\nconda info --envs\r\nsource activate using_mlflow\r\nconda deactivate\r\nsource activate using_mlflow\r\n\r\n# if needed to remove\r\nconda env remove -n [NAME_OF_THE_CONDA_ENVIRONMENT]\r\nconda env remove -n using_mlflow\r\n\r\n# 2. Install MLflow from PyPI using pip:\r\npip install mlflow\r\n\r\n# test the install\r\nmlflow --version\r\n\r\n# B. CREATING EXPERIMENTS IN MLFLOW\r\n# launch the UI\r\nmlflow ui\r\n\r\n# Check http:\/\/127.0.0.1:5000\r\n<\/pre>\n<h2>Collateral discoveries<\/h2>\n<p><b>1. Using Pydantic to control LLM output<\/b><br \/>\nAlong the way, another area of improvement is the use of Pydantic to validate the generative AI JSON output format. Indeed, if you want to integrate this JSON response into an API or a webapp, it is better to ensure the validity and consistency of this response.<\/p>\n<p>Source: <a href=\"https:\/\/medium.com\/@mattchinnock\/controlling-large-language-model-output-with-pydantic-74b2af5e79d1\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/@mattchinnock\/controlling-large-language-model-output-with-pydantic-74b2af5e79d1<\/a><\/p>\n<p><b>2. Using Crewai<\/b><br \/>\nDuring this exploration, I discovered Crewai and also connect to my LLMs Ollama operated system.<\/p>\n<p>Source: <a href=\"https:\/\/docs.crewai.com\/\n\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.crewai.com\/<\/a><\/p>\n<pre>\r\n# for the examples available in github, it was required to downgrade crewai to 0.10.0\r\n# From crewai 0.51.1 to crewai 0.10.0\r\npip install crewai==0.10.0\r\n\r\n<\/pre>\n<p><b>3. Anythingllm<\/b><br \/>\nIt is worth mentioning this project &#8220;Anythingllm&#8221; which presents itself as a &#8220;all-in-one AI application that can do RAG, AI Agents, and much more with no code or infrastructure headaches&#8221;.<\/p>\n<p>It is possible to install it in three diverse ways in Desktop mode, via Docker or finally via Homebrew.<\/p>\n<p>Once installed in Desktop mode for example, which nevertheless requires 5GB of Storage, it is possible to connect to Ollama for instance locally via the Anythingllm settings and leverage on self-hosted llms provided by Ollama e.g phi3.5, openhermes, mistral-openorca, zephyr, orca-mini&#8230; etc <\/p>\n<p>Source: <a href=\"https:\/\/docs.anythingllm.com\/setup\/llm-configuration\/local\/ollama\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.anythingllm.com\/setup\/llm-configuration\/local\/ollama<\/a><\/p>\n<p>Source: <a href=\"https:\/\/anythingllm.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/anythingllm.com\/<\/a><\/p>\n<p>For model available, check <a href=\"https:\/\/ollama.com\/library?sort=popular\" target=\"_blank\" rel=\"noopener\">https:\/\/anythingllm.com\/<\/a> <\/p>\n<p><H2>More infos<\/H2><\/p>\n<p><H3>MLflow<\/H3><\/p>\n<ul>\n<li>MLFlow: A Quickstart Guide &#8211; YouTube<br \/><a href=\"https:\/\/www.youtube.com\/watch?v=cjeCAoW83_U\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/watch?v=cjeCAoW83_U<\/a><\/li>\n<li>01. Introduction To MLflow | Track Your Machine Learning Experiments | MLOps &#8211; YouTube<br \/><a href=\"https:\/\/www.youtube.com\/watch?v=ksYIVDue8ak\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/watch?v=ksYIVDue8ak<\/a><\/li>\n<li>MLflow for Machine Learning Development &#8211; YouTube<br \/><a href=\"https:\/\/www.youtube.com\/playlist?list=PLQqR_3C2fhUUkoXAcomOxcvfPwRn90U-g\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/playlist?list=PLQqR_3C2fhUUkoXAcomOxcvfPwRn90U-g<\/a><\/li>\n<li>GitHub &#8211; manuelgilm\/mlflow_for_ml_dev: Repository with code examples of mlflow<br \/><a href=\"https:\/\/github.com\/manuelgilm\/mlflow_for_ml_dev\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/manuelgilm\/mlflow_for_ml_dev<\/a><\/li>\n<li>Advancements in Open Source LLM Tooling, Including MLflow &#8211; YouTube<br \/><a href=\"https:\/\/www.youtube.com\/watch?v=WpudXKAZQNI\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/watch?v=WpudXKAZQNI<\/a><\/li>\n<li>MLflow LLM Evaluate<br \/><a href=\"https:\/\/mlflow.org\/docs\/latest\/llms\/llm-evaluate\/index.html\" target=\"_blank\" rel=\"noopener\">https:\/\/mlflow.org\/docs\/latest\/llms\/llm-evaluate\/index.html<\/a><\/li>\n<li>mlflow\/examples\/evaluation at master \u00b7 mlflow\/mlflow \u00b7 GitHub<br \/><a href=\"https:\/\/github.com\/mlflow\/mlflow\/tree\/master\/examples\/evaluation\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/mlflow\/mlflow\/tree\/master\/examples\/evaluation<\/a><\/li>\n<li>Announcing MLflow 2.4 for LLMOps | Databricks Blog<br \/><a href=\"https:\/\/www.databricks.com\/blog\/announcing-mlflow-24-llmops-tools-robust-model-evaluation\" target=\"_blank\" rel=\"noopener\">https:\/\/www.databricks.com\/blog\/announcing-mlflow-24-llmops-tools-robust-model-evaluation<\/a><\/li>\n<li>MLflow | &#xfe0f; LangChain<br \/><a href=\"https:\/\/python.langchain.com\/v0.2\/docs\/integrations\/providers\/mlflow_tracking\/\" target=\"_blank\" rel=\"noopener\">https:\/\/python.langchain.com\/v0.2\/docs\/integrations\/providers\/mlflow_tracking\/<\/a><\/li>\n<li>GitHub &#8211; Netflix\/metaflow: :rocket: Build and manage real-life ML, AI, and data science projects with ease!<br \/><a href=\"https:\/\/github.com\/Netflix\/metaflow\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/Netflix\/metaflow<\/a><\/li>\n<li>llmops-examples\/compare-openai-transformers.ipynb at main \u00b7 djliden\/llmops-examples \u00b7 GitHub<br \/><a href=\"https:\/\/github.com\/djliden\/llmops-examples\/blob\/main\/compare-openai-transformers.ipynb\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/djliden\/llmops-examples\/blob\/main\/compare-openai-transformers.ipynb<\/a><\/li>\n<li>llmops-examples\/mlflow-prompt-eng-ui.ipynb at main \u00b7 djliden\/llmops-examples \u00b7 GitHub<br \/><a href=\"https:\/\/github.com\/djliden\/llmops-examples\/blob\/main\/mlflow-prompt-eng-ui.ipynb\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/djliden\/llmops-examples\/blob\/main\/mlflow-prompt-eng-ui.ipynb<\/a><\/li>\n<li>LLM_Notebooks\/mlflow\/Deployment_Server\/mlflow_Serve.ipynb at 66d4b3a6d9d08813bb94ea653fd59275e66c91cc \u00b7 olonok69\/LLM_Notebooks \u00b7 GitHub<br \/><a href=\"https:\/\/github.com\/olonok69\/LLM_Notebooks\/blob\/66d4b3a6d9d08813bb94ea653fd59275e66c91cc\/mlflow\/Deployment_Server\/mlflow_Serve.ipynb#L23\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/olonok69\/LLM_Notebooks\/blob\/66d4b3a6d9d08813bb94ea653fd59275e66c91cc\/mlflow\/Deployment_Server\/mlflow_Serve.ipynb#L23<\/a><\/li>\n<li>GitHub &#8211; djliden\/llmops-examples: Example code and notebooks related to mlflow, llmops, etc.<br \/><a href=\"https:\/\/github.com\/djliden\/llmops-examples\/tree\/main\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/djliden\/llmops-examples\/tree\/main<\/a><\/li>\n<li>Comparing LLMs with MLFlow | Medium<br \/><a href=\"https:\/\/medium.com\/@dliden\/comparing-llms-with-mlflow-1c69553718df\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/@dliden\/comparing-llms-with-mlflow-1c69553718df<\/a><\/li>\n<li>LangChain within MLflow (Experimental)<br \/><a href=\"https:\/\/mlflow.org\/docs\/latest\/llms\/langchain\/guide\/index.html\" target=\"_blank\" rel=\"noopener\">https:\/\/mlflow.org\/docs\/latest\/llms\/langchain\/guide\/index.html<\/a><\/li>\n<li>Evaluate a Hugging Face LLM with mlflow.evaluate()<br \/><a href=\"https:\/\/mlflow.org\/docs\/latest\/llms\/llm-evaluate\/notebooks\/huggingface-evaluation.html\" target=\"_blank\" rel=\"noopener\">https:\/\/mlflow.org\/docs\/latest\/llms\/llm-evaluate\/notebooks\/huggingface-evaluation.html<\/a><\/li>\n<li>Prompt Engineering UI (Experimental)<br \/><a href=\"https:\/\/mlflow.org\/docs\/latest\/llms\/prompt-engineering\/index.html\" target=\"_blank\" rel=\"noopener\">https:\/\/mlflow.org\/docs\/latest\/llms\/prompt-engineering\/index.html<\/a><\/li>\n<li>Practical-Deep-Learning-at-Scale-with-MLFlow\/chapter01 at main \u00b7 PacktPublishing\/Practical-Deep-Learning-at-Scale-with-MLFlow \u00b7 GitHub<br \/><a href=\"https:\/\/github.com\/PacktPublishing\/Practical-Deep-Learning-at-Scale-with-MLFlow\/tree\/main\/chapter01\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/PacktPublishing\/Practical-Deep-Learning-at-Scale-with-MLFlow\/tree\/main\/chapter01<\/a><\/li>\n<li>How to create a deep learning inference pipeline model using MLflow in three steps | by Yong Liu | Medium<br \/><a href=\"https:\/\/medium.com\/@yong.liu_60428\/how-to-create-a-deep-learning-inference-pipeline-model-using-mlflow-in-three-steps-a567c534d751\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/@yong.liu_60428\/how-to-create-a-deep-learning-inference-pipeline-model-using-mlflow-in-three-steps-a567c534d751<\/a><\/li>\n<li>Comparing LLMs with MLFlow | Medium<br \/><a href=\"https:\/\/medium.com\/@dliden\/comparing-llms-with-mlflow-1c69553718df\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/@dliden\/comparing-llms-with-mlflow-1c69553718df<\/a><\/li>\n<li>MLflow Deployments for LLMs | &#xfe0f; LangChain<br \/><a href=\"https:\/\/python.langchain.com\/v0.2\/docs\/integrations\/providers\/mlflow\/\" target=\"_blank\" rel=\"noopener\">https:\/\/python.langchain.com\/v0.2\/docs\/integrations\/providers\/mlflow\/<\/a><\/li>\n<li>Just a moment&#8230;<br \/><a href=\"https:\/\/www.datacamp.com\/tutorial\/mlflow-streamline-machine-learning-workflow\" target=\"_blank\" rel=\"noopener\">https:\/\/www.datacamp.com\/tutorial\/mlflow-streamline-machine-learning-workflow<\/a><\/li>\n<li>Exploring MLflow experiments with a powerful UI | by Gor Arakelyan | AimStack | Medium<br \/><a href=\"https:\/\/medium.com\/aimstack\/exploring-mlflow-experiments-with-a-powerful-ui-238fa2acf89e\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/aimstack\/exploring-mlflow-experiments-with-a-powerful-ui-238fa2acf89e<\/a><\/li>\n<li>Quickstart: Install MLflow, instrument code &#038; view results in minutes \u2014 MLflow 2.7.0 documentation<br \/><a href=\"https:\/\/mlflow.org\/docs\/2.7.0\/quickstart.html\" target=\"_blank\" rel=\"noopener\">https:\/\/mlflow.org\/docs\/2.7.0\/quickstart.html<\/a><\/li>\n<li>Quickstart: Compare runs, choose a model, and deploy it to a REST API \u2014 MLflow 2.7.0 documentation<br \/><a href=\"https:\/\/mlflow.org\/docs\/2.7.0\/quickstart_mlops.html#quickstart-mlops\" target=\"_blank\" rel=\"noopener\">https:\/\/mlflow.org\/docs\/2.7.0\/quickstart_mlops.html#quickstart-mlops<\/a><\/li>\n<li>Tutorials and Examples \u2014 MLflow 2.7.0 documentation<br \/><a href=\"https:\/\/mlflow.org\/docs\/2.7.0\/tutorials-and-examples\/index.html#tutorials-and-examples\" target=\"_blank\" rel=\"noopener\">https:\/\/mlflow.org\/docs\/2.7.0\/tutorials-and-examples\/index.html#tutorials-and-examples<\/a><\/li>\n<li>Streamlining Text Classification Models with MLflow: A Comprehensive Guide | by Vasista Reddy | ScrapeHero | Medium<br \/><a href=\"https:\/\/medium.com\/scrapehero\/streamlining-text-classification-models-with-mlflow-a-comprehensive-guide-6cc3ce71ed90\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/scrapehero\/streamlining-text-classification-models-with-mlflow-a-comprehensive-guide-6cc3ce71ed90<\/a><\/li>\n<li>GitHub &#8211; adamksiezyk\/data-science-workbench at mlflow-local-llm<br \/><a href=\"https:\/\/github.com\/adamksiezyk\/data-science-workbench\/tree\/mlflow-local-llm\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/adamksiezyk\/data-science-workbench\/tree\/mlflow-local-llm<\/a><\/li>\n<li>Evaluating &#038; Tracking LLMs using MLflow Model Evaluation &#038; Phoenix -part-2 | by M K Pavan Kumar |  . | Medium<br \/><a href=\"https:\/\/medium.com\/aimonks\/evaluating-tracking-llms-using-mlflow-model-evaluation-phoenix-part-2-1830b3177abe\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/aimonks\/evaluating-tracking-llms-using-mlflow-model-evaluation-phoenix-part-2-1830b3177abe<\/a><\/li>\n<li>Model Tracking with MLFlow &#038; Deployment with FastAPI | Analytics Vidhya<br \/><a href=\"https:\/\/medium.com\/analytics-vidhya\/fundamentals-of-mlops-part-4-tracking-with-mlflow-deployment-with-fastapi-61614115436\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/analytics-vidhya\/fundamentals-of-mlops-part-4-tracking-with-mlflow-deployment-with-fastapi-61614115436<\/a><\/li>\n<\/ul>\n<p><H3>AnythingLLM<\/H3><\/p>\n<ul>\n<li>AnythingLLM | The all-in-one AI application for everyone<br \/><a href=\"https:\/\/anythingllm.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/anythingllm.com\/<\/a><\/li>\n<\/ul>\n<p><H3>crewAI<\/H3><\/p>\n<ul>\n<li>crewAI<br \/><a href=\"https:\/\/docs.crewai.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.crewai.com\/<\/a><\/li>\n<li>crewAI &#8211; Platform for Multi AI Agents Systems<br \/><a href=\"https:\/\/www.crewai.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.crewai.com\/<\/a><\/li>\n<li>GitHub &#8211; brooklynb7\/lang-ollama at 1c459019ab49414107a9f820cf1dd53750c3fa76<br \/><a href=\"https:\/\/github.com\/brooklynb7\/lang-ollama\/tree\/1c459019ab49414107a9f820cf1dd53750c3fa76\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/brooklynb7\/lang-ollama\/tree\/1c459019ab49414107a9f820cf1dd53750c3fa76<\/a><\/li>\n<li>CrewAI Tutorial &#8211; Next Generation AI Agent Teams (Fully Local) &#8211; YouTube<br \/><a href=\"https:\/\/www.youtube.com\/watch?v=tnejrr-0a94\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/watch?v=tnejrr-0a94<\/a><\/li>\n<li>GitHub &#8211; crewAIInc\/crewAI: Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.<br \/><a href=\"https:\/\/github.com\/crewAIInc\/crewAI\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/crewAIInc\/crewAI<\/a><\/li>\n<li>CrewAI Tutorial &#8211; Next Generation AI Agent Teams (Fully Local) &#8211; YouTube<br \/><a href=\"https:\/\/www.youtube.com\/watch?v=tnejrr-0a94\" target=\"_blank\" rel=\"noopener\">https:\/\/www.youtube.com\/watch?v=tnejrr-0a94<\/a><\/li>\n<li>Search on &#8220;from crewai import Agent, Task, Crew ollama&#8221; on github<br \/><a href=\"https:\/\/github.com\/search?q=from+crewai+import+Agent%2C+Task%2C+Crew+ollama&#038;type=code\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/search?q=from+crewai+import+Agent%2C+Task%2C+Crew+ollama&#038;type=code<\/a><\/li>\n<\/ul>\n<p><H3>Pydantic<\/H3><\/p>\n<ul>\n<li>Minimize LLM Hallucinations with Pydantic Validators | Pydantic<br \/><a href=\"https:\/\/pydantic.dev\/articles\/llm-validation\" target=\"_blank\" rel=\"noopener\">https:\/\/pydantic.dev\/articles\/llm-validation<\/a><\/li>\n<li>Enforce and Validate LLM Output with Pydantic | Timo&#8217;s Blog<br \/><a href=\"https:\/\/timotk.github.io\/posts\/enforce-validate-llm-output-pydantic\/\" target=\"_blank\" rel=\"noopener\">https:\/\/timotk.github.io\/posts\/enforce-validate-llm-output-pydantic\/<\/a><\/li>\n<li>Pydantic and Prompt Engineering: The Essentials for Validating Large Language Model Outputs | by Aziz Ben Othman | Medium<br \/><a href=\"https:\/\/medium.com\/@azizbenothman76\/pydantic-and-prompt-engineering-the-essentials-for-validating-language-model-outputs-e48553eb4a3b\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/@azizbenothman76\/pydantic-and-prompt-engineering-the-essentials-for-validating-language-model-outputs-e48553eb4a3b<\/a><\/li>\n<li>How to return structured data from a model | &#xfe0f; LangChain<br \/><a href=\"https:\/\/python.langchain.com\/v0.2\/docs\/how_to\/structured_output\/\" target=\"_blank\" rel=\"noopener\">https:\/\/python.langchain.com\/v0.2\/docs\/how_to\/structured_output\/<\/a><\/li>\n<li>Tutorial Overview<br \/><a href=\"https:\/\/mlflow.org\/docs\/latest\/getting-started\/logging-first-model\/index.html\" target=\"_blank\" rel=\"noopener\">https:\/\/mlflow.org\/docs\/latest\/getting-started\/logging-first-model\/index.html<\/a><\/li>\n<li>A Gentle Introduction to MLOps  | Analytics Vidhya<br \/><a href=\"https:\/\/medium.com\/analytics-vidhya\/fundamentals-of-mlops-part-1-a-gentle-introduction-to-mlops-1b184d2c32a8\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/analytics-vidhya\/fundamentals-of-mlops-part-1-a-gentle-introduction-to-mlops-1b184d2c32a8<\/a><\/li>\n<li>Data &#038; Model Management with DVC | Analytics Vidhya<br \/><a href=\"https:\/\/medium.com\/analytics-vidhya\/fundamentals-of-mlops-part-2-data-model-management-with-dvc-6be2ad284ec4\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/analytics-vidhya\/fundamentals-of-mlops-part-2-data-model-management-with-dvc-6be2ad284ec4<\/a><\/li>\n<li>ML Experimentation using PyCaret | Analytics Vidhya<br \/><a href=\"https:\/\/medium.com\/analytics-vidhya\/fundamentals-of-mlops-part-3-ml-experimentation-using-pycaret-747f14e4c28d\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/analytics-vidhya\/fundamentals-of-mlops-part-3-ml-experimentation-using-pycaret-747f14e4c28d<\/a><\/li>\n<li>Model Tracking with MLFlow &#038; Deployment with FastAPI | Analytics Vidhya<br \/><a href=\"https:\/\/medium.com\/analytics-vidhya\/fundamentals-of-mlops-part-4-tracking-with-mlflow-deployment-with-fastapi-61614115436\" target=\"_blank\" rel=\"noopener\">https:\/\/medium.com\/analytics-vidhya\/fundamentals-of-mlops-part-4-tracking-with-mlflow-deployment-with-fastapi-61614115436<\/a><\/li>\n<\/ul>\n<p><H3>Other<\/H3><\/p>\n<ul>\n<!-- other --><\/p>\n<li>GitHub &#8211; cric96\/langchain-examples: Basic examples of prompt engineering leveraging langchain: https:\/\/www.langchain.com\/<br \/><a href=\"https:\/\/github.com\/cric96\/langchain-examples\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/cric96\/langchain-examples<\/a><\/li>\n<li>Deploy a local LLM | RAGFlow<br \/><a href=\"https:\/\/ragflow.io\/docs\/dev\/deploy_local_llm\" target=\"_blank\" rel=\"noopener\">https:\/\/ragflow.io\/docs\/dev\/deploy_local_llm<\/a><\/li>\n<li>teknium\/OpenHermes-2.5-Mistral-7B \u00b7 Hugging Face<br \/><a href=\"https:\/\/huggingface.co\/teknium\/OpenHermes-2.5-Mistral-7B\" target=\"_blank\" rel=\"noopener\">https:\/\/huggingface.co\/teknium\/OpenHermes-2.5-Mistral-7B<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I remain mostly an AI user and moreover without always understanding the subtleties of LMMs. This use does not prevent me from seeking to improve&hellip; <\/p>\n<p class=\"text-center\"><a href=\"https:\/\/flaven.fr\/2024\/09\/enhance-llm-prompt-quality-and-results-with-mlflow-integration\/\" class=\"more-link\">Continue reading &rarr; <span class=\"screen-reader-text\">Enhance LLM Prompt Quality and Results with MLflow Integration<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":12892,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"bf_ai_meta_description":"Improve LLM prompt results with MLflow. Use tools to measure and enhance prompt quality for industrialization.","bf_ai_og_title":"Enhance LLM Prompts with MLflow","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3438,3437,3444,3447,3448,3449,3450,3435],"tags":[3210,3205,3208,3213,3212,3192,3209,3206,3202,3191,3196,3203,3193,3194,3211,3516,3200,3207,3197,3195,3201,3204,3199,3198],"class_list":["post-12888","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-machine-learning","category-business-case-studies","category-programming-databases","category-technology-trends","category-tools-productivity","category-tutorials-how-to","category-ux-product-design","category-web-development","tag-ai-experiments-in-mlflow","tag-ai-from-poc-to-scaling","tag-ai-industrialization-with-mlflow","tag-ai-json-validation","tag-generative-ai-control","tag-improve-llm-results","tag-leveraging-prompt-engineering","tag-llm-model-configuration","tag-llm-parameter-tuning","tag-llm-prompt-engineering","tag-mlflow-and-llms","tag-mlflow-features","tag-mlflow-for-ai","tag-mlflow-integration","tag-mlflow-llm-management","tag-mms","tag-ollama-ai-integration","tag-open-source-llms","tag-optimize-llm-prompts","tag-prompt-quality-enhancement","tag-prompt-tracking-in-mlflow","tag-scaling-ai-projects","tag-self-hosted-llms","tag-using-mlflow-with-llms"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3Vuhl-3lS","jetpack_featured_media_url":"https:\/\/flaven.fr\/wp-content\/uploads\/2024\/09\/using_mlflow_b.jpg","_links":{"self":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/12888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/comments?post=12888"}],"version-history":[{"count":14,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/12888\/revisions"}],"predecessor-version":[{"id":13254,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/12888\/revisions\/13254"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/media\/12892"}],"wp:attachment":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/media?parent=12888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/categories?post=12888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/tags?post=12888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}