Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCSP-43580 BYO LLM #189

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f97437a
Merge conflict resolution
nvillahermosa-mdb Mar 4, 2025
ca0d99b
Rebuild
nvillahermosa-mdb Jan 6, 2025
41bbbd2
Fixed a line break
nvillahermosa-mdb Jan 6, 2025
8aef330
Cleaned up supportability information
nvillahermosa-mdb Jan 6, 2025
8583d63
Merge conflict resolution
nvillahermosa-mdb Mar 4, 2025
0a6f6ea
Link fixes, wording
nvillahermosa-mdb Jan 6, 2025
941dd6f
Links
nvillahermosa-mdb Jan 6, 2025
8c7ab56
Added a disclaimer about using a supported LLM with a different provider
nvillahermosa-mdb Jan 6, 2025
1379892
Summarized authentication requirements per tab
nvillahermosa-mdb Jan 6, 2025
b3abf58
Merge conflict resolution
nvillahermosa-mdb Mar 4, 2025
5256417
Wording
nvillahermosa-mdb Jan 6, 2025
d2368b7
Checking tocdepth 2 rendering
nvillahermosa-mdb Jan 6, 2025
acf216f
Testing rendering with example block
nvillahermosa-mdb Jan 6, 2025
5c11f22
Format cleanup
nvillahermosa-mdb Jan 6, 2025
2f688a6
AWS examples
nvillahermosa-mdb Jan 6, 2025
6bf8e7c
Added GCP Vertex instructions
nvillahermosa-mdb Jan 6, 2025
d40056a
Fixed broken link
nvillahermosa-mdb Jan 6, 2025
658d1ef
Basic content for self hosted, need to verify with dev
nvillahermosa-mdb Jan 7, 2025
73f76a5
Copy edit
nvillahermosa-mdb Jan 7, 2025
df2d6ff
Adding settings file just in case
nvillahermosa-mdb Jan 7, 2025
a1e989a
Adding settings file just in case
nvillahermosa-mdb Jan 7, 2025
f9552f8
Adding settings file just in case
nvillahermosa-mdb Jan 7, 2025
6917f6f
Cleaning up language for consistency
nvillahermosa-mdb Jan 7, 2025
bf07ada
Copy editing
nvillahermosa-mdb Jan 7, 2025
dbf7d14
Copy editing
nvillahermosa-mdb Jan 7, 2025
c0f62a1
Copy editing
nvillahermosa-mdb Jan 7, 2025
6f67712
Copy editing
nvillahermosa-mdb Jan 7, 2025
09784e0
internal review feedback
nvillahermosa-mdb Mar 4, 2025
4c05cf7
Update source/code-generation/query-converter/set-query-converter-llm…
nvillahermosa-mdb Mar 4, 2025
dfed42c
Updated wording, added a warning to test LLM output
nvillahermosa-mdb Mar 4, 2025
5634999
Copy edit
nvillahermosa-mdb Mar 4, 2025
8dec088
Copy edit
nvillahermosa-mdb Mar 4, 2025
54673b5
Copy edit
nvillahermosa-mdb Mar 4, 2025
39069a2
Copy edits
nvillahermosa-mdb Mar 4, 2025
2b0f522
Copy edit
nvillahermosa-mdb Mar 4, 2025
81a6a08
Copy edit
nvillahermosa-mdb Mar 4, 2025
637bb45
Copy edit
nvillahermosa-mdb Mar 4, 2025
352cd5f
Moved up the warning on testing
nvillahermosa-mdb Mar 4, 2025
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
4 changes: 2 additions & 2 deletions source/code-generation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ application code:
- Supports

* - Query Converter
- Converts SQL based relational database code to function with
MongoDB. The converted code takes into consideration the mapping
- Uses Generative AI to convert SQL-based relational database code to work
with MongoDB. The converted code takes into consideration the mapping
rules and schema transformations defined in your project.
-
- SQL queries
Expand Down
8 changes: 7 additions & 1 deletion source/code-generation/query-converter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,22 @@ Query Converter
:depth: 1
:class: singlecol

Use Query Converter to convert SQL statements, views, and stored
Query Converter uses Generative AI to convert SQL statements, views, and stored
procedures to MongoDB syntax. Relational Migrator considers the mapping
rules and schema transformations defined in your project when converting
your SQL code.

.. important::

Query Converter is disabled by default. You must :ref:`opt-in and enable the
feature <rm-enable-query-converter>` to use it.

.. toctree::
:hidden:
:titlesonly:

AI & Data Usage </code-generation/query-converter/ai-and-data-usage-information>
Set AI Provider and LLM </code-generation/query-converter/set-query-converter-llm>
Enable Query Converter </code-generation/query-converter/enable-query-converter>
Convert Queries </code-generation/query-converter/convert-queries>
Convert Stored Procedures </code-generation/query-converter/convert-stored-procedures>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,54 @@ AI and Data Usage Information
:depth: 1
:class: singlecol

The Query Converter feature is powered by Generative AI
(Gen AI), and may give inaccurate responses. Please see our `Generative AI FAQ
Query Converter is powered by Generative AI
(Gen AI), and may give inaccurate responses. Please see the `Generative AI FAQ
<https://dochub.mongodb.org/core/faq-ai-features>`__
for more information about Gen AI in MongoDB products.

Third Party Providers
---------------------

Query Converter currently uses the `Azure OpenAI Service
By default, Query Converter uses the GPT-4o model with the `Azure OpenAI
Service
<https://azure.microsoft.com/en-us/products/ai-services/openai-service>`__
hosted by Microsoft. This is subject to change in the future.
hosted by Microsoft. You can :ref:`configure Relational Migrator to use a
different AI provider or Large Language Model (LLM)<rm-query-converter-set-llm>`.

.. _rm-supported-llms:

Supported Providers and LLMs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MongoDB tests Query Converter with the following AI providers and models:

.. list-table::
header-rows: 1

* - Provider
- Models

* - `Microsoft Azure OpenAI <https://azure.microsoft.com/en-us/products/ai-services/openai-service>`__
- `GPT-4o <https://platform.openai.com/docs/models#gpt-4o>`__, `GPT-4 <https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4>`__

* - `OpenAI <https://platform.openai.com/docs/overview>`__
- `GPT-4o <https://platform.openai.com/docs/models#gpt-4o>`__, `GPT-4 <https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4>`__

* - `Amazon Bedrock <https://aws.amazon.com/bedrock/>`__
- `Claude 3.5 (Sonnet) <https://docs.anthropic.com/en/api/claude-on-amazon-bedrock>`__, `Mistral Large <https://docs.mistral.ai/deployment/cloud/aws/>`__

* - `GCP Vertex AI <https://cloud.google.com/vertex-ai>`__
- `Gemini 1.5 Pro <https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models>`__

* - Self-managed local/Cloud
- `Llama 3.1 405B <https://www.llama.com/docs/getting_the_models>`__

.. note::

You can configure Query Converter to run models on different providers,
like running Llama 3.1 on Blackrock AWS, but MongoDB provides no
performance or stability guarantees for these configurations.


How Your Data is Used
---------------------
Expand Down Expand Up @@ -52,8 +89,7 @@ your data to be stored, you have the option to opt out:
Disable Query Converter
-----------------------

Query Converter is available in the Relational Migrator UI once you have
:ref:`enabled the query converter feature <rm-enable-query-converter>`.
Query Converter is only available if you :ref:`enable it <rm-enable-query-converter>`.
If you no longer want to use the feature, you can ignore it and no data
will be sent to generative AI models. If needed, you can hide the
is sent to generative AI models. If needed, you can hide the
feature by clearing all browser data for the Relational Migrator host.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Enable Query Converter
:depth: 1
:class: singlecol

You can use the query converter to convert SQL statements, views, and
stored procedures to MongoDB syntax. The query converter considers the
You can use Query Converter to convert SQL statements, views, and
stored procedures to MongoDB syntax. Query Converter considers the
mapping rules and schema transformations defined in your project when
converting your SQL code.

Before You Begin
----------------

Before you can use the query converter, you must sign in to your Atlas
Before you can use Query Converter, you must sign in to your Atlas
account in Relational Migrator. For details, see :ref:`rm-atlas-log-in`.

Steps
Expand All @@ -27,7 +27,7 @@ Steps
.. procedure::
:style: normal

.. step:: Navigate to the query converter pane
.. step:: Navigate to the Query Converter pane

From the :guilabel:`Code Generation` tab, click the
:guilabel:`Query Converter` pane.
Expand All @@ -36,14 +36,12 @@ Steps

.. step:: (Optional) Review telemetry preferences

Telemetry data about the source and converted queries are
temporarily stored by MongoDB to improve the query converter
feature. If you do not want your data to be stored, you have
the option to opt out:
Telemetry data about source and converted queries is
temporarily stored by MongoDB to improve Query Converter. If you don't want your data stored, you can opt out:

.. include:: /includes/fact-disable-query-converter.rst

.. step:: Enable the query converter feature
.. step:: Enable Query Converter

Click :guilabel:`Start Using Query Converter`.
The :guilabel:`Query Converter` pane is displayed.
Expand Down
Loading
Loading